00001 /************************************************************************/ 00002 /* This file is part of openMask(c) INRIA, CNRS, Universite de Rennes 1 */ 00003 /* 1993-2002, thereinafter the Software */ 00004 /* */ 00005 /* The Software has been developped within the Siames Project. */ 00006 /* INRIA, the University of Rennes 1 and CNRS jointly hold intellectual */ 00007 /* property rights */ 00008 /* */ 00009 /* The Software has been registered with the Agence pour la Protection */ 00010 /* des Programmes (APP) under registration number */ 00011 /* IDDN.FR.001.510008.00.S.P.2001.000.41200 */ 00012 /* */ 00013 /* This file may be distributed under the terms of the Q Public License */ 00014 /* version 1.0 as defined by Trolltech AS of Norway and appearing in */ 00015 /* the file LICENSE.QPL included in the packaging of this file. */ 00016 /* */ 00017 /* Licensees holding valid specific licenses issued by INRIA, CNRS or */ 00018 /* Universite Rennes 1 for the software may use this file in */ 00019 /* acordance with that specific license */ 00020 /************************************************************************/ 00021 #ifndef OMK_INP_INPUTEXTENSION_INL 00022 #define OMK_INP_INPUTEXTENSION_INL 00023 00024 #include "OMKInputExtension.h" 00025 #include "OMKAddInputKeyPrm.h" 00026 #include "OMKKeyListener.h" 00027 #include "OMKParametersAccessor.inl" 00028 00029 namespace OMK 00030 { 00031 namespace Inp 00032 { 00033 00034 //----------------------------------------------------------------------------- 00035 template< class CallerClass > 00036 inline 00037 EventListenerCallBack< CallerClass >* InputExtension::initCallBackForKey( 00038 const ConfigurationParameterDescriptor * node, 00039 const std::string& keyId, 00040 std::string& key, 00041 CallerClass* caller, 00042 typename EventListenerCallBack< CallerClass >::CallBackFct fct, 00043 SimulatedObject* sender, 00044 const std::string& visuName ) 00045 { 00046 ParametersAccessor::get( node, keyId, key ) ; 00047 EventListenerCallBack< CallerClass >* listener = new EventListenerCallBack< CallerClass > 00048 ( *sender, caller, fct, OMK::Inp::KeyListener::getKeyReleaseCode( key ) ) ; 00049 sender->sendValuedEvent( visuName, OMK::Inp::InputExtension::ADD_KEY, OMK::Inp::AddInputKeyPrm( key, sender->getName() ) ) ; 00050 return listener ; 00051 } 00052 00053 } // namespace Inp 00054 } // namespace OMK 00055 00056 #endif // OMK_INP_INPUTEXTENSION_INL
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |