The change controller template class to control changes of an object's value. More...
#include "murl_change_controller.h"
Public Types | |
| using | ValueType = DataType |
| The template parameter value type. | |
Public Member Functions | |
| ChangeController () | |
| The default constructor. | |
| ChangeController (const DataType &value) | |
| Constructor taking a default value. More... | |
| Bool | SetValue (const DataType &value) |
| Set a value and increment the current frame if the value has been changed. More... | |
| const DataType & | GetValue () const |
| Get the current value. More... | |
| Bool | WasChanged (ChangeInspector &inspector) const |
| Check if the inspector's frame is different to the controller's frame. More... | |
| void | SetChanged () |
| Increment the current frame. | |
| ChangeController & | operator= (const DataType &value) |
| Assignment operator. More... | |
| operator const DataType & () const | |
| Conversion operator. More... | |
Detailed Description
template<class DataType>
class Murl::ChangeController< DataType >
The change controller template class to control changes of an object's value.
The change controller counts a frame at each values's change and can check a frame change regarding to the ChangeInspector.
Constructor & Destructor Documentation
◆ ChangeController()
|
inline |
Constructor taking a default value.
- Parameters
-
value The default value.
Member Function Documentation
◆ SetValue()
|
inline |
Set a value and increment the current frame if the value has been changed.
- Parameters
-
value The value to set.
- Returns
- true if the value has been changed.
References Murl::ChangeController< DataType >::SetChanged().
Referenced by Murl::ChangeController< DataType >::operator=().
◆ GetValue()
|
inline |
Get the current value.
- Returns
- The current value.
Referenced by Murl::ChangeController< AspectRatio >::operator const AspectRatio &().
◆ WasChanged()
|
inline |
Check if the inspector's frame is different to the controller's frame.
- Parameters
-
inspector The inspector to check.
- Returns
- true if the instpector's frame was dfifferent.
References Murl::ChangeInspector::CheckFrame().
◆ operator=()
|
inline |
Assignment operator.
Calls SetValue().
- Parameters
-
value The value to assign.
- Returns
- The object itself.
References Murl::ChangeController< DataType >::SetValue().
◆ operator const DataType &()
|
inline |
Conversion operator.
- Returns
- The value object.
The documentation for this class was generated from the following file:
- murl_change_controller.h