Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsControlParameter.h

Go to the documentation of this file.
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 PsControlParameterHEADER
00017 #define PsControlParameterHEADER
00018 
00019 #include <PsGenericControlParameter.h>
00020 
00021 #include <Psn.h>
00022 #include <PsAttribute.h>
00023 #include <list>
00024 #include "PsUnInitialisedControlParameterException.h"
00025 
00026 template <typename Type> class PsnTypeT;
00027 template <typename Type> class PsPolator;
00028 class PsSimulatedObject;
00029 class PsName;
00030 
00031 
00032 #include <PsOutput.h>
00033 
00044 template <typename Type>
00045 class PsControlParameter : virtual public PsAttribute
00046 {
00047 public:
00049    PsControlParameter( PsSimulatedObject & owner, const PsName & attributeName, const PsEventIdentifier & eventId) :
00050       PsAttribute (owner, attributeName),
00051       _associatedEventId (eventId)
00052    {
00053       //cerr<<"PsControlParameter: "<<_associatedEventId<<endl;
00054    }
00055 
00057    const PsEventIdentifier & getAssociatedEventId () const 
00058    {
00059       return _associatedEventId ;
00060    }
00061 
00062 
00064    virtual const Type & getLastExactValue (void) const = 0 ;
00065    
00066 
00068    virtual const PsDate & getDateOfLastExactValue (void) const = 0 ;
00069    
00070 
00072    virtual void set (const Type & val) = 0 ; 
00073 
00074 
00076    virtual const Type & get () const = 0;
00077 
00078 
00084    virtual bool connect (const PsName & objectName, const PsName & inputName ) = 0 ;
00085 
00086 
00092    virtual bool connect (PsSimulatedObject & object, const PsName & inputName ) = 0 ;
00093 
00094 
00100    virtual bool connect (PsSimulatedObject * pointerToObject, const PsName & inputName ) = 0 ;
00101 
00102 protected:
00103    friend class PsChangedControlParameterEventListener<Type> ;
00104 
00106    virtual void realSet ( const Type & val ) = 0 ;
00107 
00110    PsEventIdentifier _associatedEventId ;
00111 } ;
00112 
00113 
00114 
00115 #endif

logo OpenMask

Documentation generated on Mon Nov 25 15:24:59 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001