OMK::AttributeAnimatorAccT< PrmType, PrmAccType > Class Template Reference
[Attribute feature]

Attribute with indirect access to value for types that are not sons of OMKType. More...

#include <OMKAttributeAnimator.h>

Inheritance diagram for OMK::AttributeAnimatorAccT< PrmType, PrmAccType >:

Inheritance graph
[legend]
Collaboration diagram for OMK::AttributeAnimatorAccT< PrmType, PrmAccType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void setAccessor (IAccessorT< PrmAccType > *accessor)
 Set the new accessor.

Detailed Description

template<typename PrmType, typename PrmAccType>
class OMK::AttributeAnimatorAccT< PrmType, PrmAccType >

Attribute with indirect access to value for types that are not sons of OMKType.

Date:
2007-05-01
Author:
BenoƮt Chanclou
Parameters:
PrmType The type of the attribute.
PrmAccType The type of the asscociated accessor.
This class is usefull to see an attribute with an other type,
class MyObject : public ExtensibleSimulatedObject
{
  ...
  AttributeAnimatorT< int > myIntegerAttributeAnimator ;
  AttributeAnimatorT< float, int > myIntegerAttributeAnimatorSeeAsAFloat ;
  MyObject( Controller& ctrl, const ObjectDescriptor& objectDescriptor ) 
  : ExtensibleSimulatedObject( ctrl, objectDescriptor ),
    myIntegerAttributeAnimator( "theInteger", 0 ),
    myIntegerAttributeAnimatorSeeAsFloat( "theFloat", &myIntegerAttributeAnimator ) 
  {
    ...
  }
  ...
} ;
or to switch between behavior, see AccessorAccT for more details.

The value is reached through the associated accessor.

The PrmType is cast with SimpleTypeT.

Definition at line 273 of file OMKAttributeAnimator.h.


Constructor & Destructor Documentation

template<typename PrmType, typename PrmAccType>
OMK::AttributeAnimatorAccT< PrmType, PrmAccType >::AttributeAnimatorAccT ( const Name id,
IAccessorT< PrmAccType > *  accessor 
) [inline]

Constructor.

Parameters:
[in] id See _id.

Definition at line 280 of file OMKAttributeAnimator.h.

00281     : IAttributeAnimatorT< PrmType, OMK::Type::SimpleTypeT< PrmType >, AccessorAccT< PrmType,  PrmAccType > >( id, AccessorAccT< PrmType,  PrmAccType >( accessor ) ) {}

template<typename PrmType, typename PrmAccType>
virtual OMK::AttributeAnimatorAccT< PrmType, PrmAccType >::~AttributeAnimatorAccT (  )  [inline, virtual]

Destructor.

Definition at line 283 of file OMKAttributeAnimator.h.

00283 {}

template<typename PrmType, typename PrmAccType>
OMK::AttributeAnimatorAccT< PrmType, PrmAccType >::AttributeAnimatorAccT ( const Name id,
IAccessorT< PrmAccType > *  accessor 
) [inline]

Constructor.

Parameters:
[in] id See _id.

Definition at line 280 of file OMKAttributeAnimator.h.

00281     : IAttributeAnimatorT< PrmType, OMK::Type::SimpleTypeT< PrmType >, AccessorAccT< PrmType,  PrmAccType > >( id, AccessorAccT< PrmType,  PrmAccType >( accessor ) ) {}

template<typename PrmType, typename PrmAccType>
virtual OMK::AttributeAnimatorAccT< PrmType, PrmAccType >::~AttributeAnimatorAccT (  )  [inline, virtual]

Destructor.

Definition at line 283 of file OMKAttributeAnimator.h.

00283 {}


Member Function Documentation

template<typename PrmType, typename PrmAccType>
void OMK::AttributeAnimatorAccT< PrmType, PrmAccType >::setAccessor ( IAccessorT< PrmAccType > *  accessor  )  [inline]

Set the new accessor.

Parameters:
[in] accessor The new accessor to the value.
Use this method to change the current accessor. See example in the class description.

see AccessorAccT for example.

Definition at line 292 of file OMKAttributeAnimator.h.

References OMK::IAttributeT< PrmType, ModelType, AccessorType >::_accessor.

00293   {
00294     this->_accessor.setAccessor( accessor ) ;
00295   }


logo OpenMask

Documentation generated on Mon Jun 9 11:46:03 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007