00001 /* 00002 * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software 00003 * 00004 * The Software has been developped within the Siames Project. 00005 * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights 00006 * 00007 * The Software has been registered with the Agence pour la Protection des 00008 * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200 00009 * 00010 * This file may be distributed under the terms of the Q Public License 00011 * version 1.0 as defined by Trolltech AS of Norway and appearing in the file 00012 * LICENSE.QPL included in the packaging of this file. 00013 * 00014 * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 00015 * for the software may use this file in accordance with that specific license 00016 * 00017 */ 00018 #ifndef PsnObjectHandleHEADER 00019 #define PsnObjectHandleHEADER 00020 00021 00022 00023 00024 #include <PsFlowable.h> 00025 class PsEvent ; 00026 class PsEventIdentifier ; 00027 class PsEventListener ; 00028 class PsSimulatedObject; 00029 class PsName; 00030 class PsOutputNT ; 00031 00032 00033 typedef enum { 00034 SynchronisationMessage, 00035 InitialValuesMessage, 00036 Registration, 00037 CancelRegistration, 00038 GET_ALL_PARAM, 00039 GET_PARAM, 00040 EventReceived, 00041 RegisterForSignal, 00042 CancelRegistrationForSignal 00043 } PsnRequestType; 00044 00049 class PsnObjectHandle : public PsFlowable 00050 { 00051 public: 00053 PsnObjectHandle (PsSimulatedObject & objet); 00054 00057 virtual ~PsnObjectHandle(); 00058 00062 virtual void notifyChangeInControlParameter(PsOutputNT *) ; 00063 00064 00068 virtual bool controlParametersChanged(bool keepChanged = false ) ; 00069 00073 virtual void receiveEvent (const PsEvent & event) = 0 ; 00074 00075 00079 virtual void receiveEvent (PsEvent * event) = 0 ; 00080 00081 00085 virtual void registerEventListenerForEvent ( PsEventListener & eventListener, 00086 const PsEventIdentifier & eventId ) ; 00087 00088 00093 virtual void sendEventsForSignal( PsEvent & event , const PsEventIdentifier & sigId ) = 0 ; 00094 00095 00100 virtual bool receiveRegistrationForSignal ( const PsEventIdentifier & sigId, 00101 const PsName & registrant, 00102 const PsEventIdentifier & eventId ) = 0 ; 00103 00104 00108 virtual bool cancelRegistrationForSignal ( const PsEventIdentifier & sigId, 00109 const PsName & registrant ) = 0 ; 00110 00111 00113 const PsSimulatedObject & getSimulatedObject () const ; 00114 00115 00117 PsSimulatedObject & getSimulatedObject () ; 00118 00119 00120 protected: 00121 friend class PsAttribute ; 00122 00124 virtual void attributeRead() ; 00125 00127 virtual bool getAttributeRead ( bool keepChanged = false ) ; 00128 00130 bool _attributeRead ; 00131 00133 PsSimulatedObject & _myObject; 00134 00136 bool _aControlParameterHasChanged; 00137 00138 }; // PsnObjectHandle 00139 00140 #endif 00141
| Documentation generated on Mon Nov 25 15:25:01 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |