#include <OMKKeyEmitterExtension.h>
Inheritance diagram for OMK::Inp::KeyEmitterExtension:
Protected Member Functions | |
virtual bool | loadExtensionParameters (const ConfigurationParameterDescriptor *node) |
Configuration parameters loader of Extension. | |
virtual void | action () |
The overwritten method. | |
Private Member Functions | |
DECLARE_EXTENSION_FACTORY (KeyEmitterExtension) |
The creation is done dynamically through the following configuration:
visualisation { Class OgreVis ... Extensions { plus { Class KeyEmitterExtension Key P // the key which is used to trigger the action VisuName visualisation // the default is "visualisation" needed to create the key listener EventName eventId // The id of the event or signal Signal on/off // by default is set to on // on: the extension fire a signal, off: the extension emit a event Listeners [ obj1 obj2 ... ] // the list of the object which listen } ... } } *
There is two ways to activate the action of the extension.
the_sender_object->sendEvent( "visualisation", OMK::Inp::KeyListener::getKeyPressCode( "P" ) ) ;
Definition at line 58 of file OMKKeyEmitterExtension.h.
OMK::Inp::KeyEmitterExtension::DECLARE_EXTENSION_FACTORY | ( | KeyEmitterExtension | ) | [private] |
bool KeyEmitterExtension::loadExtensionParameters | ( | const ConfigurationParameterDescriptor * | node | ) | [protected, virtual] |
Configuration parameters loader of Extension.
Retrieves the key (by default it is B), then creates the event listener and the key listener for the defined key.
Reimplemented from OMK::Inp::GenericKeyExtension< OwnerClass >.
Definition at line 25 of file OMKKeyEmitterExtension.cpp.
References OMK::ExtensionT< OwnerClass >::_owner, and OMK::EventSignalEmitterUtil::loadParametersUtil().
00026 { 00027 return GenericKeyExtension< ExtensibleSimulatedObject >::loadExtensionParameters( node ) 00028 && loadParametersUtil( _owner, node ) ; 00029 }
void KeyEmitterExtension::action | ( | ) | [protected, virtual] |
The overwritten method.
Fire a signal or send an event according to the configuration.
Reimplemented from OMK::Inp::GenericKeyExtension< OwnerClass >.
Definition at line 32 of file OMKKeyEmitterExtension.cpp.
References OMK::ExtensionT< OwnerClass >::_owner, and OMK::EventSignalEmitterUtil::sendUtil().
Documentation generated on Mon Jun 9 11:46:04 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |