#include <OMKIAccessor.h>
Inheritance diagram for OMK::AccessorFctT< T, ObjectT >:
Public Types | |
typedef const T &(ObjectT::*) | GetMethod () const |
Method prototype to get a value. | |
typedef void(ObjectT::*) | SetMethod (const T &value) |
Method prototype to set a value. | |
Public Member Functions | |
AccessorFctT (ObjectT *object, SetMethod setMethod, GetMethod getMethod) | |
Constructor. | |
virtual | ~AccessorFctT () |
Destructor. | |
virtual const T & | get () const |
Get the value. | |
virtual void | set (const T &value) |
Set the value. | |
Protected Attributes | |
ObjectT * | _object |
The associated object, which is the owner of the accessor methods. | |
SetMethod | _setMethod |
The set accessor to the value. | |
GetMethod | _getMethod |
The get accessor to the value. |
This accessor class is a template one, the parameters are:
Definition at line 119 of file OMKIAccessor.h.
typedef const T&(ObjectT::*) OMK::AccessorFctT< T, ObjectT >::GetMethod() const |
Method prototype to get a value.
The call back is a member method of the simulated object, which is the owner of the accessor methods.
const T& myGetMethodName() const ;
Definition at line 130 of file OMKIAccessor.h.
typedef void(ObjectT::*) OMK::AccessorFctT< T, ObjectT >::SetMethod(const T &value) |
Method prototype to set a value.
The call back is a member method of the associated object, which is the owner of the accessor methods.
void mySetMethodName( const T& value ) ;
[in] | value | The new value. |
Definition at line 139 of file OMKIAccessor.h.
OMK::AccessorFctT< T, ObjectT >::AccessorFctT | ( | ObjectT * | object, | |
SetMethod | setMethod, | |||
GetMethod | getMethod | |||
) | [inline] |
Constructor.
Stores the pointers on the object to get and set the value.
Definition at line 142 of file OMKIAccessor.h.
00143 : _object( object ), _setMethod( setMethod ), _getMethod( getMethod ) {}
virtual OMK::AccessorFctT< T, ObjectT >::~AccessorFctT | ( | ) | [inline, virtual] |
virtual const T& OMK::AccessorFctT< T, ObjectT >::get | ( | ) | const [inline, virtual] |
Get the value.
Implements OMK::IAccessorT< T >.
Definition at line 149 of file OMKIAccessor.h.
00149 { return (_object->*_getMethod)() ; }
virtual void OMK::AccessorFctT< T, ObjectT >::set | ( | const T & | value | ) | [inline, virtual] |
Set the value.
[in] | value | The new value of the value. |
Implements OMK::IAccessorT< T >.
Definition at line 152 of file OMKIAccessor.h.
00152 { (_object->*_setMethod)( value ) ; }
ObjectT* OMK::AccessorFctT< T, ObjectT >::_object [protected] |
The associated object, which is the owner of the accessor methods.
Definition at line 155 of file OMKIAccessor.h.
Referenced by OMK::AccessorFctT< PrmType, ObjectType >::get(), and OMK::AccessorFctT< PrmType, ObjectType >::set().
SetMethod OMK::AccessorFctT< T, ObjectT >::_setMethod [protected] |
The set accessor to the value.
Definition at line 157 of file OMKIAccessor.h.
Referenced by OMK::AccessorFctT< PrmType, ObjectType >::set().
GetMethod OMK::AccessorFctT< T, ObjectT >::_getMethod [protected] |
The get accessor to the value.
Definition at line 159 of file OMKIAccessor.h.
Referenced by OMK::AccessorFctT< PrmType, ObjectType >::get().
Documentation generated on Mon Jun 9 11:46:01 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |