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 * This file may be distributed under the terms of the Q Public License 00010 * version 1.0 as defined by Trolltech AS of Norway and appearing in the file 00011 * LICENSE.QPL included in the packaging of this file. 00012 * 00013 * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 00014 * for the software may use this file in accordance with that specific license * 00015 */ 00016 #ifndef ControlParameterHEADER 00017 #define ControlParameterHEADER 00018 00019 #include "OMKGenericControlParameter.h" 00020 00021 #include "OMKOpenMASK.h" 00022 #include "OMKKernelAttribute.h" 00023 #include "OMKUnInitialisedControlParameterException.h" 00024 #include "OMKOutput.h" 00025 #include <list> 00026 00027 namespace OMK 00028 { 00029 00030 namespace Type 00031 { 00032 template< typename T > class Polator ; 00033 } 00034 00045 template< typename T > 00046 class ControlParameter : virtual public KernelAttribute 00047 { 00048 public: 00050 ControlParameter( SimulatedObject & owner, const Name & attributeName, const EventIdentifier & eventId ) : 00051 KernelAttribute( owner, attributeName ), 00052 _associatedEventId( eventId ) 00053 { 00054 //cerr<<"ControlParameter: "<<_associatedEventId<<endl; 00055 } 00056 00058 const EventIdentifier & getAssociatedEventId() const 00059 { 00060 return _associatedEventId ; 00061 } 00062 00063 00065 virtual const T & getLastExactValue() const = 0 ; 00066 00067 00069 virtual const Date & getDateOfLastExactValue() const = 0 ; 00070 00071 00073 virtual void set( const T & val ) = 0 ; 00074 00075 00077 virtual const T & get() const = 0; 00078 00079 00085 virtual bool connect( const Name & objectName, const Name & inputName ) = 0 ; 00086 00087 00093 virtual bool connect( SimulatedObject & object, const Name & inputName ) = 0 ; 00094 00095 00101 virtual bool connect( SimulatedObject * pointerToObject, const Name & inputName ) = 0 ; 00102 00103 protected: 00104 friend class ChangedControlParameterEventListener<T> ; 00105 00107 virtual void realSet( const T & val ) = 0 ; 00108 00111 EventIdentifier _associatedEventId ; 00112 } ; 00113 00114 } // namespace OMK 00115 00116 #endif
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |