hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::CallbackProperty< T > Class Template Reference

Callback-on-change property. More...

#include <property.hpp>

Public Member Functions

 CallbackProperty (const T &value, std::function< void(const T &, const T &)> func)
 Create a callback property with value and function. More...
 
 operator T const & () const
 Get the value. More...
 
T & operator= (const T &value)
 Set the value and start the callback. More...
 

Detailed Description

template<class T>
class hx3d::CallbackProperty< T >

Callback-on-change property.

Definition at line 48 of file property.hpp.

Constructor & Destructor Documentation

template<class T >
hx3d::CallbackProperty< T >::CallbackProperty ( const T &  value,
std::function< void(const T &, const T &)>  func 
)

Create a callback property with value and function.

Parameters
valueBase value
funcCallback function

Definition at line 24 of file property.inl.hpp.

Member Function Documentation

template<class T >
hx3d::CallbackProperty< T >::operator T const & ( ) const

Get the value.

Returns
Value

Definition at line 28 of file property.inl.hpp.

template<class T >
T & hx3d::CallbackProperty< T >::operator= ( const T &  value)

Set the value and start the callback.

Parameters
valueNew value
Returns
Modified value

Definition at line 33 of file property.inl.hpp.


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