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

Observable property. More...

#include <property.hpp>

Public Member Functions

 Property (const T &value)
 Create an observable property with value. More...
 
void addObserver (PropertyObserver< T > *observer)
 Add an observer. More...
 
 operator T const & () const
 Get the value. More...
 
T & operator= (const T &value)
 Set the value and call the observers. More...
 

Detailed Description

template<class T>
class hx3d::Property< T >

Observable property.

Definition at line 83 of file property.hpp.

Constructor & Destructor Documentation

template<class T >
hx3d::Property< T >::Property ( const T &  value)

Create an observable property with value.

Parameters
valueBase value

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

Member Function Documentation

template<class T >
void hx3d::Property< T >::addObserver ( PropertyObserver< T > *  observer)

Add an observer.

Parameters
observerObserver

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

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

Get the value.

Returns
Value

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

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

Set the value and call the observers.

Parameters
valueNew value
Returns
Modified value

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


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