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 00022 00023 #if !defined OMK_INP_ADDINPUTKEYPRM_H 00024 #define OMK_INP_ADDINPUTKEYPRM_H 00025 00026 #include <string> 00027 #include "OMKName.h" 00028 #include "OMKInputs.h" 00029 00030 namespace OMK 00031 { 00032 class SimulatedObject ; 00033 class ConfigurationParameterDescriptor ; 00034 namespace Inp 00035 { 00036 00044 class OMKINPUTS_API AddInputKeyPrm : public OMK::Type::Base 00045 { 00046 public: 00048 00049 00050 AddInputKeyPrm(); 00052 AddInputKeyPrm( const AddInputKeyPrm& ref ) ; 00054 AddInputKeyPrm( const std::string& key, 00055 const Name& listeningObjectId ) ; 00057 virtual ~AddInputKeyPrm() ; 00059 00061 00062 public: 00064 virtual void resetDefaultValues() ; 00076 virtual bool loadParameters( const ConfigurationParameterDescriptor * node, 00077 const std::string& prefix = "", 00078 SimulatedObject* p = 0 ) ; 00079 protected: 00081 bool innerParametersLoader( const ConfigurationParameterDescriptor * node, 00082 const std::string& prefix = "", 00083 SimulatedObject* p = 0 ) ; 00085 00087 00088 public: 00090 void setListeningObjectId( const Name& listeningObjectId ) { _listeningObjectId = listeningObjectId ; } 00092 const Name& getListeningObjectId() const { return _listeningObjectId ; } 00093 00095 void setKey( const std::string& key ) { _key = key ; } 00097 const std::string& getKey() const { return _key ; } 00099 00101 00102 00103 bool operator == ( const AddInputKeyPrm& ref ) const { return !( *this != ref ) ; } 00105 bool operator != ( const AddInputKeyPrm& ref ) const ; 00107 AddInputKeyPrm& operator = ( const AddInputKeyPrm& ref ) ; 00109 00111 00112 public: 00114 virtual void insertInStream( std::ostream& = std::cout ) const ; 00116 virtual void extract ( std::istream& = std::cin ) ; 00117 00119 virtual void pack ( OutgoingSynchronisationMessage& out ) const ; 00121 virtual void unpack( IncomingSynchronisationMessage& in ) ; 00122 00124 virtual OMK::Type::PolatorNT* createPolator() ; 00126 protected: 00128 void _copy( const AddInputKeyPrm& ref ) ; 00129 00131 00132 00133 00134 00135 std::string _key ; 00139 Name _listeningObjectId ; 00141 } ; 00142 } // namespace Inp 00143 } // namespace OMK 00144 #endif // defined OMK_INP_ADDINPUTKEYPRM_H
Documentation generated on Mon Jun 9 11:45:55 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |