#include <OMKAttribute.h>
Inheritance diagram for OMK::AttributeFctT< PrmType, ObjectType >:
PrmType | The type of the attribute. | |
ObjectType | The type of the asscociated object which gives the accessor methods. |
class MyObject : public ExtensibleSimulatedObject { protected: AttributeFctT< int, MyObject > _functor ; void theFunction( const int& value ) { // Do something with the value, for example a switch switch( value ) { //... } } int _dummyValue ; const int& getDummy() const { return _dummyValue ; } MyObject( Controller& ctrl, const ObjectDescriptor& objectDescriptor ) : ExtensibleSimulatedObject( ctrl, objectDescriptor ), _functor( "theFunctor", this, &MyObject::theFunction, &MyObject::getDummy ) { } } ;
The value is reached through the methods of the associated object.
The PrmType is cast with SimpleTypeT.
Definition at line 585 of file OMKAttribute.h.
OMK::AttributeFctT< PrmType, ObjectType >::AttributeFctT | ( | const Name & | id, | |
ObjectType * | object, | |||
typename AccessorFctT< PrmType, ObjectType >::SetMethod | setMethod, | |||
typename AccessorFctT< PrmType, ObjectType >::GetMethod | getMethod | |||
) | [inline] |
Constructor.
[in] | id | See _id. |
Definition at line 592 of file OMKAttribute.h.
00595 : IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, AccessorFctT< PrmType, ObjectType > > 00596 ( id, AccessorAccT< PrmType, ObjectType >( object, setMethod, getMethod ) ) {}
virtual OMK::AttributeFctT< PrmType, ObjectType >::~AttributeFctT | ( | ) | [inline, virtual] |
OMK::AttributeFctT< PrmType, ObjectType >::AttributeFctT | ( | const Name & | id, | |
ObjectType * | object, | |||
typename AccessorFctT< PrmType, ObjectType >::SetMethod | setMethod, | |||
typename AccessorFctT< PrmType, ObjectType >::GetMethod | getMethod | |||
) | [inline] |
Constructor.
[in] | id | See _id. |
Definition at line 592 of file OMKAttribute.h.
00595 : IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, AccessorFctT< PrmType, ObjectType > > 00596 ( id, AccessorAccT< PrmType, ObjectType >( object, setMethod, getMethod ) ) {}
virtual OMK::AttributeFctT< PrmType, ObjectType >::~AttributeFctT | ( | ) | [inline, virtual] |
Documentation generated on Mon Jun 9 11:46:01 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |