OMK::Vis::AnimatorInputPlugT< T > Class Template Reference

The plug to retrieve information the handler needs. More...

#include <OMKAnimatorInputPlugT.h>

Inheritance diagram for OMK::Vis::AnimatorInputPlugT< T >:

Inheritance graph
[legend]
Collaboration diagram for OMK::Vis::AnimatorInputPlugT< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Interface.
virtual const T & getTypedValue () const
 Returns the typed associated value.
virtual bool isValueChanged () const
 Returns true if the associated value has changed since the last call.

Protected Attributes

Input< T > * _listenedInput
 The pointer on the input of the visualisation.

Detailed Description

template<typename T>
class OMK::Vis::AnimatorInputPlugT< T >

The plug to retrieve information the handler needs.

Author:
Benoit Chanclou,bunraku <bchanclo@irisa.fr> This plug is used to update according to an output, the animator, owner of this plug, can react to the value read in the output to update the state of its associated visual object.
The two parameters to create this plug are stored in a array of two names, the one of the simulated object and the one of the output, see How to create Animators.

Definition at line 44 of file OMKAnimatorInputPlugT.h.


Constructor & Destructor Documentation

template<typename T>
OMK::Vis::AnimatorInputPlugT< T >::AnimatorInputPlugT ( Input< T > *  listenedInput  )  [inline]

Constructor.

Parameters:
[in] listenedInput,the input given by the visualisation which creates it to connect itself to the output

Definition at line 53 of file OMKAnimatorInputPlugT.h.

References OMK::Vis::AnimatorInputPlugT< T >::_listenedInput, and OMASSERT.

00053                                                        :
00054           AnimatorPlugT<T>(),
00055                   _listenedInput( listenedInput )
00056           {
00057             OMASSERT( _listenedInput && "Must be valid !" ) ;
00058           }

template<typename T>
virtual OMK::Vis::AnimatorInputPlugT< T >::~AnimatorInputPlugT (  )  [inline, virtual]

Destructor.

Definition at line 61 of file OMKAnimatorInputPlugT.h.

00061 {}

template<typename T>
OMK::Vis::AnimatorInputPlugT< T >::AnimatorInputPlugT ( Input< T > *  listenedInput  )  [inline]

Constructor.

Parameters:
[in] listenedInput,the input given by the visualisation which creates it to connect itself to the output

Definition at line 53 of file OMKAnimatorInputPlugT.h.

References OMK::Vis::AnimatorInputPlugT< T >::_listenedInput, and OMASSERT.

00053                                                        :
00054           AnimatorPlugT<T>(),
00055                   _listenedInput( listenedInput )
00056           {
00057             OMASSERT( _listenedInput && "Must be valid !" ) ;
00058           }

template<typename T>
virtual OMK::Vis::AnimatorInputPlugT< T >::~AnimatorInputPlugT (  )  [inline, virtual]

Destructor.

Definition at line 61 of file OMKAnimatorInputPlugT.h.

00061 {}


Member Function Documentation

template<typename T>
virtual const T& OMK::Vis::AnimatorInputPlugT< T >::getTypedValue (  )  const [inline, virtual]

Returns the typed associated value.

Returns:
A constant pointer to the typed associated value retrieved in the input. Called by sons of OMK::Vis::Animator to retrieve the value.

Implements OMK::Vis::AnimatorPlugT< T >.

Definition at line 70 of file OMKAnimatorInputPlugT.h.

References OMK::Vis::AnimatorInputPlugT< T >::_listenedInput, and OMASSERTM.

00071           {
00072             OMASSERTM( _listenedInput->isConnected(), "The input is not connected, cannot get the value" ) ;
00073             return _listenedInput->get() ;
00074           }

template<typename T>
virtual bool OMK::Vis::AnimatorInputPlugT< T >::isValueChanged (  )  const [inline, virtual]

Returns true if the associated value has changed since the last call.

Returns true if the associated input is connected.

Implements OMK::Vis::AnimatorPlug.

Definition at line 78 of file OMKAnimatorInputPlugT.h.

References OMK::Vis::AnimatorInputPlugT< T >::_listenedInput.

00079           {
00080             return _listenedInput->isConnected() ;
00081           }


Member Data Documentation

template<typename T>
Input< T >* OMK::Vis::AnimatorInputPlugT< T >::_listenedInput [protected]

The pointer on the input of the visualisation.

Definition at line 87 of file OMKAnimatorInputPlugT.h.

Referenced by OMK::Vis::AnimatorInputPlugT< T >::AnimatorInputPlugT(), OMK::Vis::AnimatorInputPlugT< T >::getTypedValue(), and OMK::Vis::AnimatorInputPlugT< T >::isValueChanged().


logo OpenMask

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

Generated with doxygen by Dimitri van Heesch ,   1997-2007