#include <OMKAnimatorEventPlugT.h>
Inheritance diagram for OMK::Vis::AnimatorEventPlugT< T >:
Public Member Functions | |
Interface of \ref OMK::Vis::AnimatorEventPlug. | |
virtual void | setEvent (const Event *event) |
Sets the associated value. | |
Interface of \ref OMK::Vis::AnimatorPlugT. | |
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 | |
T | _value |
The variable member which stores the value found by the visualisation in the event. |
Definition at line 44 of file OMKAnimatorEventPlugT.h.
OMK::Vis::AnimatorEventPlugT< T >::AnimatorEventPlugT | ( | VisBase & | vis, | |
const EventIdentifier & | eventId | |||
) |
Default constructor.
Definition at line 97 of file OMKAnimatorEventPlugT.h.
00097 : 00098 AnimatorPlugT<T>(), 00099 IAnimatorEventPlug( vis, eventId ), 00100 _value() // default value 00101 { 00102 }
OMK::Vis::AnimatorEventPlugT< T >::~AnimatorEventPlugT | ( | ) | [virtual] |
OMK::Vis::AnimatorEventPlugT< T >::AnimatorEventPlugT | ( | VisBase & | vis, | |
const EventIdentifier & | eventId | |||
) |
Default constructor.
Definition at line 97 of file OMKAnimatorEventPlugT.h.
00097 : 00098 AnimatorPlugT<T>(), 00099 IAnimatorEventPlug( vis, eventId ), 00100 _value() // default value 00101 { 00102 }
OMK::Vis::AnimatorEventPlugT< T >::~AnimatorEventPlugT | ( | ) | [virtual] |
void OMK::Vis::AnimatorEventPlugT< T >::setEvent | ( | const Event * | event | ) | [virtual] |
Sets the associated value.
Called by the visualisation OMK::Vis::VisBase to set the value when the event is recieved.
Stores the value in the variable member _value
.
Reimplemented from OMK::Vis::IAnimatorEventPlug.
Definition at line 117 of file OMKAnimatorEventPlugT.h.
References OMK::Vis::IAnimatorEventPlug::_updatedValue, OMK::Vis::AnimatorEventPlugT< T >::_value, OMASSERT, and OMK::ValuedEvent< UserType >::value.
00118 { 00119 const ValuedEvent< T >* valuedEvent = dynamic_cast< const ValuedEvent< T >* >( event ) ; 00120 OMASSERT( valuedEvent && "Bad type cast for the event" ) ; 00121 // Copy the value 00122 _value = valuedEvent->value ; 00123 _updatedValue = true ; 00124 }
const T & OMK::Vis::AnimatorEventPlugT< T >::getTypedValue | ( | ) | const [virtual] |
Returns the typed associated value.
Implements OMK::Vis::AnimatorPlugT< T >.
Definition at line 131 of file OMKAnimatorEventPlugT.h.
References OMK::Vis::AnimatorEventPlugT< T >::_value.
00132 { 00133 return _value ; 00134 }
virtual bool OMK::Vis::AnimatorEventPlugT< T >::isValueChanged | ( | ) | const [inline, virtual] |
Returns true if
the associated value has changed since the last call.
Returns true if the value has changed.
Implements OMK::Vis::AnimatorPlug.
Definition at line 78 of file OMKAnimatorEventPlugT.h.
References OMK::Vis::IAnimatorEventPlug::_updatedValue.
00079 { 00080 bool tmp = _updatedValue ; 00081 _updatedValue = false ; 00082 return tmp ; 00083 }
T OMK::Vis::AnimatorEventPlugT< T >::_value [protected] |
The variable member which stores the value found by the visualisation in the event.
Definition at line 90 of file OMKAnimatorEventPlugT.h.
Referenced by OMK::Vis::AnimatorEventPlugT< T >::getTypedValue(), and OMK::Vis::AnimatorEventPlugT< T >::setEvent().
Documentation generated on Mon Jun 9 11:46:05 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |