Murl::ChangeController< DataType > Class Template Reference

The change controller template class to control changes of an object's value. More...

#include "murl_change_controller.h"

Public Types

typedef DataType ValueType
 The template parameter value type. More...
 

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.
 
ChangeControlleroperator= (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.

Member Typedef Documentation

◆ ValueType

template<class DataType>
typedef DataType Murl::ChangeController< DataType >::ValueType

The template parameter value type.

Constructor & Destructor Documentation

◆ ChangeController()

template<class DataType>
Murl::ChangeController< DataType >::ChangeController ( const DataType &  value)
inline

Constructor taking a default value.

Parameters
valueThe default value.

Member Function Documentation

◆ SetValue()

template<class DataType>
Bool Murl::ChangeController< DataType >::SetValue ( const DataType &  value)
inline

Set a value and increment the current frame if the value has been changed.

Parameters
valueThe value to set.
Returns
true if the value has been changed.

◆ GetValue()

template<class DataType>
const DataType& Murl::ChangeController< DataType >::GetValue ( ) const
inline

Get the current value.

Returns
The current value.

◆ WasChanged()

template<class DataType>
Bool Murl::ChangeController< DataType >::WasChanged ( ChangeInspector inspector) const
inline

Check if the inspector's frame is different to the controller's frame.

Parameters
inspectorThe inspector to check.
Returns
true if the instpector's frame was dfifferent.

◆ operator=()

template<class DataType>
ChangeController& Murl::ChangeController< DataType >::operator= ( const DataType &  value)
inline

Assignment operator.

Calls SetValue().

Parameters
valueThe value to assign.
Returns
The object itself.

◆ operator const DataType &()

template<class DataType>
Murl::ChangeController< DataType >::operator const DataType & ( ) const
inline

Conversion operator.

Returns
The value object.

The documentation for this class was generated from the following file:
  • murl_change_controller.h


Copyright © 2011-2018 Spraylight GmbH.