OMK::IAttributeBaseT< PrmType > Class Template Reference
[Attribute feature]

Attribute interface. More...

#include <OMKAttribute.h>

Inheritance diagram for OMK::IAttributeBaseT< PrmType >:

Inheritance graph
[legend]
Collaboration diagram for OMK::IAttributeBaseT< PrmType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Accessors.
virtual IAccessorT< PrmType > * getAccessor ()
 Returns the typed accessor of the attribut.
virtual const std::type_info & getTypeId () const
 return the type of the attribut.
Services for additional inputs (use by \ref OMK::Iii::IConnectors "connectors").
virtual void getValueFromInput (PrmType &value, InputNT *input, int deltaT=0) const =0
 Retrieves the value in the given input.
virtual void getValueFromInput (InputNT *input)=0
 Retrieves the value in the given input to set the attribute value.

Protected Member Functions

Initialisation.
virtual bool loadParameters (const ConfigurationParameterDescriptor *node, const std::string *aliasName)
 Configuration parameters loader of IAttribute.

Detailed Description

template<typename PrmType>
class OMK::IAttributeBaseT< PrmType >

Attribute interface.

Date:
2007-05-01
Author:
BenoƮt Chanclou
This class defines an interface class and is the ancestor class for attrribute templated class (AttributeT and sons). It is a part of the attribute services.

This class is the typed version of IAttribute. It is a partial implementation, the full implementation is made by IAttributeT.

The template argument PrmType is the type of the attribute, there is no restriction on this type.

Definition at line 55 of file OMKAttribute.h.


Constructor & Destructor Documentation

template<typename PrmType>
OMK::IAttributeBaseT< PrmType >::IAttributeBaseT ( const Name id  )  [protected]

Constructor.

Parameters:
[in] id See IAttribute.

Definition at line 40 of file OMKAttribute.inl.

00041 : IAttribute( id )
00042 {
00043 }

template<typename PrmType>
OMK::IAttributeBaseT< PrmType >::~IAttributeBaseT (  )  [virtual]

Destructor.

Does nothing.

Definition at line 47 of file OMKAttribute.inl.

00048 {
00049 }

template<typename PrmType>
OMK::IAttributeBaseT< PrmType >::IAttributeBaseT ( const Name id  )  [protected]

Constructor.

Parameters:
[in] id See IAttribute.

Definition at line 40 of file OMKAttribute.inl.

00041 : IAttribute( id )
00042 {
00043 }

template<typename PrmType>
OMK::IAttributeBaseT< PrmType >::~IAttributeBaseT (  )  [virtual]

Destructor.

Does nothing.

Definition at line 47 of file OMKAttribute.inl.

00048 {
00049 }


Member Function Documentation

template<typename PrmType>
virtual IAccessorT< PrmType >* OMK::IAttributeBaseT< PrmType >::getAccessor (  )  [inline, virtual]

Returns the typed accessor of the attribut.

The accessor is the attribute itself !

Definition at line 74 of file OMKAttribute.h.

00074 { return  this ; }

template<typename PrmType>
virtual const std::type_info& OMK::IAttributeBaseT< PrmType >::getTypeId (  )  const [inline, virtual]

return the type of the attribut.

Returns:
the type of the attribute as a std::type_info.

Implements OMK::IAttribute.

Definition at line 77 of file OMKAttribute.h.

00077 { return typeid( PrmType ) ; }

template<typename PrmType>
bool OMK::IAttributeBaseT< PrmType >::loadParameters ( const ConfigurationParameterDescriptor node,
const std::string *  aliasName 
) [protected, virtual]

Configuration parameters loader of IAttribute.

See the ancestor.

Set the initial value of the attribute.

Reimplemented from OMK::IAttribute.

Reimplemented in OMK::IAttributeAnimatorT< PrmType, ModelType, AccessorType >, OMK::IAttributeAnimatorT< PrmType, PrmType, OMK::AccessorFctT< PrmType, ObjectType > >, OMK::IAttributeAnimatorT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeAnimatorT< PrmType, PrmType, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeAnimatorT< PrmType, PrmType, OMK::AccessorT< PrmType > >, OMK::IAttributeAnimatorT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorT< PrmType > >, and OMK::IAttributeAnimatorT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorFctT< PrmType, ObjectType > >.

Definition at line 53 of file OMKAttribute.inl.

References OMK::debugMsg(), OMK::IAccessorT< PrmType >::get(), OMK::ParametersAccessor::get(), OMK::IAttribute::getId(), OMK::IAttribute::loadParameters(), OMK_DEBUG_OMK_ATTR, and OMTRACEID.

Referenced by OMK::TriggerExtension::loadExtensionParameters(), OMK::TriggerBaseExtension::loadExtensionParameters(), OMK::DistanceToExtension::loadExtensionParameters(), OMK::PreOffsetExtension::loadExtensionParameters(), OMK::MKMMoveToTaskExtension::loadExtensionParameters(), OMK::MKMMotionTaskExtension::loadExtensionParameters(), and OMK::MKMHeadToTaskExtension::loadExtensionParameters().

00055 {
00056   // Try to retrieve a value, ignores if cannot
00057   if( OMK::ParametersAccessor::get( node, aliasName ? *aliasName : getId().getCString(), *this ) )
00058   {
00059     std::ostringstream msg ; 
00060                 msg << "Information for " << OMK::debugMsg( this ) << std::endl
00061       << ">>> :-) Initial value is :" 
00062       << std::endl << this->get() ;
00063     OMTRACEID( OMK_DEBUG_OMK_ATTR, msg.str() ) ;
00064   }
00065 
00066   return IAttribute::loadParameters( node, aliasName ) ;
00067 }

template<typename PrmType>
virtual void OMK::IAttributeBaseT< PrmType >::getValueFromInput ( PrmType value,
InputNT input,
int  deltaT = 0 
) const [pure virtual]

Retrieves the value in the given input.

Parameters:
[out] value The returned value.
[in] input The input in which the value will be retrieved. It was previously created by the call to createInput.
[in] deltaT The time of the asked value.
If the input is not valid (null, of the wrong type or not connected) the value stays unchanged. The input should be created with the method createInput.

This a pure virtual because the input type depends of the ModelType. This method is implemented by IAttributeT, see the implementation here.

Implemented in OMK::IAttributeT< PrmType, ModelType, AccessorType >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorFctT< PrmType, ObjectType > >, OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorT< PrmType > >, OMK::IAttributeT< T, OMK::Type::SimpleTypeT< T >, OMK::AccessorT< T > >, OMK::IAttributeT< bool, OMK::Type::SimpleTypeT< bool >, OMK::AccessorT< bool > >, OMK::IAttributeT< OMK::Type::Transform, OMK::Type::SimpleTypeT< OMK::Type::Transform >, OMK::AccessorT< OMK::Type::Transform > >, OMK::IAttributeT< HBT::PostureData, OMK::Type::SimpleTypeT< HBT::PostureData >, OMK::AccessorT< HBT::PostureData > >, OMK::IAttributeT< Type, OMK::Type::SimpleTypeT< Type >, OMK::AccessorAccT< Type, AttributType > >, OMK::IAttributeT< float, OMK::Type::SimpleTypeT< float >, OMK::AccessorT< float > >, OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorT< PrmType > >, and OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorFctT< PrmType, ObjectType > >.

Referenced by OMK::Iii::SharedConnectorT< Type >::updateParameter(), and OMK::Iii::SimpleConnectorT< Type >::updateParameter().

template<typename PrmType>
virtual void OMK::IAttributeBaseT< PrmType >::getValueFromInput ( InputNT input  )  [pure virtual]

Retrieves the value in the given input to set the attribute value.

Parameters:
[in] input The input in which the value will be retrieved.
If the input is not valid (null, of the wrong type or not connected) the attribute value stays unchanged. The input should be created with the method createInput.

This a pure virtual because the input type depends of the ModelType. This method is implemented by IAttributeT, see the implementation here.

Implements OMK::IAttribute.

Implemented in OMK::IAttributeT< PrmType, ModelType, AccessorType >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorFctT< PrmType, ObjectType > >, OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorAccT< PrmType, PrmAccType > >, OMK::IAttributeT< PrmType, PrmType, OMK::AccessorT< PrmType > >, OMK::IAttributeT< T, OMK::Type::SimpleTypeT< T >, OMK::AccessorT< T > >, OMK::IAttributeT< bool, OMK::Type::SimpleTypeT< bool >, OMK::AccessorT< bool > >, OMK::IAttributeT< OMK::Type::Transform, OMK::Type::SimpleTypeT< OMK::Type::Transform >, OMK::AccessorT< OMK::Type::Transform > >, OMK::IAttributeT< HBT::PostureData, OMK::Type::SimpleTypeT< HBT::PostureData >, OMK::AccessorT< HBT::PostureData > >, OMK::IAttributeT< Type, OMK::Type::SimpleTypeT< Type >, OMK::AccessorAccT< Type, AttributType > >, OMK::IAttributeT< float, OMK::Type::SimpleTypeT< float >, OMK::AccessorT< float > >, OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorT< PrmType > >, and OMK::IAttributeT< PrmType, OMK::Type::SimpleTypeT< PrmType >, OMK::AccessorFctT< PrmType, ObjectType > >.


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007