OMK::Extension Class Reference
[Extension feature]

Ancestor of every extension of extensible simulated objects. More...

#include <OMKExtension.h>

Inheritance diagram for OMK::Extension:

Inheritance graph
[legend]
Collaboration diagram for OMK::Extension:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Accessors to extension id.
const NamegetId () const
 Return the id of the extension.
Configuration loaders
virtual bool loadObjectParameters (const ConfigurationParameterDescriptor *node)
 Configuration parameters loader of Extension.
virtual bool loadExtensionParameters (const ConfigurationParameterDescriptor *node)
 Configuration parameters loader of Extension.
Computation
virtual void preComputeParameters ()
 method.
virtual void postComputeParameters ()
 This method is called during compute by the extensible simulated object.

Public Attributes

Name _id
 The id of the extension.

Detailed Description

Ancestor of every extension of extensible simulated objects.

Date:
2007-02-28
Author:
Benoît Chanclou
Module description :
This class defines the interface of an extension for extensible object.
Use it by derivation to add the necessary methods. This base class is abstract and never implemented, only the derivate classes are. All the members of this class are protected except the accessor to the Id.
See Extension feature part in the kernel documentation to know how to extend an object behavior.

Definition at line 114 of file OMKExtension.h.


Constructor & Destructor Documentation

OMK::Extension::Extension ( ExtensibleSimulatedObject owner,
const Name id,
bool  registerExtension = true 
) [protected]

Protected constructor of Extension call by derivate classes.

The dynamically created extensions, those which will be created by parsing the Extensions configuration node, should have the same arguments for their constructor. ExtensionCreator is the creator for the extensions object.

The extensions creates by the object could add other parameters.

Definition at line 29 of file OMKExtension.cpp.

References OMK::ExtensionManager::addExtension(), and OMASSERTM.

00030 : _id( id ) 
00031 { 
00032   OMASSERTM( owner, "Should be a valid pointer on the simulated object which will add the extension in its list" ) ; 
00033   if( registerExtension ) owner->addExtension( this ) ;
00034 }

virtual OMK::Extension::~Extension (  )  [inline, virtual]

Destructor of Extension.

Definition at line 129 of file OMKExtension.h.

00129 :

OMK::Extension::Extension ( ExtensibleSimulatedObject owner,
const Name id,
bool  registerExtension = true 
) [protected]

Protected constructor of Extension call by derivate classes.

The dynamically created extensions, those which will be created by parsing the Extensions configuration node, should have the same arguments for their constructor. ExtensionCreator is the creator for the extensions object.

The extensions creates by the object could add other parameters.

Definition at line 29 of file OMKExtension.cpp.

References OMK::ExtensionManager::addExtension(), and OMASSERTM.

00030 : _id( id ) 
00031 { 
00032   OMASSERTM( owner, "Should be a valid pointer on the simulated object which will add the extension in its list" ) ; 
00033   if( registerExtension ) owner->addExtension( this ) ;
00034 }

virtual OMK::Extension::~Extension (  )  [inline, virtual]

Destructor of Extension.

Definition at line 129 of file OMKExtension.h.

00129 :


Member Function Documentation

const Name& OMK::Extension::getId (  )  const [inline]

Return the id of the extension.

Definition at line 135 of file OMKExtension.h.

Referenced by OMK::ExtensionManager::addExtension(), OMK::debugMsg(), and OMK::Iii::InteractiveExtension::loadExtensionParameters().

00135 {

bool OMK::Extension::loadObjectParameters ( const ConfigurationParameterDescriptor node  )  [virtual]

Configuration parameters loader of Extension.

Parameters:
[in] node the root node of the configuration parameter.
Returns:
should return true if all the parameters are well retrieved.
Overwrite this method to initialise the extension. This method allows the extension to get parameters of the object.
Be careful, this method is called before loadExtensionParameters.
See How to configure an extension ? for details.

Reimplemented in OMK::ContainerExtension, OMK::Vis::VisObjectExtension, OMK::Iii::JointInteractorExtension, OMK::Iii::JointExtension, OMK::TriggerContainerExtension, and OMK::MultiTriggerContainerExtension.

Definition at line 42 of file OMKExtension.cpp.

00043 { 
00044   return true ;
00045 }

bool OMK::Extension::loadExtensionParameters ( const ConfigurationParameterDescriptor node  )  [virtual]

Configuration parameters loader of Extension.

Parameters:
[in] node the root node of the configuration parameter, null if no node defined for the extension.
Returns:
should return true if all the parameters are well retrieved.
Overwrite this method to initialise the extension. This method allows the extension to get parameters of its own field.
Be careful, loadObjectParameters method is called before this method.
See How to configure an extension ? for details.

Reimplemented in OMK::ContainerExtension, OMK::DuplicatedAttributeExtension< AttributType, Type >, OMK::ExtensionOfExtensionCreatorEvent, OMK::Iii::InteractiveExtension, OMK::Iii::InteractorExtension, OMK::Iii::JointInteractorExtension, OMK::Iii::JointExtension, OMK::Inp::DebugOverlayExtension, OMK::Inp::GenericKeyExtension< OwnerClass >, OMK::Inp::InputExtension, OMK::Inp::KeyEmitterExtension, OMK::Inp::KeyEmitterExtensionT< T, ModelType >, OMK::Inp::OverlayExtension, OMK::Inp::PlusMinusExtension< T >, OMK::PreOffsetExtension, OMK::TriggerContainerExtension, OMK::MultiTriggerContainerExtension, OMK::TriggerEmitterExtension, OMK::TriggerEmitterExtensionT< T, ModelType >, OMK::MultiTriggerEmitterExtensionT< T, ModelType >, OMK::DistanceToExtension, OMK::TriggerBaseExtension, OMK::TriggerAttributeExtension, OMK::TriggerExtension, OMK::GroundExtension, OMK::MKMHeadToTaskExtension, OMK::MKMMotionTaskExtension, OMK::MKMMoveToTaskExtension, OMK::Inp::GenericKeyExtension< OMK::Vis::OgreVis >, and OMK::Inp::GenericKeyExtension< OMK::ExtensibleSimulatedObject >.

Definition at line 37 of file OMKExtension.cpp.

00038 { 
00039   return true ;
00040 }

virtual void OMK::Extension::preComputeParameters (  )  [inline, virtual]

method.

This method is called by the extensible simulated object at each compute step. Its call takes place in the compute method just after the inputs were retrieved by the computeInputs method and before the output parameters will be computed by the computeParameters

Reimplemented in OMK::ContainerExtension, OMK::Iii::InteractiveExtension, OMK::Inp::DebugOverlayExtension, OMK::Inp::InputExtension, OMK::Inp::OverlayExtension, OMK::Vis::CameraBaseExtension, OMK::NotAttributeExtension, OMK::PreOffsetExtension, OMK::PostOffsetExtension, OMK::TriggerContainerExtension, OMK::MultiTriggerContainerExtension, OMK::DistanceToExtension, OMK::TriggerBaseExtension, OMK::MKMHeadToTaskExtension, OMK::MKMMotionTaskExtension, and OMK::MKMMoveToTaskExtension.

Definition at line 178 of file OMKExtension.h.

00179 {}

virtual void OMK::Extension::postComputeParameters (  )  [inline, virtual]

This method is called during compute by the extensible simulated object.

This method is called by the extensible simulated object at each compute step. Its call takes place in the compute method just after the output parameters were computed by the computeParameters method and before they will be copied in the outputs by the computeOutputs method.

Reimplemented in OMK::ContainerExtension, OMK::Iii::InteractiveExtension, OMK::Iii::JointInteractorExtension, OMK::Iii::JointExtension, OMK::Inp::PlusMinusExtension< T >, OMK::Vis::CameraBaseExtension, OMK::NotAttributeExtension, OMK::PostOffsetExtension, OMK::TriggerContainerExtension, OMK::MultiTriggerContainerExtension, OMK::TriggerEmitterExtension, OMK::TriggerEmitterExtensionT< T, ModelType >, and OMK::MultiTriggerEmitterExtensionT< T, ModelType >.

Definition at line 190 of file OMKExtension.h.

00191 {}


Member Data Documentation

Name OMK::Extension::_id

The id of the extension.

Definition at line 194 of file OMKExtension.h.

Referenced by OMK::Iii::InteractorExtension::InteractorExtension().


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007