OMK::ExtensionT< SimulatedObjectType > Class Template Reference
[Extension feature]

Specialisation of Extension which references the extension owner. More...

#include <OMKExtension.h>

Inheritance diagram for OMK::ExtensionT< SimulatedObjectType >:

Inheritance graph
[legend]
Collaboration diagram for OMK::ExtensionT< SimulatedObjectType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

SimulatedObjectType * getOwner () const

Protected Attributes

SimulatedObjectType * _owner
 Store the owner of the extension.

Detailed Description

template<class SimulatedObjectType>
class OMK::ExtensionT< SimulatedObjectType >

Specialisation of Extension which references the extension owner.

Date:
2007-02-28
Author:
Benoît Chanclou
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 the extension feature part in the kernel documentation to know how to extend an object behavior.

During init the the owner simulated object is dinamically casted in a pointer on the owner.

Definition at line 216 of file OMKExtension.h.


Constructor & Destructor Documentation

template<class SimulatedObjectType>
OMK::ExtensionT< SimulatedObjectType >::ExtensionT ( ExtensibleSimulatedObject owner,
const Name id,
bool  registerExtension = true 
) [protected]

Protected constructor of Extension call by derivate classes.

Definition at line 32 of file OMKExtension.inl.

References OMK::ExtensionT< SimulatedObjectType >::_owner, OMK::debugMsg(), OMK_DEBUG_OMK_EXT, and OMTRACEID.

00033 : Extension( owner, id, registerExtension ), 
00034   _owner( dynamic_cast< SimulatedObjectType* >( owner ) ) 
00035 {
00036   if( !_owner )
00037   { // Not ok, display the following message
00038     OMTRACEID( OMK_DEBUG_OMK_EXT, 
00039       "Error for " << OMK::debugMsg( this, owner ) << std::endl
00040       << ">>> :-( Unable to init the extension with that kind of simulated object !" << std::endl
00041       << "        Should be a " << typeid( SimulatedObjectType ).name() << ")" ) ; 
00042   }
00043 }

template<class SimulatedObjectType>
virtual OMK::ExtensionT< SimulatedObjectType >::~ExtensionT (  )  [inline, virtual]

Destructor of Extension.

Definition at line 225 of file OMKExtension.h.

00225 :

template<class SimulatedObjectType>
OMK::ExtensionT< SimulatedObjectType >::ExtensionT ( ExtensibleSimulatedObject owner,
const Name id,
bool  registerExtension = true 
) [protected]

Protected constructor of Extension call by derivate classes.

Definition at line 32 of file OMKExtension.inl.

References OMK::ExtensionT< SimulatedObjectType >::_owner, OMK::debugMsg(), OMK_DEBUG_OMK_EXT, and OMTRACEID.

00033 : Extension( owner, id, registerExtension ), 
00034   _owner( dynamic_cast< SimulatedObjectType* >( owner ) ) 
00035 {
00036   if( !_owner )
00037   { // Not ok, display the following message
00038     OMTRACEID( OMK_DEBUG_OMK_EXT, 
00039       "Error for " << OMK::debugMsg( this, owner ) << std::endl
00040       << ">>> :-( Unable to init the extension with that kind of simulated object !" << std::endl
00041       << "        Should be a " << typeid( SimulatedObjectType ).name() << ")" ) ; 
00042   }
00043 }

template<class SimulatedObjectType>
virtual OMK::ExtensionT< SimulatedObjectType >::~ExtensionT (  )  [inline, virtual]

Destructor of Extension.

Definition at line 225 of file OMKExtension.h.

00225 :


Member Function Documentation

template<class SimulatedObjectType>
SimulatedObjectType* OMK::ExtensionT< SimulatedObjectType >::getOwner (  )  const [inline]

Definition at line 234 of file OMKExtension.h.

Referenced by OMK::Iii::SessionPrm::create(), OMK::Iii::InteractorOutputT< PrmType, ModelType >::InteractorOutputT(), and OMK::Iii::InteractorOutputT< PrmType, ModelType >::processSetValue().

00234 :


Member Data Documentation

template<class SimulatedObjectType>
SimulatedObjectType* OMK::ExtensionT< SimulatedObjectType >::_owner [protected]

Store the owner of the extension.

It is null until the init method is called while the extension is added to the simulated object.

Definition at line 232 of file OMKExtension.h.

Referenced by OMK::Iii::InteractorExtension::closeSessionWith(), OMK::ExtensionT< SimulatedObjectType >::ExtensionT(), OMK::ExtensionT< OMK::ExtensibleSimulatedObject >::getOwner(), OMK::Vis::VisServiceExtension::handleVisuInfoEvent(), OMK::Iii::InteractorExtension::InteractorExtension(), OMK::MultiTriggerContainerExtension::loadExtensionParameters(), OMK::TriggerContainerExtension::loadExtensionParameters(), OMK::PreOffsetExtension::loadExtensionParameters(), OMK::Iii::JointExtension::loadExtensionParameters(), OMK::Iii::JointInteractorExtension::loadExtensionParameters(), OMK::Iii::InteractorExtension::loadExtensionParameters(), OMK::Iii::InteractiveExtension::loadExtensionParameters(), OMK::ExtensionOfExtensionCreatorEvent::loadExtensionParameters(), OMK::DuplicatedAttributeExtension< AttributType, Type >::loadExtensionParameters(), OMK::Vis::VisObjectExtension::loadObjectParameters(), OMK::Iii::JointInteractorExtension::loadObjectParameters(), OMK::PreOffsetExtension::preComputeParameters(), OMK::Iii::InteractorExtension::processAccessibleParameters(), OMK::Iii::InteractiveExtension::processControlRelease(), OMK::Iii::InteractiveExtension::processControlUnfreeze(), OMK::Iii::InteractorExtension::startInteractor(), OMK::Iii::InteractorExtension::startSessionWith(), and OMK::DuplicatedAttributeExtension< AttributType, Type >::~DuplicatedAttributeExtension().


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007