i6engine  1.0
i6e::utils::AutoUpdater< T > Class Template Reference

#include <D:/Projekte/i6engine/libs/i6engine-utils/include/i6engine/utils/AutoUpdater.h>

Public Member Functions

 AutoUpdater ()
 default constructor More...
 
 AutoUpdater (const T &value)
 Constructor for a new AutoUpdate variable. More...
 
void registerUpdate (const std::function< void(T)> &func)
 Registers a callback for autoUpdate being called on every change of the value. More...
 
get () const
 Getter for the value. More...
 
void set (const T &val)
 Setter for the value. More...
 
T & operator= (const T &val)
 assignment operator More...
 
AutoUpdater< T > & operator+= (const T &val)
 += operator More...
 
AutoUpdater< T > & operator-= (const T &val)
 -= operator More...
 
AutoUpdater< T > & operator*= (const T &val)
 *= operator More...
 
AutoUpdater< T > & operator/= (const T &val)
 /= operator More...
 
 operator T () const
 returns value as the datatype it really is More...
 
operator++ ()
 
operator++ (int)
 

Detailed Description

template<typename T>
class i6e::utils::AutoUpdater< T >

Definition at line 38 of file AutoUpdater.h.

Constructor & Destructor Documentation

template<typename T >
i6e::utils::AutoUpdater< T >::AutoUpdater ( )
inline

default constructor

Definition at line 43 of file AutoUpdater.h.

template<typename T >
i6e::utils::AutoUpdater< T >::AutoUpdater ( const T &  value)
inline

Constructor for a new AutoUpdate variable.

Parameters
valueinitial value of this variable.

Definition at line 50 of file AutoUpdater.h.

Member Function Documentation

template<typename T >
T i6e::utils::AutoUpdater< T >::get ( ) const
inline

Getter for the value.

Returns
value

Definition at line 65 of file AutoUpdater.h.

template<typename T >
i6e::utils::AutoUpdater< T >::operator T ( ) const
inline

returns value as the datatype it really is

Definition at line 123 of file AutoUpdater.h.

template<typename T >
AutoUpdater<T>& i6e::utils::AutoUpdater< T >::operator*= ( const T &  val)
inline

*= operator

Definition at line 107 of file AutoUpdater.h.

template<typename T >
T i6e::utils::AutoUpdater< T >::operator++ ( )
inline

doesn't return another AutoUpdater, but the old value of the AutoUpdater!

Definition at line 130 of file AutoUpdater.h.

template<typename T >
T i6e::utils::AutoUpdater< T >::operator++ ( int  )
inline

Definition at line 135 of file AutoUpdater.h.

template<typename T >
AutoUpdater<T>& i6e::utils::AutoUpdater< T >::operator+= ( const T &  val)
inline

+= operator

Definition at line 91 of file AutoUpdater.h.

template<typename T >
AutoUpdater<T>& i6e::utils::AutoUpdater< T >::operator-= ( const T &  val)
inline

-= operator

Definition at line 99 of file AutoUpdater.h.

template<typename T >
AutoUpdater<T>& i6e::utils::AutoUpdater< T >::operator/= ( const T &  val)
inline

/= operator

Definition at line 115 of file AutoUpdater.h.

template<typename T >
T& i6e::utils::AutoUpdater< T >::operator= ( const T &  val)
inline

assignment operator

Definition at line 83 of file AutoUpdater.h.

template<typename T >
void i6e::utils::AutoUpdater< T >::registerUpdate ( const std::function< void(T)> &  func)
inline

Registers a callback for autoUpdate being called on every change of the value.

Parameters
funcfunction to be called when the variable changes

Definition at line 57 of file AutoUpdater.h.

template<typename T >
void i6e::utils::AutoUpdater< T >::set ( const T &  val)
inline

Setter for the value.

Parameters
valvalue to be set.

Definition at line 73 of file AutoUpdater.h.


The documentation for this class was generated from the following file: