25 #ifndef __I6ENGINE_UTILS_AUTOUPDATER_H__
26 #define __I6ENGINE_UTILS_AUTOUPDATER_H__
58 _functions.push_back(func);
73 void set(
const T & val) {
75 for (std::function<
void(T)> & method : _functions) {
150 std::vector<std::function<void(T)>> _functions;
AutoUpdater< T > & operator/=(const T &val)
/= operator
AutoUpdater(const T &value)
Constructor for a new AutoUpdate variable.
AutoUpdater< T > & operator-=(const T &val)
-= operator
AutoUpdater< T > & operator+=(const T &val)
+= operator
void set(const T &val)
Setter for the value.
AutoUpdater< T > & operator*=(const T &val)
*= operator
AutoUpdater()
default constructor
void registerUpdate(const std::function< void(T)> &func)
Registers a callback for autoUpdate being called on every change of the value.
T & operator=(const T &val)
assignment operator