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

PsSimulatedObject Class Reference

This is the class defining what a object or entity is like in Mask. More...

#include <PsSimulatedObject.h>

Inheritance diagram for PsSimulatedObject:

Inheritance graph
[legend]
Collaboration diagram for PsSimulatedObject:

Collaboration graph
[legend]
List of all members.

Public Methods

creation and destruction
 PsSimulatedObject (PsController &ctrl, const PsObjectDescriptor &objectDescription)
 constructor

virtual ~PsSimulatedObject ()
 destructor

member functions for queries using the simulation tree
template<typename Type> list< const PsObjectDescriptor * > * listSonsOfType ()
 list the sons of this object of a certain type in the simulation tree.

template<typename Type> list< const PsObjectDescriptor * > * listBrothersOfType ()
 get the name of the brothers, of a certain type, of the simulated object in the simualtion tree warning : the underlying implementation relies on dynamic_cast, which implies usual restrictions on it's use in the constructor (object might not find itself)

template<typename Type> list< const PsObjectDescriptor * > * listDescendantsOfType ()
 list of descendants, of a certain type, of this simulated object in the simulation tree

virtual bool isAncestor (const PsName &name)
 isAncestor

virtual PsSimulatedObject * getFather () const
 get the simulated object's father in the simulation tree if the simulated object has a father WARNING : if any other information than a pointer to the object simulating the father is needed, please use getFathersDescriptor() to access that information

virtual const PsObjectDescriptorgetFathersDescriptor () const
 get the name of the simulated object's father in the simulation tree

Accessors.
virtual const PsNamegetName () const
 get the name of the simulated object

virtual PsControllergetController () const
 get the controler of the simulated object

PsnObjectHandlegetObjectHandle () const
 get the object handle. Usage by the kernel.

void setObjectHandle (PsnObjectHandle *objectHandle)
 set the object handle : feils if an object handle allready exists

const PsObjectDescriptorgetObjectDescriptor () const
 gain access to the object descriptor

virtual const PsNameToPointerMap<
PsInputNT > & 
getInputTable () const
 get a reference to the table of the simulated object's inputs

virtual const PsNameToPointerMap<
PsOutputNT > & 
getOutputTable () const
 get a reference to the table of the simulated object's outputs

virtual const PsNameToPointerMap<
PsOutputNT > & 
getControlParameterTable () const
 get a reference to the table of the simulated object's parameters

virtual const list< PsEventListener * > & getEventListeners () const
 get a reference to the list of EventListeners

virtual PsInputNTgetPointerToInputNamed (const PsName &inputName) const
 get a pointer to an input

virtual PsOutputNTgetPointerToOutputNamed (const PsName &outputName) const
 get a pointer to an output

virtual PsOutputNTgetPointerToControlParameterNamed (const PsName &parameterName) const
 get a pointer to a control parameter

virtual const PsConfigurationParameterDescriptorgetConfigurationParameters () const
 get a pointer to the structure describing our configuration parameters

member function whose redifinition enables creation of specialised simulated object .
virtual void init ()
 initialise the object.

virtual void compute ()
 compute evolution of this object.

virtual void finish ()
 finish calculation of evolution.

virtual void extract (istream &in=cin)
 extract pertinant information for this object from an input stream

virtual void insertInStream (ostream &out=cout) const
 insert pertinant information for this object in an output stream

virtual void unpack (PsIncomingSynchronisationMessage &)
 unpack an update from a message

virtual void unpackAllValues (PsIncomingSynchronisationMessage &)
 unpack all necessary info if the object is a mirror from a message

virtual void pack (PsOutgoingSynchronisationMessage &) const
 pack update information in a message

virtual void packAllValues (PsOutgoingSynchronisationMessage &) const
 pack initial information in a message

virtual void prepareEventProcessing (list< PsEvent * > &)
 prepareEventProcessing called before any events are processed if any clean up is needed after the preceeding simulation step

virtual bool processEvent (PsEvent *)
 process an event for this object.

virtual void eventsProcessed (list< PsEvent * > &)
 eventsProcessed called once all the events have been handled to processEvent, and those who have been succesfully processed (processEvent having return true ) have been destroyed

virtual bool processEventsASAP () const
 event processing mode.

virtual void addEventListener (PsEventListener &)
 eventListener registration called by the object to register the event listener the referenced event listener shouldn't be deleted

void registerEventListenerForEvent (PsEventListener &eventListener, const PsEventIdentifier &eventId)
 eventListener registration called by the event listener for registration of the eventId listened to

signal generation and bookeeping
void fireSignal (const PsEventIdentifier &sig)
 fire a signal wich will be seen by anybody registred for that signal

template<typename UserType> void fireValuedSignal (const PsEventIdentifier &sig, const UserType &value)
 fire a signal which carries an associated value

virtual bool registerForSignalBy (const PsEventIdentifier &sig, const PsName &producer)
 register for a signal fired by a particular simulated object

virtual bool registerForSignalBy (const PsEventIdentifier &sig, const PsName &producer, const PsEventIdentifier &eventId)
 register for a signal fired by a particular simulated object

virtual bool registerForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject *producer)
 register for a signal fired by a particular simulated object

virtual bool registerForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject &producer)
 register for a signal fired by a particular simulated object

virtual bool registerForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject *producer, const PsEventIdentifier &eventId)
 register for a signal fired by a particular simulated object

virtual bool registerForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject &producer, const PsEventIdentifier &eventId)
 register for a signal fired by a particular simulated object

virtual bool registerForSignal (const PsEventIdentifier &sig)
 register for a particular signal fired by anybody

virtual bool registerForSignal (const PsEventIdentifier &sig, const PsEventIdentifier &eventId)
 register for a particular signal fired by anybody

virtual bool cancelRegistrationForSignalBy (const PsEventIdentifier &sig, const PsName &producer)
 cancel registration for a signal fired by a particular simulated object

virtual bool cancelRegistrationForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject *producer)
 cancel registration for a signal fired by a particular simulated object

virtual bool cancelRegistrationForSignalBy (const PsEventIdentifier &sig, PsSimulatedObject &producer)
 cancel registration for a signal fired by a particular simulated object

virtual bool cancelRegistrationForSignal (const PsEventIdentifier &sig)
 cancel registration for a particular signal fired by anybody

attribute declaration
template<typename Type> PsInput< Type > & addInput (const PsName &inputName, bool makeConnectable=false, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add a input to the simulated object

template<typename Type> PsSensitiveInput< Type > & addSensitiveInput (const PsName &inputName, bool makeConnectable=false, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add a sensitive input to the simulated object

template<typename Type> PsSensitiveNotifyingInput<
Type > & 
addSensitiveNotifyingInput (const PsName &inputName, bool makeConnectable=false, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add a sensitive Notifying input to the simulated object

void deleteInput (const PsName &inputName)
 delete an input from the list of inputs of the simulated object WARNING : consideration is being given for the removal of this member function

template<typename Type> PsOutput< Type > & addOutput (const PsName &outputName, PsPolatorNT *polator=0)
 add an output to the simulated object

template<typename Type> PsControlParameter< Type > & addControlParameter (const PsName &controlParameterName, PsPolatorNT *polator=0)
 add a control parameter to the simulated object

template<typename Type> PsInputAlias< Type > & addInputAlias (const PsName &aliasName, const PsName &aliasedObjectName, const PsName &aliasedInputName, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add an input which is an alias to an input of an other object

template<typename Type> PsSensitiveInputAlias< Type > & addSensitiveInputAlias (const PsName &aliasName, const PsName &aliasedObjectName, const PsName &aliasedInputName, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add an sensitive input which is an alias to an input of an other object

template<typename Type> PsSensitiveNotifyingInputAlias<
Type > & 
addSensitiveNotifyingInputAlias (const PsName &aliasName, const PsName &aliasedObjectName, const PsName &aliasedInputName, int precisionLevel=PsPolatorNT::defaultPrecisionLevel)
 add a sensitive Notifying input which is an alias to an input of an other object

template<typename Type> PsOutputAlias< Type > & addOutputAlias (const PsName &aliasName, const PsName &aliasedObjectName, const PsName &aliasedOutputName, PsPolatorNT *interp=0)
 add an output which is an alias to the output of an ancestor in the simulation tree

date and duration manipulation methods
virtual const PsDategetSimulatedDate () const
 get the simulated date

float getPeriod () const
 getPeriod this is a shorthand for 1 / _objectDescriptor.Frequency () is expressed in seconds

member function related to event sending
void sendEvent (const PsName &receiver, const PsEventIdentifier &eventId)
 send an event

void sendEvent (PsSimulatedObject *receiver, const PsEventIdentifier &eventId)
 send an event

void sendEvent (PsSimulatedObject &receiver, const PsEventIdentifier &eventId)
 send an event

template<typename UserType> void sendValuedEvent (const PsName &receiver, const PsEventIdentifier &eventId, const UserType &userInfo)
 send a valued event

template<typename UserType> void sendValuedEvent (PsSimulatedObject *receiver, const PsEventIdentifier &eventId, const UserType &userInfo)
 send a valued event

template<typename UserType> void sendValuedEvent (PsSimulatedObject &receiver, const PsEventIdentifier &eventId, const UserType &userInfo)
 send a valued event

void sendEvent (const PsEvent &event)
 send an event.

void sendEvent (PsEvent *event)
 send the event pointed to by event warning : after this member function is called, *event should be considered as deleted, as the controler will delete it at any time : use previous member function if you want Mask to copy the event.

stuff for derived object creation
virtual void addInstanceCreator (const PsName &className, PsSimulatedObjectCreator *instanceCreator)
 add a new class which instanciations can be created by this object ( known as encapsulatedClasses ).

template<typename SimulatedObject> void generateAndAddInstanceCreatorFor (const PsName &className)
 generate an object creator for instanciation of objects of an encapsulated classe.

virtual const PsNameToPointerMap<
PsSimulatedObjectCreator > & 
getEncapsulatedClassesTable () const
 get the list of encapsulated classes known to this object

virtual PsSimulatedObject * createInstanceOfEncapsulatedClass (const PsObjectDescriptor &objectDescriptor) const
 create an instance of an encapsulated class


Protected Attributes

PsController_controller
 reéférence sur le controleur

const PsObjectDescriptor_objectDescriptor
 référence sur le descripteur d'objet

PsNameToPointerMap< PsInputNT_inputTable
 the input table

PsNameToPointerMap< PsOutputNT_outputTable
 the output table

PsNameToPointerMap< PsOutputNT_controlParameterTable
 the table of control parameters

list< PsEventListener * > _listOfEventListeners
 the list of Event listeners of that object

PsnObjectHandle_objectHandle
 pointeur on the associated objectHandle

PsNameToPointerMap< PsSimulatedObjectCreator_encapsulatedClassesTable
 the table of encapsulated classes creators


Friends

class PsInputNT

Detailed Description

This is the class defining what a object or entity is like in Mask.

A simulation object is completely initialised in 4 to 6 steps :

Definition at line 77 of file PsSimulatedObject.h.


Constructor & Destructor Documentation

PsSimulatedObject::PsSimulatedObject PsController   ctrl,
const PsObjectDescriptor   objectDescription
 

constructor

Definition at line 70 of file PsSimulatedObject.cxx.

References _objectDescriptor, and PsObjectDescriptor::_pointerToSimulatedObject.

00070                                                                                                        : 
00071    PsFlowable(),
00072    _controller ( ctrl ),
00073    _objectDescriptor ( objectDecriptor ),
00074    _objectHandle ( NULL )
00075 {
00076    _objectDescriptor._pointerToSimulatedObject = this ;
00077 }

PsSimulatedObject::~PsSimulatedObject   [virtual]
 

destructor

Definition at line 80 of file PsSimulatedObject.cxx.

References _controlParameterTable, _encapsulatedClassesTable, _inputTable, _objectDescriptor, _outputTable, PsObjectDescriptor::_pointerToSimulatedObject, map< PsName, PsSimulatedObjectCreator * >::begin(), map< PsName, PsInputNT * >::begin(), map< PsName, PsOutputNT * >::begin(), map< PsName, PsSimulatedObjectCreator * >::end(), map< PsName, PsInputNT * >::end(), map< PsName, PsOutputNT * >::end(), getPointerToControlParameterNamed(), getPointerToInputNamed(), and getPointerToOutputNamed().

00081 {
00082   // destroy inputs, outputs and control parameters
00083    
00084   PsNameToPointerMap<PsOutputNT>::iterator pOutput; // iterateur
00085   PsOutputNT *outputCourante;
00086   PsNameToPointerMap<PsOutputNT>::iterator pParam; // iterateur
00087   PsOutputNT *paramCourant;
00088   PsNameToPointerMap<PsInputNT>::iterator pInput; // iterateur
00089   PsInputNT *inputCourant;
00090 
00091   // Pour toutes les outputs, on detruit ;
00092 
00093 #ifdef _DEBUGEXEC
00094   cerr<<"PsSimulatedObject:: ~PsSimulatedObject ()  : destruction des paramètres ";
00095 #endif
00096   for(pParam= _controlParameterTable.begin(); pParam!= _controlParameterTable.end(); pParam++)
00097     {
00098       paramCourant = getPointerToControlParameterNamed ((*pParam).first);
00099       delete paramCourant;
00100     }
00101 #ifdef _DEBUGEXEC
00102   cerr<<"effective"<<endl;
00103   cerr<<"PsSimulatedObject:: ~PsSimulatedObject ()  : destruction des entrées ";
00104 #endif
00105   for(pInput= _inputTable.begin(); pInput!=_inputTable.end();pInput++)
00106     {
00107       inputCourant = getPointerToInputNamed ((*pInput).first);
00108       delete inputCourant ;
00109     }
00110 #ifdef _DEBUGEXEC
00111   cerr<<"effective"<<endl;
00112   cerr<<"PsSimulatedObject:: ~PsSimulatedObject ()  : destruction des outputs ";
00113 #endif
00114   for(pOutput= _outputTable.begin(); pOutput!= _outputTable.end(); pOutput++)
00115     {
00116        outputCourante = getPointerToOutputNamed ((*pOutput).first);
00117        delete outputCourante;
00118     }
00119 #ifdef _DEBUGEXEC
00120   cerr<<"effective"<<endl;
00121   cerr<<"PsSimulatedObject:: ~PsSimulatedObject ()  : encapsulated classes creators destruction ";
00122 #endif
00123  
00124 #ifdef _DEBUGEXEC
00125   cerr<<"effective"<<endl;
00126 #endif
00127   PsNameToPointerMap<PsSimulatedObjectCreator>::iterator pEncapsulatedClassesTable ;
00128   for( pEncapsulatedClassesTable = _encapsulatedClassesTable.begin() ;
00129        pEncapsulatedClassesTable != _encapsulatedClassesTable.end() ;
00130        pEncapsulatedClassesTable++ )
00131      {
00132         delete (*pEncapsulatedClassesTable).second ;
00133      }
00134 
00135   // update the object descriptor
00136   _objectDescriptor._pointerToSimulatedObject = NULL ;
00137 
00138 }


Member Function Documentation

template<typename Type>
PsControlParameter< Type > & PsSimulatedObject::addControlParameter const PsName   controlParameterName,
PsPolatorNT   polator = 0
 

add a control parameter to the simulated object

Parameters:
controlParamaterName name of the control parameter to add
t a pointer to the type of the control parameter, which can be obtained through TYPEINFO
polator optional argument use to override the default polateur for Type

Definition at line 851 of file PsSimulatedObject.h.

References _controller, _controlParameterTable, PsNameToPointerMap< PsOutputNT >::addObjectWithIndex(), getName(), and PsNameToPointerMap< PsOutputNT >::getObjectOfIndex().

00854 {
00855    PsOutputNT * redefinedControlParameter = _controlParameterTable.getObjectOfIndex ( controlParameterName ) ;
00856    PsControlParameter<Type> * controlParameter ;
00857    if ( redefinedControlParameter == NULL )
00858       {
00859          controlParameter = _controller.template createControlParameter<Type>( controlParameterName, *this, polator);
00860       }
00861    else 
00862       {
00863          controlParameter =  dynamic_cast < PsControlParameter<Type> * > ( redefinedControlParameter ) ;
00864          if (  controlParameter == NULL )
00865             {
00866                throw PsUnallowedOverloadingException ( controlParameterName, getName() ) ;
00867             }
00868          else 
00869             {
00870                cerr<<"Warning : controlParameter "<<controlParameterName<<" of "<<getName()
00871                    <<" already defined. No new controlParameter created : reference to old one used"<<endl;
00872             }
00873       }
00874    PsOutputNT * realControlParameter = dynamic_cast<PsOutputNT *>(controlParameter) ;
00875    assert ( realControlParameter != NULL ) ; 
00876    _controlParameterTable.addObjectWithIndex (controlParameterName, realControlParameter) ;
00877    return *controlParameter ;

void PsSimulatedObject::addEventListener PsEventListener   [virtual]
 

eventListener registration called by the object to register the event listener the referenced event listener shouldn't be deleted

Definition at line 907 of file PsSimulatedObject.cxx.

References _listOfEventListeners, and list< PsEventListener * >::push_front().

Referenced by PsGenericControlParameter< Type, AncestorClass >::PsGenericControlParameter(), and PsInput< Type >::PsInput().

00908 {
00909    _listOfEventListeners.push_front( & eventListener) ;
00910 }

template<typename Type>
PsInput< Type > & PsSimulatedObject::addInput const PsName   inputName,
bool    makeConnectable = false,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add a input to the simulated object

Parameters:
inputName name of the added input
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 734 of file PsSimulatedObject.h.

References _controller, _inputTable, getName(), and PsNameToPointerMap< PsInputNT >::getObjectOfIndex().

00738 {
00739    PsInputNT * redefinedInput = _inputTable.getObjectOfIndex ( inputName );
00740    PsInput<Type> * input ;
00741    if ( redefinedInput == NULL )
00742       {
00743          input = _controller.template createInput<Type> ( inputName, *this, makeConnectable, precisionLevel ) ;
00744       }
00745    else 
00746       {
00747          input = dynamic_cast<PsInput<Type> *> ( redefinedInput ) ;
00748          if ( input == NULL ) 
00749             {
00750                throw PsUnallowedOverloadingException(inputName, getName() ) ;
00751             }
00752          else 
00753             {
00754                cerr<<"Warning : input "<<inputName<<" of object "<<getName()
00755                    <<" already defined. No new input created : reference to old one used"<<endl;
00756             }
00757       }
00758    return *input ;

template<typename Type>
PsInputAlias< Type > & PsSimulatedObject::addInputAlias const PsName   aliasName,
const PsName   aliasedObjectName,
const PsName   aliasedInputName,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add an input which is an alias to an input of an other object

Parameters:
aliasName name of the added input
aliasedObjectName the of the object being aliased. aliasedObjectName should be a simulated object ancestor of the current object
aliasedInputName name of the input aliased
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 882 of file PsSimulatedObject.h.

References _controller, _inputTable, PsController::error(), getName(), PsNameToPointerMap< PsInputNT >::getObjectOfIndex(), PsController::getPointerToSimulatedObjectNamed(), and isAncestor().

00887 {
00888    PsInputNT * redefinedInput =  _inputTable.getObjectOfIndex ( aliasName ) ;
00889    PsInputAlias<Type> * alias = NULL ;
00890 
00891    if ( redefinedInput == NULL )
00892       {
00893          // make sure aliasedObjectName is an ancestor of object
00894          if ( isAncestor( aliasedObjectName ) )
00895             {       
00896                PsSimulatedObject * obj = _controller.getPointerToSimulatedObjectNamed (aliasedObjectName) ;
00897                PsInputNT * input = obj->_inputTable.getObjectOfIndex( aliasedInputName );
00898                PsAbstractInput<Type> * realInput = dynamic_cast <PsAbstractInput<Type> *> (input) ;
00899                
00900                if (realInput != NULL) 
00901                   {
00902                      if (obj != NULL) 
00903                         {
00904                            alias = _controller.template createInputAlias<Type>( aliasName, *this, realInput, precisionLevel );
00905                         } 
00906                      else 
00907                         {
00908                            PsController::error("imposible aliasing ") ;
00909                         } 
00910                   }
00911                else 
00912                   {
00913                      PsController::error("impossible aliasing, probably because of type mismatch") ;
00914                   }
00915             }
00916          else
00917             {
00918                cerr << "PsSimulatedObject::createInputAlias " << aliasedObjectName << " isn't the father of  " 
00919                     << getName() << " : aliasing is therefore impossible for alias named " <<  aliasedInputName << endl ;
00920                PsController::error("");
00921             }
00922       }
00923    else 
00924       {
00925          alias = dynamic_cast <PsInputAlias<Type> * > ( redefinedInput );
00926          if ( alias == NULL )
00927             {
00928                throw PsUnallowedOverloadingException ( aliasName, getName() ) ;
00929             }
00930          else 
00931             {
00932                cerr<<"Warning : inputAlias "<<aliasName<<" of object "<<getName()
00933                    <<" already defined. No new inputAlias created : reference to old one used"<<endl;
00934             }
00935       }
00936    return *alias ;

void PsSimulatedObject::addInstanceCreator const PsName   className,
PsSimulatedObjectCreator   instanceCreator
[virtual]
 

add a new class which instanciations can be created by this object ( known as encapsulatedClasses ).

Parameters:
className name of this class
instanceCreator an instance creator for simulated objects of encapsulated classes

Definition at line 927 of file PsSimulatedObject.cxx.

References _encapsulatedClassesTable, PsController::AllWarnings, pair< T1, T2 >::first, map< PsName, PsSimulatedObjectCreator * >::insert(), pair< T1, T2 >::second, and PsController::warningLevel.

Referenced by generateAndAddInstanceCreatorFor().

00928 {
00929    pair<PsNameToPointerMap < PsSimulatedObjectCreator >::iterator, bool> result = 
00930       _encapsulatedClassesTable.insert (pair<const PsName, PsSimulatedObjectCreator *>(className,instanceCreator) ) ;
00931    if ( !result.second )
00932       //the instance creator was not inserted because an instance creator was allready
00933       {
00934          if ( PsController::warningLevel >= PsController::AllWarnings )
00935             {
00936                cerr<<"PsSimulatedObject::addInstanceCreator "
00937                    <<"replaced an instance creator for class "
00938                    <<className<<endl;
00939             }
00940          delete result.first->second ;
00941          result.first->second = instanceCreator ;
00942       }
00943 }

template<typename Type>
PsOutput< Type > & PsSimulatedObject::addOutput const PsName   outputName,
PsPolatorNT   polator = 0
 

add an output to the simulated object

Parameters:
outputName name of the output to add
t a pointer to the type of the output, which can be obtained through TYPEINFO
polator optional argument use to override the default polateur for Type

Definition at line 821 of file PsSimulatedObject.h.

References _controller, _outputTable, PsNameToPointerMap< PsOutputNT >::addObjectWithIndex(), getName(), and PsNameToPointerMap< PsOutputNT >::getObjectOfIndex().

00824 {
00825    PsOutputNT * redefinedOutput = _outputTable.getObjectOfIndex ( outputName ) ;
00826    PsOutput<Type> * output ;
00827    if ( redefinedOutput == NULL )
00828       { 
00829          output = _controller.template createOutput<Type>(outputName, *this, polator ) ;
00830       }
00831    else 
00832       {
00833          output = dynamic_cast <PsOutput<Type> *> ( redefinedOutput ) ;
00834          if ( output == NULL )
00835             {
00836                throw PsUnallowedOverloadingException ( outputName, getName() ) ;
00837             }
00838          else 
00839             {
00840                cerr<<"Warning : output "<<outputName<<" of object "<<getName()
00841                    <<" already defined. No new output created : reference to old one used"<<endl;
00842             }
00843       }
00844    
00845    _outputTable.addObjectWithIndex (outputName, output) ;
00846    return *output ;

template<typename Type>
PsOutputAlias< Type > & PsSimulatedObject::addOutputAlias const PsName   aliasName,
const PsName   aliasedObjectName,
const PsName   aliasedOutputName,
PsPolatorNT   interp = 0
 

add an output which is an alias to the output of an ancestor in the simulation tree

Parameters:
aliasName name of the added input
aliasedObjectName the of the object being aliased. aliasedObjectName should be a simulated object ancestor of the current object
aliasedOutputName name of the input aliased
t a pointer to the type of input, which can be obtained through TYPEINFO
Returns:
a reference to the created input

Definition at line 1058 of file PsSimulatedObject.h.

References _controller, _outputTable, PsNameToPointerMap< PsOutputNT >::addObjectWithIndex(), list< T, Alloc >::begin(), list< T, Alloc >::end(), PsController::error(), getController(), getName(), PsNameToPointerMap< PsOutputNT >::getObjectOfIndex(), getPointerToOutputNamed(), and PsController::getPointerToSimulatedObjectNamed().

01063 { 
01064    PsOutputNT * redefinedOutput =  _outputTable.getObjectOfIndex ( aliasName ) ;     
01065 
01066    PsOutputAlias<Type> * alias = NULL ;
01067    list<const PsObjectDescriptor *> * listeFils = getController().template listDescendantsOfType<PsSimulatedObject>(aliasedObjectName); 
01068    int aliasedObjectPresent = false ;
01069    
01070    if ( redefinedOutput == NULL ) 
01071       {
01072          // make sure aliasedObjectName is an ancestor of object
01073          if (listeFils!=NULL)
01074             {
01075                list<const PsObjectDescriptor *>::const_iterator listeFilsIterator = listeFils->begin() ;
01076                while((listeFilsIterator != listeFils->end() ) && 
01077                      (!aliasedObjectPresent) )
01078                   {
01079                      aliasedObjectPresent = ( (*listeFilsIterator)->getName() == getName() ) ;
01080                      ++ listeFilsIterator ;
01081                   }
01082                
01083                delete listeFils;
01084             }    
01085          if( aliasedObjectPresent )
01086             {
01087                
01088                PsSimulatedObject * obj = _controller.getPointerToSimulatedObjectNamed (aliasedObjectName) ;
01089                
01090                PsOutputNT * Outputnt = obj->getPointerToOutputNamed(aliasedOutputName);
01091                PsOutput<Type> * refOutput =   dynamic_cast <PsOutput<Type> *> (Outputnt) ;
01092                if (refOutput != NULL) 
01093                   {
01094                      if (obj != NULL) 
01095                         {
01096                            alias = _controller.template createOutputAlias<Type>(aliasName,*this,refOutput,interp);
01097                         } 
01098                      else 
01099                         {
01100                            cerr << "PsSimulatedObject::addOutputAlias " << endl ;
01101                            cerr << "alias " << aliasName << " cannot be made on inexistant " << aliasedOutputName << endl ;
01102                            throw PsUserException(""); 
01103                         } 
01104                   }
01105                else 
01106                   {
01107                      throw PsUserException("Impossible output aliasing : type mismatch");
01108                   }
01109             }
01110          else
01111             {
01112                cout << "PsSimulatedObject::addOutputAlias " << aliasedObjectName << " isn't the father of " 
01113                     << getName() << " : not possible to alias " <<  aliasedOutputName << endl ;
01114                PsController::error("");
01115             }
01116       }
01117    else
01118       {
01119          alias = dynamic_cast <PsOutputAlias<Type> * > ( redefinedOutput );
01120          if ( alias == NULL )
01121             {
01122                throw PsUnallowedOverloadingException ( aliasName, getName() ) ;
01123             }
01124          else 
01125             {
01126                cerr<<"Warning : outputAlias already defined. No new outputAlias created : reference to old one used"<<endl;
01127             }
01128       }
01129    _outputTable.addObjectWithIndex (aliasName, alias) ;
01130    return *alias ;

template<typename Type>
PsSensitiveInput< Type > & PsSimulatedObject::addSensitiveInput const PsName   inputName,
bool    makeConnectable = false,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add a sensitive input to the simulated object

Parameters:
inputName name of the added input
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 763 of file PsSimulatedObject.h.

References _controller, _inputTable, getName(), and PsNameToPointerMap< PsInputNT >::getObjectOfIndex().

00767 {
00768    PsInputNT * redefinedInput = _inputTable.getObjectOfIndex ( inputName );
00769    PsSensitiveInput<Type> * input ;
00770    if ( redefinedInput == NULL )
00771       {
00772          input = _controller.template createSensitiveInput<Type>( inputName, *this, makeConnectable, precisionLevel );
00773       }
00774    else
00775       {
00776          input = dynamic_cast <PsSensitiveInput<Type> *> ( redefinedInput ) ;
00777          if ( input == NULL )
00778             {
00779                throw PsUnallowedOverloadingException( inputName, getName() ) ;
00780             }
00781          else 
00782             {
00783                cerr<<"Warning : sensitiveInput "<<inputName<<" of object "<<getName()
00784                    <<" already defined. No new sensitiveInput created : reference to old one used"<<endl;
00785             }
00786       }
00787    return *input ;

template<typename Type>
PsSensitiveInputAlias< Type > & PsSimulatedObject::addSensitiveInputAlias const PsName   aliasName,
const PsName   aliasedObjectName,
const PsName   aliasedInputName,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add an sensitive input which is an alias to an input of an other object

Parameters:
aliasName name of the added input
aliasedObjectName the of the object being aliased. aliasedObjectName should be a simulated object ancestor of the current object
aliasedInputName name of the input aliased
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 941 of file PsSimulatedObject.h.

References _controller, _inputTable, PsController::error(), getName(), PsNameToPointerMap< PsInputNT >::getObjectOfIndex(), PsController::getPointerToSimulatedObjectNamed(), and isAncestor().

00946 {
00947    PsInputNT * redefinedInput =  _inputTable.getObjectOfIndex ( aliasName ) ;
00948    PsSensitiveInputAlias<Type> * alias = NULL ;
00949 
00950    if ( redefinedInput == NULL )
00951       {
00952          // make sure aliasedObjectName is an ancestor of object
00953          if (isAncestor(aliasedObjectName))
00954             {    
00955                PsSimulatedObject * obj = _controller.getPointerToSimulatedObjectNamed (aliasedObjectName) ;
00956                PsInputNT * input = obj->_inputTable.getObjectOfIndex( aliasedInputName );
00957                PsAbstractInput<Type> * realInput =   dynamic_cast <PsAbstractInput<Type> *> (input) ;
00958                if (realInput != NULL) 
00959                   {
00960                      if (obj != NULL) 
00961                         {
00962                            alias = _controller.template createSensitiveInputAlias<Type>(aliasName,*this,realInput,precisionLevel);
00963                         } 
00964                      else 
00965                         {
00966                            PsController::error("Impossible aliasing ") ;
00967                         } 
00968                   }
00969                else
00970                   {
00971                      PsController::error("impossible aliasing, probably because of type mismatch") ;
00972                   }
00973             }
00974          else
00975             {
00976                cerr << "PsSimulatedObject::addSensitiveInputAlias " << aliasedObjectName << " isn't the father of " 
00977                     << getName() << " : cannot create an alias of " <<  aliasedInputName << endl ;
00978                throw PsUserException("") ;
00979             }
00980       }
00981    else 
00982       {
00983          alias = dynamic_cast <PsSensitiveInputAlias<Type> * > ( redefinedInput );
00984          if ( alias == NULL )
00985             {
00986                throw PsUnallowedOverloadingException ( aliasName, getName() ) ;
00987             }
00988          else 
00989             {
00990                cerr<<"Warning : sensitiveInputAlias "<<aliasName<<" of object "<<getName()
00991                    <<" already defined. No new sensitiveInputAlias created : reference to old one used"<<endl;
00992             }
00993       }
00994    return *alias ;

template<typename Type>
PsSensitiveNotifyingInput< Type > & PsSimulatedObject::addSensitiveNotifyingInput const PsName   inputName,
bool    makeConnectable = false,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add a sensitive Notifying input to the simulated object

Parameters:
inputName name of the added input
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 792 of file PsSimulatedObject.h.

References _controller, _inputTable, getName(), and PsNameToPointerMap< PsInputNT >::getObjectOfIndex().

00796 {
00797    PsInputNT * redefinedInput = _inputTable.getObjectOfIndex ( inputName );
00798    PsSensitiveNotifyingInput<Type> * input ;
00799    if ( redefinedInput == NULL ) 
00800       {
00801            input = _controller.template createSensitiveNotifyingInput<Type>(inputName, *this, makeConnectable, precisionLevel) ; 
00802       }
00803    else 
00804       {
00805          input = dynamic_cast <PsSensitiveNotifyingInput<Type> * > ( redefinedInput ) ;
00806          if ( input == NULL )
00807             {
00808                throw PsUnallowedOverloadingException ( inputName, getName() ) ;
00809             }
00810          else 
00811             {
00812                cerr<<"Warning : sensitiveNotifyingInput "<<inputName<<" of object "<<getName()
00813                    <<" already defined. No new sensitiveNotifyingInput created : reference to old one used"<<endl;
00814             }
00815       }
00816    return *input ; 

template<typename Type>
PsSensitiveNotifyingInputAlias< Type > & PsSimulatedObject::addSensitiveNotifyingInputAlias const PsName   aliasName,
const PsName   aliasedObjectName,
const PsName   aliasedInputName,
int    precisionLevel = PsPolatorNT::defaultPrecisionLevel
 

add a sensitive Notifying input which is an alias to an input of an other object

Parameters:
aliasName name of the added input
aliasedObjectName the of the object being aliased. aliasedObjectName should be a simulated object ancestor of the current object
aliasedInputName name of the input aliased
t a pointer to the type of input, which can be obtained through TYPEINFO
makeConnectable allow other simulated objects to change the connection of the created input
precisionLevel quality of the polations associated with the created input
Returns:
a reference to the created input

Definition at line 999 of file PsSimulatedObject.h.

References _controller, _inputTable, PsController::error(), getName(), PsNameToPointerMap< PsInputNT >::getObjectOfIndex(), PsController::getPointerToSimulatedObjectNamed(), and isAncestor().

01005 {
01006    PsInputNT * redefinedInput =  _inputTable.getObjectOfIndex ( aliasName ) ;
01007    PsSensitiveNotifyingInputAlias<Type> * alias = NULL ;
01008    
01009    if ( redefinedInput == NULL )
01010       {
01011       // make sure aliasedObjectName is an ancestor of object
01012          if( isAncestor( aliasedObjectName ) )
01013             {
01014                PsSimulatedObject * obj = _controller.getPointerToSimulatedObjectNamed (aliasedObjectName) ;  
01015                PsInputNT * input = obj->_inputTable.getObjectOfIndex ( aliasedInputName);
01016                PsAbstractInput<Type> * realInput;
01017                realInput =   dynamic_cast <PsAbstractInput<Type> *> (input) ;
01018                if (realInput != NULL) 
01019                   {
01020                      if (obj != NULL) 
01021                         {
01022                            alias = _controller.template createSensitiveNotifyingInputAlias<Type>( aliasName, *this, realInput, precisionLevel);
01023                         } 
01024                      else 
01025                         {
01026                            throw PsUserException("Impossible aliasing ") ;
01027                         } 
01028                   }
01029                else 
01030                   {
01031                      PsController::error("alias type mismatch");
01032                   }
01033             }
01034          else
01035             {
01036                cerr << "PsSimulatedObject::addSensitiveSeignalingInputAlias " << aliasedObjectName 
01037                     << " isn' the father of " 
01038                     << getName() << " : creation of alias named " <<  aliasedInputName << " impossible" << endl ;
01039                throw PsUserException("");
01040             }
01041       }
01042    else 
01043       {
01044          alias = dynamic_cast <PsSensitiveNotifyingInputAlias<Type> * > ( redefinedInput );
01045          if ( alias == NULL )
01046             {
01047                throw PsUnallowedOverloadingException ( aliasName, getName() ) ;
01048             }
01049          else 
01050             {
01051                cerr<<"Warning : sensitiveNotifyingInputAlias "<<aliasName<<" of object "<<getName()
01052                    <<" already defined. No new sensitiveNotifyingInputAlias : reference to old one used"<<endl;
01053             }
01054       }
01055    return *alias ;

bool PsSimulatedObject::cancelRegistrationForSignal const PsEventIdentifier   sig [virtual]
 

cancel registration for a particular signal fired by anybody

Parameters:
sig the identifier of the signal cancelled
Returns:
true if cancelelation was successfull

Definition at line 872 of file PsSimulatedObject.cxx.

References _controller, getName(), and PsController::receiveCancellationForSignal().

00873 {
00874    return _controller.receiveCancellationForSignal(sig,getName());
00875 }

bool PsSimulatedObject::cancelRegistrationForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject &    producer
[virtual]
 

cancel registration for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal being canceled
producer the object to whom one is canceling registration
Returns:
true if cancelation was successfull

Definition at line 858 of file PsSimulatedObject.cxx.

References PsnObjectHandle::cancelRegistrationForSignal(), getController(), getName(), getObjectHandle(), and PsController::removeFromPendingRegistrations().

00859 {
00860    //unless canceling a registration for oneself during creation, the next assertion sould be verified
00861    if ( producer.getObjectHandle() != NULL )
00862       {    
00863          return producer.getObjectHandle()->cancelRegistrationForSignal ( sig, getName() ) ;
00864       }
00865    else
00866       {
00867          return getController().removeFromPendingRegistrations (sig, producer.getName(), getName() ) ;
00868       }
00869 }

bool PsSimulatedObject::cancelRegistrationForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject *    producer
[virtual]
 

cancel registration for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal being canceled
producer the object to whom one is canceling registration
Returns:
true if cancelation was successfull

Definition at line 844 of file PsSimulatedObject.cxx.

References PsnObjectHandle::cancelRegistrationForSignal(), getController(), getName(), getObjectHandle(), and PsController::removeFromPendingRegistrations().

00845 {
00846    assert ( producer != NULL ) ;
00847    //unless canceling a registration for oneself during creation, the next if sould be verified
00848    if ( producer->getObjectHandle() != NULL )
00849       {
00850          return producer->getObjectHandle()->cancelRegistrationForSignal ( sig, getName() ) ;
00851       }
00852    else
00853       {
00854          return getController().removeFromPendingRegistrations (sig, producer->getName(), getName() ) ;
00855       }
00856 }

bool PsSimulatedObject::cancelRegistrationForSignalBy const PsEventIdentifier   sig,
const PsName   producer
[virtual]
 

cancel registration for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal being canceled
producer the object to whom one is canceling registration
Returns:
true if cancelation was successfull

Definition at line 831 of file PsSimulatedObject.cxx.

References _controller, getController(), getName(), PsController::getPointerToSimulatedObjectNamed(), and PsController::removeFromPendingRegistrations().

00831                                                                                                            {
00832    PsSimulatedObject * pointerToProducer ;
00833    pointerToProducer = _controller.getPointerToSimulatedObjectNamed( producer );
00834    if (pointerToProducer != NULL) 
00835       {
00836          return cancelRegistrationForSignalBy(sig,pointerToProducer);
00837       }
00838    else 
00839       {
00840          return getController().removeFromPendingRegistrations ( sig, producer, getName() ) ;
00841       }
00842 }

void PsSimulatedObject::compute   [virtual]
 

compute evolution of this object.

Reimplemented in PsController, PsPvmBenchController< APvmController >, PsReactGlobalController, PsRealTimeController, PsBenchController< BenchedController >, PsTestObject, PsBenchController< PsMultiThreadedPvmController >, PsBenchController< PsMultiThreadedController >, PsBenchController< APvmController >, and PsPvmBenchController< PsMultiThreadedPvmController >.

Definition at line 205 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::compute().

00206 {
00207 }

PsSimulatedObject * PsSimulatedObject::createInstanceOfEncapsulatedClass const PsObjectDescriptor   objectDescriptor const [virtual]
 

create an instance of an encapsulated class

Parameters:
objectDescriptor the instance descriptor
Returns:
the corresponding simulated object if it can be created by this object, NULL otherwise

Definition at line 956 of file PsSimulatedObject.cxx.

References _encapsulatedClassesTable, map< PsName, PsSimulatedObjectCreator * >::end(), map< PsName, PsSimulatedObjectCreator * >::find(), PsObjectDescriptor::getClass(), and getController().

00957 {
00958 #ifdef _DEBUGOBJECTCREATION
00959   cerr <<"PsSimulatedObject::createInstanceOfEncapsulatedClass (...)"<<endl;
00960 #endif
00961 
00962   PsSimulatedObject * result = NULL ;
00963   PsNameToPointerMap < PsSimulatedObjectCreator >::const_iterator i = _encapsulatedClassesTable.find(objectDescriptor.getClass () ) ;
00964   if (i != _encapsulatedClassesTable.end() )
00965      {
00966         assert ( i->second != NULL ) ;
00967         result = i->second->createSimulatedObject( getController() , objectDescriptor ) ;
00968      }
00969 #ifdef _DEBUGOBJECTCREATION
00970   cerr <<"PsSimulatedObject::createInstanceOfEncapsulatedClass returns "<<result<<endl;
00971 #endif
00972   return result ;
00973 }

void PsSimulatedObject::deleteInput const PsName   inputName
 

delete an input from the list of inputs of the simulated object WARNING : consideration is being given for the removal of this member function

Parameters:
inputName the name of the input to be deleted

Definition at line 140 of file PsSimulatedObject.cxx.

References _inputTable, and map< PsName, PsInputNT * >::erase().

00140                                                       {
00141    PsInputNT * obj;
00142    obj = (_inputTable)[nom];
00143    _inputTable.erase(nom);
00144    if(obj!=NULL) {
00145       delete obj;
00146    }
00147 }

void PsSimulatedObject::eventsProcessed list< PsEvent * > &    [virtual]
 

eventsProcessed called once all the events have been handled to processEvent, and those who have been succesfully processed (processEvent having return true ) have been destroyed

Definition at line 389 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::processEvents().

00389                                                              {
00390 
00391 }

void PsSimulatedObject::extract istream &    in = cin [virtual]
 

extract pertinant information for this object from an input stream

Parameters:
in the input stream the data is extracted from. By default, this method enables outputs and control paramters to be updated in case the current simulated object is just a miroir of the simulated object doing the calculations

Implements PsFlowable.

Definition at line 398 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), map< PsName, PsOutputNT * >::end(), and getName().

00399 {
00400   PsNameToPointerMap<PsOutputNT>::iterator pOutput; // iterateur
00401   PsOutputNT *outputCourante;
00402   PsNameToPointerMap<PsOutputNT>::iterator pParam; // iterateur
00403   PsOutputNT *paramCourant;
00404 
00405   // Pour toutes les outputs, on stocke
00406   for(pOutput= _outputTable.begin(); pOutput!= _outputTable.end(); pOutput++)
00407     {
00408       outputCourante = (*pOutput).second;
00409       in >> *outputCourante;
00410     } 
00411  bool avecParam;
00412   in >> avecParam;
00413 #ifdef _DEBUGPVMMESS
00414   cerr<<endl<<avecParam<<" "<<true<<" "<<false<<endl;;
00415 #endif
00416   if (avecParam) {
00417      //cerr<<"PsSimulatedObject::extract extraction des paramètres de "<<getName()<<" ";
00418      for(pParam= _controlParameterTable.begin(); pParam!= _controlParameterTable.end(); pParam++) {
00419         paramCourant = (*pParam).second;
00420         in >> *paramCourant;
00421         //cerr<<(*pParam).first<<" ";
00422      }
00423      //cerr<<endl;
00424   }
00425 #ifdef DEBUG
00426   cout << "PsSimulatedObject::extract fin : " << getName() << endl ;
00427 #endif
00428 }

void PsSimulatedObject::finish   [virtual]
 

finish calculation of evolution.

by default, this member function does nothing. Finish is usefull in the event of having the simulation restarted whitout complete destruction of the objects

Reimplemented in PsController, and PsPvmController.

Definition at line 211 of file PsSimulatedObject.cxx.

00212 {
00213 }

void PsSimulatedObject::fireSignal const PsEventIdentifier   sig
 

fire a signal wich will be seen by anybody registred for that signal

Parameters:
sig : the event identifier to be fired

Definition at line 717 of file PsSimulatedObject.cxx.

References PsController::broadcastEventsForSignal(), getController(), getName(), getObjectHandle(), getSimulatedDate(), and PsnObjectHandle::sendEventsForSignal().

Referenced by PsController::computeScheduling().

00718 {
00719   PsEvent event(sig,getSimulatedDate(),getName(),getName()) ;
00720   //does firing a signal during creation have any sense ? yes
00721   if (getObjectHandle() != NULL ) 
00722      {
00723         getObjectHandle()->sendEventsForSignal( event , sig ) ;
00724      }
00725   else
00726      {  
00727         // no registration can have taken place, as this should only happen at object creation,
00728         // so just broadcast the signal
00729         getController().broadcastEventsForSignal ( event, sig ) ;
00730      }
00731 }

template<typename UserType>
void PsSimulatedObject::fireValuedSignal const PsEventIdentifier   sig,
const UserType &    value
 

fire a signal which carries an associated value

Parameters:
sig : the event identifier to be fired
value : the value carried by the signal

Definition at line 720 of file PsSimulatedObject.h.

References PsController::broadcastEventsForSignal(), getController(), getName(), getObjectHandle(), getSimulatedDate(), and PsnObjectHandle::sendEventsForSignal().

Referenced by PsTestObject::compute(), PsDistributedController::getPointerToSimulatedObjectNamed(), PsController::processDeleteEventOf(), and PsController::processEvent().

00722 {
00723    PsValuedEvent<UserType> event ( sig, getSimulatedDate(), getName(), getName(), value) ;
00724    if ( getObjectHandle() != NULL )
00725       {
00726          getObjectHandle()->sendEventsForSignal( event , sig ) ;
00727       }
00728    else
00729       {
00730          getController().broadcastEventsForSignal ( event, sig ) ;
00731       }

template<typename SimulatedObject>
void PsSimulatedObject::generateAndAddInstanceCreatorFor const PsName   className
 

generate an object creator for instanciation of objects of an encapsulated classe.

Parameters:
className name of this class
a pointer to an object of this type, which can be obtained through TYPEINFO (has no other use than template instanciation)

Definition at line 1211 of file PsSimulatedObject.h.

References addInstanceCreator().

const PsConfigurationParameterDescriptor * PsSimulatedObject::getConfigurationParameters   const [virtual]
 

get a pointer to the structure describing our configuration parameters

Definition at line 248 of file PsSimulatedObject.cxx.

References _objectDescriptor, and PsObjectDescriptor::getConfigurationParameters().

Referenced by PsBenchController< BenchedController >::PsBenchController().

00248                                                                                                {
00249    return _objectDescriptor.getConfigurationParameters();
00250 }

PsController & PsSimulatedObject::getController   const [virtual]
 

get the controler of the simulated object

Definition at line 194 of file PsSimulatedObject.cxx.

References _controller.

Referenced by PsController::actOnSystemEvent(), addOutputAlias(), PsnPvmDuplicatedObjectHandle::broadcastEvent(), cancelRegistrationForSignalBy(), PsOutputNT::connect(), PsInput< Type >::connect(), PsInput< Type >::connectToControlParameter(), createInstanceOfEncapsulatedClass(), fireSignal(), fireValuedSignal(), PsCalculus::getController(), PsCalculus::getSimulatedDate(), PsController::hasEventsToProcess(), PsOutput< Type >::localGet(), PsMomeOutput< Type >::PsMomeOutput(), PsnMirrorObjectHandle::PsnMirrorObjectHandle(), PsInput< Type >::realConnect(), registerForSignalBy(), PsnMirrorObjectHandle::registerToReferenceObject(), sendEvent(), PsnMirrorObjectHandle::sendRequestToReferenceObject(), sendValuedEvent(), PsOutput< Type >::set(), PsAbstractInput< Type >::setConnectable(), PsOutput< Type >::suggest(), PsnMirrorObjectHandle::unpack(), and PsnObjectHandle::~PsnObjectHandle().

00194                                                        {
00195   return _controller;
00196 }

const PsNameToPointerMap< PsOutputNT > & PsSimulatedObject::getControlParameterTable   const [virtual]
 

get a reference to the table of the simulated object's parameters

Definition at line 263 of file PsSimulatedObject.cxx.

References _controlParameterTable.

Referenced by PsCalculus::getControlParameterTable().

00264 {
00265    return _controlParameterTable ;
00266 }

const PsNameToPointerMap< PsSimulatedObjectCreator > & PsSimulatedObject::getEncapsulatedClassesTable   const [virtual]
 

get the list of encapsulated classes known to this object

Definition at line 948 of file PsSimulatedObject.cxx.

References _encapsulatedClassesTable.

00949 {
00950    return _encapsulatedClassesTable ;
00951 }

const list< PsEventListener * > & PsSimulatedObject::getEventListeners   const [virtual]
 

get a reference to the list of EventListeners

Definition at line 902 of file PsSimulatedObject.cxx.

References _listOfEventListeners.

Referenced by PsCalculus::getEventListeners(), and PsnReferenceObjectHandle::PsnReferenceObjectHandle().

00903 {
00904    return _listOfEventListeners ;
00905 }

PsSimulatedObject * PsSimulatedObject::getFather   const [virtual]
 

get the simulated object's father in the simulation tree if the simulated object has a father WARNING : if any other information than a pointer to the object simulating the father is needed, please use getFathersDescriptor() to access that information

Returns:
NULL if the simulated object has no father, a pointer to the father otherwise

Definition at line 237 of file PsSimulatedObject.cxx.

References _controller, _objectDescriptor, PsObjectDescriptor::getFathersObjectDescriptor(), PsObjectDescriptor::getName(), and PsController::getPointerToSimulatedObjectNamed().

Referenced by PsnMultiThreadedScheduler::addToScheduable(), and PsnMultiThreadedBenchmarkingScheduler::addToScheduable().

00237                                                         {
00238    //refObjet n'est pas toujours initialisé en distribué.
00239    if ( _objectDescriptor.getFathersObjectDescriptor() != NULL )
00240       {
00241          return  _controller.getPointerToSimulatedObjectNamed(_objectDescriptor.getFathersObjectDescriptor()->getName());
00242       }
00243    else
00244       {
00245          return NULL ;
00246       }
00247 }

const PsObjectDescriptor & PsSimulatedObject::getFathersDescriptor   const [virtual]
 

get the name of the simulated object's father in the simulation tree

Returns:
the descriptor of the current object if the object has no father, the father's descriptor otherwise

Definition at line 224 of file PsSimulatedObject.cxx.

References _objectDescriptor, and PsObjectDescriptor::getFathersObjectDescriptor().

00224                                                                           {
00225    if ( _objectDescriptor.getFathersObjectDescriptor () != NULL ) 
00226       {
00227          return *_objectDescriptor.getFathersObjectDescriptor () ;
00228       }
00229    else 
00230       {
00231          return _objectDescriptor ;
00232       }
00233 } 

const PsNameToPointerMap< PsInputNT > & PsSimulatedObject::getInputTable   const [virtual]
 

get a reference to the table of the simulated object's inputs

Definition at line 253 of file PsSimulatedObject.cxx.

References _inputTable.

Referenced by PsCalculus::getInputTable().

00254 {
00255    return _inputTable ;
00256 }

const PsName & PsSimulatedObject::getName   const [virtual]
 

get the name of the simulated object

Definition at line 187 of file PsSimulatedObject.cxx.

References _objectDescriptor, and PsObjectDescriptor::getName().

Referenced by PsMomeController::actOnSystemEvent(), PsController::actOnSystemEvent(), addControlParameter(), addInput(), addInputAlias(), addOutput(), addOutputAlias(), addSensitiveInput(), addSensitiveInputAlias(), addSensitiveNotifyingInput(), addSensitiveNotifyingInputAlias(), PsnPvmDuplicatedObjectHandle::broadcastEvent(), cancelRegistrationForSignal(), cancelRegistrationForSignalBy(), PsTestObject::compute(), PsnReferenceObjectHandle::compute(), PsController::computeNextSimulationStep(), PsController::computeScheduling(), PsOutputNT::connect(), PsController::createObject(), PsController::createReferenceObjectHandle(), extract(), fireSignal(), fireValuedSignal(), PsMomeOutput< Type >::get(), PsInput< Type >::get(), PsOutput< Type >::getDateOfLastExactValue(), PsOutput< Type >::getLastExactValue(), getPointerToOutputNamed(), PsDistributedController::getPointerToSimulatedObjectNamed(), PsController::getPointerToSimulatedObjectNamed(), PsController::hasEventsToProcess(), PsnReferenceObjectHandle::init(), PsController::init(), PsUnInitialisedAttributeException::insertInStream(), PsOutput< Type >::localInsert(), PsnPvmReferenceObjectHandle::makeSynchronisationMessage(), operator<(), PsnPvmReferenceObjectHandle::packInitialValues(), PsOutput< Type >::printDebuggingInformation(), PsInputAlias< Type >::printDebuggingInformation(), PsInput< Type >::printDebuggingInformation(), PsController::processDeleteEventOf(), PsController::processEvent(), PsnReferenceObjectHandle::processEvents(), PsDistributedController::processStartEventOf(), PsController::processStartEventOf(), PsMomeOutput< Type >::PsMomeOutput(), PsController::reactToControlledObjectsSystemEvents(), PsInput< Type >::realConnect(), PsDistributedController::receiveCancellationForSignal(), PsnReferenceObjectHandle::receiveEvent(), PsDistributedController::receiveRegistrationForSignal(), registerForSignal(), registerForSignalBy(), PsnMirrorObjectHandle::registerToReferenceObject(), PsnFrameScheduler::runStep(), sendEvent(), PsController::sendInitialEventsTo(), PsnMirrorObjectHandle::sendRequestToReferenceObject(), sendValuedEvent(), PsMomeOutput< Type >::set(), PsAbstractInput< Type >::setConnectable(), and PsMomeOutput< Type >::~PsMomeOutput().

00187                                                 {
00188     return _objectDescriptor.getName();
00189 }

const PsObjectDescriptor & PsSimulatedObject::getObjectDescriptor   const
 

gain access to the object descriptor

Definition at line 62 of file PsSimulatedObject.cxx.

References _objectDescriptor.

Referenced by PsnMultiThreadedScheduler::addToScheduable(), PsnMultiThreadedBenchmarkingScheduler::addToScheduable(), PsnMultiThreadedAsynchronousScheduler::addToScheduable(), PsnPvmDuplicatedObjectHandle::broadcastEvent(), PsnMirrorObjectHandle::cancelRegistrationForSignal(), PsController::deleteObject(), PsController::deleteObjectHandle(), PsCalculus::getClass(), PsCalculus::getConfigurationParameters(), PsCalculus::getFrequency(), PsCalculus::getName(), PsCalculus::getProcess(), isAncestor(), listBrothersOfType(), listDescendantsOfType(), listSonsOfType(), operator<=(), PsMomeController::prepareEventProcessing(), PsController::processDeleteEventOf(), PsMomeController::PsMomeController(), PsMomeOutput< Type >::PsMomeOutput(), PsMultiThreadedController::PsMultiThreadedController(), PsMultiThreadedPvmController::PsMultiThreadedPvmController(), PsnMirrorObjectHandle::PsnMirrorObjectHandle(), PsnObjectHandle::PsnObjectHandle(), PsnMirrorObjectHandle::receiveEvent(), PsnMirrorObjectHandle::receiveRegistrationForSignal(), PsController::scheduleObject(), PsController::sendInitialEventsTo(), and PsnMirrorObjectHandle::sendRequestToReferenceObject().

00062                                                                          {
00063    return _objectDescriptor ;
00064 }

PsnObjectHandle * PsSimulatedObject::getObjectHandle   const
 

get the object handle. Usage by the kernel.

Definition at line 48 of file PsSimulatedObject.cxx.

References _objectHandle.

Referenced by PsnMultiThreadedScheduler::addToScheduable(), PsnMultiThreadedBenchmarkingScheduler::addToScheduable(), cancelRegistrationForSignalBy(), fireSignal(), fireValuedSignal(), PsController::init(), insertInStream(), pack(), packAllValues(), PsController::reactToControlledObjectsSystemEvents(), PsGenericControlParameter< Type, AncestorClass >::realSet(), registerEventListenerForEvent(), registerForSignalBy(), PsController::scheduleControlledObjects(), sendEvent(), PsnSignalDispatcher::sendEventsForSignal(), sendValuedEvent(), and PsAttribute::touch().

00049 {
00050    return _objectHandle ;
00051 }

const PsNameToPointerMap< PsOutputNT > & PsSimulatedObject::getOutputTable   const [virtual]
 

get a reference to the table of the simulated object's outputs

Definition at line 258 of file PsSimulatedObject.cxx.

References _outputTable.

Referenced by PsCalculus::getOutputTable().

00259 {
00260    return _outputTable ;
00261 }

float PsSimulatedObject::getPeriod   const
 

getPeriod this is a shorthand for 1 / _objectDescriptor.Frequency () is expressed in seconds

Definition at line 217 of file PsSimulatedObject.cxx.

References _objectDescriptor, and PsObjectDescriptor::getFrequency().

Referenced by PsCalculus::getPeriod(), and PsnMirrorObjectHandle::sendRequestToReferenceObject().

00218 {
00219    return 1. / _objectDescriptor.getFrequency () ;
00220 }

PsOutputNT * PsSimulatedObject::getPointerToControlParameterNamed const PsName   parameterName const [virtual]
 

get a pointer to a control parameter

Parameters:
parameterName the name of the parameter looked for
Returns:
NULL if the simulated object has no parameter of name attributeName, a pointer to the parameter otherwise

Definition at line 151 of file PsSimulatedObject.cxx.

References _controlParameterTable, and PsNameToPointerMap< PsOutputNT >::getObjectOfIndex().

Referenced by PsInput< Type >::connectToControlParameter(), PsCalculus::getPointerToControlParameterNamed(), and ~PsSimulatedObject().

00151                                                                                               {
00152    return (_controlParameterTable.getObjectOfIndex (nomAtt)) ;
00153 } 

PsInputNT * PsSimulatedObject::getPointerToInputNamed const PsName   inputName const [virtual]
 

get a pointer to an input

Parameters:
inputName the name of the input looked for
Returns:
NULL if the simulated object has no input of name attributeName, a pointer to the input otherwise

Definition at line 180 of file PsSimulatedObject.cxx.

References _inputTable, and PsNameToPointerMap< PsInputNT >::getObjectOfIndex().

Referenced by PsOutputNT::connect(), PsCalculus::getPointerToInputNamed(), and ~PsSimulatedObject().

00180                                                                                   {
00181    return (_inputTable.getObjectOfIndex (nomAtt));
00182 } 

PsOutputNT * PsSimulatedObject::getPointerToOutputNamed const PsName   outputName const [virtual]
 

get a pointer to an output

Parameters:
outputName the name of the output looked for
Returns:
NULL if the simulated object has no output of name attributeName, a pointer to the output otherwise

Definition at line 157 of file PsSimulatedObject.cxx.

References _outputTable, PsController::AllWarnings, getName(), PsNameToPointerMap< PsOutputNT >::getObjectOfIndex(), and PsController::warning().

Referenced by addOutputAlias(), PsInput< Type >::connect(), PsCalculus::getPointerToOutputNamed(), and ~PsSimulatedObject().

00157                                                                                     {
00158    PsOutputNT * ref ;
00159    ref = _outputTable.getObjectOfIndex (nomAtt) ;
00160    if (ref == NULL) {
00161 #ifdef _USESSTREAM
00162       ostringstream warningMessage ;
00163       warningMessage<< "PsSimulatedObject::getPointerToOutputNamed: "
00164                     << nomAtt << " is an unknown output for object "<<getName()<<endl ;
00165       PsController::warning (warningMessage.str(), PsController::AllWarnings) ;
00166 #else
00167          ostrstream warningMessage ;
00168          warningMessage<< "PsSimulatedObject::getPointerToOutputNamed: "
00169                        << nomAtt << " is an unknown output for object "<<getName()<<endl ;
00170          warningMessage.put ('\0') ;
00171          PsController::warning (warningMessage.str(), PsController::AllWarnings) ;
00172          delete warningMessage.str() ;
00173 #endif
00174    }
00175    return ref ;
00176 } 

const PsDate & PsSimulatedObject::getSimulatedDate   const [virtual]
 

get the simulated date

Returns:
: return the current simulated date in ms

Reimplemented in PsController.

Definition at line 878 of file PsSimulatedObject.cxx.

References _controller, PsController::getSimulatedDate(), and PsDate.

Referenced by fireSignal(), fireValuedSignal(), insertInStream(), pack(), and PsnPvmReferenceObjectHandle::unpack().

00878                                                           {
00879    return _controller.getSimulatedDate();
00880 }

void PsSimulatedObject::init   [virtual]
 

initialise the object.

Use this member function for any initilisation than can only be done when all the simulated objects have been created. In particular, plugging the input of the objects should be done here. By default, this member function calls the initialisation of the associated computational object.

Reimplemented in PsController, PsnGuiController, PsMomeController, PsPvmController, PsReactController, PsReactGlobalController, PsBenchController< BenchedController >, PsBenchController< PsMultiThreadedPvmController >, PsBenchController< PsMultiThreadedController >, and PsBenchController< APvmController >.

Definition at line 199 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::init(), and PsController::reactToControlledObjectsSystemEvents().

00200 {
00201 }

void PsSimulatedObject::insertInStream ostream &    out = cout const [virtual]
 

insert pertinant information for this object in an output stream

Parameters:
out,the output stream the data is written to. By default, this method enables outputs and control paramters to be updated in case the current simulated object is a referential that has to update all it's mirrors

Implements PsFlowable.

Definition at line 671 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), PsnObjectHandle::controlParametersChanged(), map< PsName, PsOutputNT * >::end(), getObjectHandle(), getSimulatedDate(), and PsController::initialSimulationDate.

00672 {
00673   PsNameToPointerMap<PsOutputNT>::const_iterator pOutput; // iterateur
00674   PsOutputNT * outputCourante;
00675   PsNameToPointerMap<PsOutputNT>::const_iterator pParam; // iterateur
00676   PsOutputNT *paramCourant;
00677 #ifdef DEBUG
00678   cout << "PsSimulatedObject::insertInStream"<< endl ;
00679 #endif
00680 
00681   // Pour toutes les outputs, on stocke
00682   for(pOutput= _outputTable.begin(); pOutput!= _outputTable.end(); pOutput++)
00683     {
00684 #ifdef _DEBUGPVMMESS
00685        cerr<<(*pOutput).first<<" ";
00686 #endif
00687       outputCourante = (*pOutput).second;
00688       out << *outputCourante << " ";
00689 #ifdef _DEBUGPVMMESS
00690       cerr << *outputCourante << " "<<endl;
00691 #endif
00692     }  
00693   bool mettreParam = getObjectHandle()->controlParametersChanged();
00694   if(getSimulatedDate()==PsController::initialSimulationDate) mettreParam=true;
00695 #ifdef _DEBUGPVMMESS
00696   cerr<<endl<<mettreParam<<" "<<true<<" "<<false<<endl;;
00697 #endif
00698   out<<mettreParam<<" ";
00699   if(mettreParam) {
00700      for(pParam= _controlParameterTable.begin(); pParam!= _controlParameterTable.end(); pParam++) {
00701         paramCourant = (*pParam).second;
00702 #ifdef _DEBUGPVMMESS
00703         cout << (*pParam).first << " ";
00704 #endif
00705         out << *paramCourant << " ";
00706      }
00707   }
00708 #ifdef DEBUG
00709   cout << "PsSimulatedObject::insertInStream fini"<< endl ;
00710 #endif
00711 }

bool PsSimulatedObject::isAncestor const PsName   name [virtual]
 

isAncestor

Parameters:
name : the simulated object which could be an ancestor
Returns:
answer

Definition at line 884 of file PsSimulatedObject.cxx.

References PsObjectDescriptor::getFathersObjectDescriptor(), PsObjectDescriptor::getName(), and getObjectDescriptor().

Referenced by addInputAlias(), addSensitiveInputAlias(), and addSensitiveNotifyingInputAlias().

00885 {
00886    bool result = false ;
00887    const PsObjectDescriptor * ancestorDescriptor = getObjectDescriptor().getFathersObjectDescriptor() ;
00888    while ( (ancestorDescriptor != NULL) &&
00889            !result )
00890       {
00891          if ( ancestorDescriptor->getName() == name)
00892             {
00893                result = true ;
00894             }
00895          ancestorDescriptor = ancestorDescriptor->getFathersObjectDescriptor() ;
00896       }
00897    return result ;
00898 }

template<typename Type>
list< const PsObjectDescriptor * > * PsSimulatedObject::listBrothersOfType  
 

get the name of the brothers, of a certain type, of the simulated object in the simualtion tree warning : the underlying implementation relies on dynamic_cast, which implies usual restrictions on it's use in the constructor (object might not find itself)

Returns:
the list of names, which should be deleted after use

Definition at line 704 of file PsSimulatedObject.h.

References PsObjectDescriptor::getFathersObjectDescriptor(), and getObjectDescriptor().

00706 {
00707    assert ( getObjectDescriptor().getFathersObjectDescriptor() != NULL ) ;
00708    return getObjectDescriptor().getFathersObjectDescriptor()->template listSonsOfType<Type> (  );

template<typename Type>
list< const PsObjectDescriptor * > * PsSimulatedObject::listDescendantsOfType  
 

list of descendants, of a certain type, of this simulated object in the simulation tree

Parameters:
t : a pointer to an object of the type searched. Such a pointer can be obtained using the TYPEINFO macro
Returns:
the list of the descendants, which should be deleted after use

Definition at line 713 of file PsSimulatedObject.h.

References getObjectDescriptor().

Referenced by PsController::computeNextSimulationStep().

00715 {
00716    return getObjectDescriptor().template listDescendantsOfType<Type>( );

template<typename Type>
list< const PsObjectDescriptor * > * PsSimulatedObject::listSonsOfType  
 

list the sons of this object of a certain type in the simulation tree.

warning : the underlying implementation relies on dynamic_cast, which implies usual restrictions on it's use in the constructor (object might not find itself)

Returns:
the list of the sons, which should be deleted after use

Definition at line 696 of file PsSimulatedObject.h.

References getObjectDescriptor().

00698 {
00699    return getObjectDescriptor().template listSonsOfType<Type>(  );

void PsSimulatedObject::pack PsOutgoingSynchronisationMessage   const [virtual]
 

pack update information in a message

Reimplemented from PsFlowable.

Definition at line 431 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), PsSynchronisationMessage::controlParameters, PsnObjectHandle::controlParametersChanged(), map< PsName, PsOutputNT * >::end(), PsSynchronisationMessage::endOfSynchronisationFragment, getObjectHandle(), getSimulatedDate(), PsController::initialSimulationDate, and PsSynchronisationMessage::noControlParameters.

00432 {
00433    //make sure the object has been encapsulated in an object handle
00434    assert (getObjectHandle() != NULL) ;
00435 
00436 #ifdef _DEBUGPVMMESS
00437    cout << "PsSimulatedObject:"<<this<<":pack"<< endl ;
00438 #endif
00439 
00440    // store the value of all outputs
00441    for(PsNameToPointerMap<PsOutputNT>::const_iterator pOutput = _outputTable.begin(); 
00442        pOutput != _outputTable.end(); 
00443        ++pOutput)
00444      {
00445 #ifdef _DEBUGPVMMESS
00446         cerr<<(*pOutput).first<<" ";
00447 #endif
00448         pOutput->second->pack (out) ;
00449      } 
00450   
00451    bool mettreParam = ( getObjectHandle()->controlParametersChanged() ) || 
00452                       (getSimulatedDate() == PsController::initialSimulationDate) ;
00453 
00454 #ifdef _DEBUGPVMMESS
00455    cerr<<endl ;
00456    if ( mettreParam )
00457       {
00458          cerr<<"PsSimulatedObject:"<<this<<":pack: packing control parameters"<<endl;
00459       }
00460    else
00461       {
00462          cerr<<"PsSimulatedObject:"<<this<<":pack: not packing control parameters"<<endl;
00463       }
00464 #endif
00465 
00466    if(mettreParam) 
00467       {
00468          out<<PsSynchronisationMessage::controlParameters;
00469          for(PsNameToPointerMap<PsOutputNT>::const_iterator pParam= _controlParameterTable.begin(); 
00470              pParam!= _controlParameterTable.end(); 
00471              pParam++) 
00472             {
00473 #ifdef _DEBUGPVMMESS
00474                cout << (*pParam).first << " ";
00475 #endif
00476                (*pParam).second->pack(out) ;
00477             }
00478       }
00479    else
00480       {
00481          out<<PsSynchronisationMessage::noControlParameters;
00482       }
00483 #ifdef DEBUG
00484   cerr << "PsSimulatedObject:"<<this<<":pack done "<< endl ;
00485 #endif
00486   out << PsSynchronisationMessage::endOfSynchronisationFragment ;
00487 }

void PsSimulatedObject::packAllValues PsOutgoingSynchronisationMessage   const [virtual]
 

pack initial information in a message

Definition at line 489 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), PsSynchronisationMessage::controlParameters, map< PsName, PsOutputNT * >::end(), PsSynchronisationMessage::endOfSynchronisationFragment, and getObjectHandle().

Referenced by PsnPvmReferenceObjectHandle::packInitialValues().

00490 {
00491    //make sure the object has been encapsulated in an object handle
00492    assert (getObjectHandle() != NULL) ;
00493 
00494 #ifdef _DEBUGPVMMESS
00495    cout << "PsSimulatedObject:"<<this<<":packAllValues"<< endl ;
00496 #endif
00497 
00498    // store the value of all outputs
00499    for(PsNameToPointerMap<PsOutputNT>::const_iterator pOutput = _outputTable.begin(); 
00500        pOutput != _outputTable.end(); 
00501        ++pOutput)
00502      {
00503 #ifdef _DEBUGPVMMESS
00504         cerr<<(*pOutput).first<<" ";
00505 #endif
00506         pOutput->second->packAllValues (out) ;
00507      } 
00508   
00509 
00510 #ifdef _DEBUGPVMMESS
00511    cerr<<endl ;
00512    cerr<<"PsSimulatedObject:"<<this<<":pack: packing control parameters"<<endl;
00513 #endif
00514 
00515    out<<PsSynchronisationMessage::controlParameters;
00516    for(PsNameToPointerMap<PsOutputNT>::const_iterator pParam= _controlParameterTable.begin(); 
00517        pParam!= _controlParameterTable.end(); 
00518        pParam++) 
00519       {
00520 #ifdef _DEBUGPVMMESS
00521          cout << (*pParam).first << " ";
00522 #endif
00523          (*pParam).second->packAllValues(out) ;
00524       }
00525    
00526 #ifdef DEBUG
00527   cerr << "PsSimulatedObject:"<<this<<":pack done "<< endl ;
00528 #endif
00529   out << PsSynchronisationMessage::endOfSynchronisationFragment ;
00530 }

void PsSimulatedObject::prepareEventProcessing list< PsEvent * > &    [virtual]
 

prepareEventProcessing called before any events are processed if any clean up is needed after the preceeding simulation step

Reimplemented in PsMomeController.

Definition at line 381 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::processEvents().

00381                                                                     {
00382 
00383 }

bool PsSimulatedObject::processEvent PsEvent   [virtual]
 

process an event for this object.

the event will be automatically deleted if the return value of the call is true, otherwise deletion becomes the responsability of the object

Reimplemented in PsController, and PsDistributedController.

Definition at line 385 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::processEvents().

00385                                                      {
00386    return true ;
00387 }

bool PsSimulatedObject::processEventsASAP   const [virtual]
 

event processing mode.

Returns:
: true if events need to be processed at the controler's frequency rather then at the object's one normal use of this member function would be to redefine it for objects who need to process events as fast as possible. if the return value is dynamic, supprises could arise because of the use of a double buffer for the list of events.

Definition at line 375 of file PsSimulatedObject.cxx.

Referenced by PsnReferenceObjectHandle::receiveEvent().

00375                                                   {
00376     //default mode : processEvents at the object's frequency.
00377     return false ;
00378  }

void PsSimulatedObject::registerEventListenerForEvent PsEventListener   eventListener,
const PsEventIdentifier   eventId
 

eventListener registration called by the event listener for registration of the eventId listened to

Definition at line 912 of file PsSimulatedObject.cxx.

References PsEventListener::addToListenedEventIds(), and getObjectHandle().

Referenced by PsInputConnectionEventListener< Type >::registerEvents(), and PsChangedControlParameterEventListener< Type >::registerEvents().

00914 {
00915    //this member function should only be called by event listeners when registering the events they are associated to
00916    //this registration process is initiated during the creation of the assocaited object handle
00917    //therefore, the following assertion should allways be verified
00918    assert ( getObjectHandle () != NULL ); 
00919 
00920    getObjectHandle () -> registerEventListenerForEvent ( eventListener , eventId ) ;
00921 
00922    eventListener.addToListenedEventIds ( eventId ) ;
00923 }

bool PsSimulatedObject::registerForSignal const PsEventIdentifier   sig,
const PsEventIdentifier   eventId
[virtual]
 

register for a particular signal fired by anybody

Parameters:
sig the identifier of the signal registered
eventId the event identifier to be sent when sig is generated
Returns:
true if registration was successfull

Definition at line 823 of file PsSimulatedObject.cxx.

References _controller, getName(), and PsController::receiveRegistrationForSignal().

00825 {
00826    return _controller.receiveRegistrationForSignal ( sig, getName(), eventId );
00827 }

bool PsSimulatedObject::registerForSignal const PsEventIdentifier   sig [virtual]
 

register for a particular signal fired by anybody

Parameters:
sig the identifier of the signal registered, which will be the event identifier of the event generated
Returns:
true if registration was successfull

Definition at line 816 of file PsSimulatedObject.cxx.

References _controller, getName(), and PsController::receiveRegistrationForSignal().

00817 {
00818    return _controller.receiveRegistrationForSignal ( sig, getName(), sig);
00819 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject &    producer,
const PsEventIdentifier   eventId
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered
producer the object to whom one is registering
eventId the event identifier to be sent when sig is generated
Returns:
true if registration was successfull

Definition at line 796 of file PsSimulatedObject.cxx.

References PsController::addToPendingRegistrations(), getController(), getName(), getObjectHandle(), and PsnObjectHandle::receiveRegistrationForSignal().

00799 {
00800    if (producer.getObjectHandle() != NULL)
00801       {
00802          //unless registring for oneself during creation, the next if branch should allways be verified
00803          return producer.getObjectHandle()->receiveRegistrationForSignal ( sig, getName(), eventId ) ;
00804       }
00805    else 
00806       {
00807          return getController().addToPendingRegistrations (sig, 
00808                                                            producer.getName(),
00809                                                            eventId,
00810                                                            getName() ) ;
00811       }
00812 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject *    producer,
const PsEventIdentifier   eventId
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered
producer the object to whom one is registering
eventId the event identifier to be sent when sig is generated
Returns:
true if registration was successfull

Definition at line 775 of file PsSimulatedObject.cxx.

References PsController::addToPendingRegistrations(), getController(), getName(), getObjectHandle(), and PsnObjectHandle::receiveRegistrationForSignal().

00778 {
00779    assert ( producer != NULL ) ;
00780    //unless registring for oneself during creation, the next if branch should allways be verified
00781    if (producer->getObjectHandle() != NULL)
00782       {
00783          return producer->getObjectHandle()->receiveRegistrationForSignal ( sig, getName(), eventId ) ;
00784       }
00785    else 
00786       {
00787          return getController().addToPendingRegistrations (sig, 
00788                                                            producer->getName() ,
00789                                                            eventId,
00790                                                            getName() ) ;
00791       }
00792 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject &    producer
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered, which will be the event identifier of the event generated
producer the object to whom one is registering
Returns:
true if registration was successfull

Definition at line 767 of file PsSimulatedObject.cxx.

References registerForSignalBy().

00769 {
00770    return registerForSignalBy ( sig , producer , sig ) ;
00771 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
PsSimulatedObject *    producer
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered, which will be the event identifier of the event generated
producer the object to whom one is registering
Returns:
true if registration was successfull

Definition at line 759 of file PsSimulatedObject.cxx.

References registerForSignalBy().

00761 {
00762    return registerForSignalBy ( sig , producer , sig ) ;
00763 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
const PsName   producer,
const PsEventIdentifier   eventId
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered
producer the object to whom one is registering
eventId the event identifier to be sent when sig is generated (== sig by default)
Returns:
true if registration was successfull

Definition at line 741 of file PsSimulatedObject.cxx.

References _controller, PsController::addToPendingRegistrations(), getController(), getName(), PsController::getPointerToSimulatedObjectNamed(), and registerForSignalBy().

00744 {
00745    PsSimulatedObject * pointerToProducer ;
00746    pointerToProducer = _controller.getPointerToSimulatedObjectNamed ( producer );
00747    if (pointerToProducer != NULL) 
00748       {
00749          return registerForSignalBy(sig, pointerToProducer, eventId);
00750       }
00751    else 
00752       {
00753          return getController().addToPendingRegistrations ( sig , producer, eventId, getName() ) ;
00754       }
00755 }

bool PsSimulatedObject::registerForSignalBy const PsEventIdentifier   sig,
const PsName   producer
[virtual]
 

register for a signal fired by a particular simulated object

Parameters:
sig the identifier of the signal registered, which will be the event identifier of the event generated
producer the object to whom one is registering
Returns:
true if registration was successfull

Definition at line 733 of file PsSimulatedObject.cxx.

Referenced by registerForSignalBy().

00735 {
00736    return registerForSignalBy ( sig, producer, sig ) ;
00737 }

void PsSimulatedObject::sendEvent PsEvent   event
 

send the event pointed to by event warning : after this member function is called, *event should be considered as deleted, as the controler will delete it at any time : use previous member function if you want Mask to copy the event.

Parameters:
event a pointer to the event to be sent

Definition at line 290 of file PsSimulatedObject.cxx.

References _controller, PsController::addToPendingEvents(), PsEvent::date, PsEvent::eventId, getController(), getObjectHandle(), PsController::getPointerToSimulatedObjectNamed(), PsnObjectHandle::receiveEvent(), and PsEvent::receiver.

00290                                                      {
00291 #ifdef _DEBUGEVT
00292     cerr<<"PsSimulatedObject::sendEvent ( PsEvent * )"<<endl;
00293     cerr<<"   Sent "<<event->eventId<<" to "<<event->receiver <<" at "<<event->date<<endl;
00294 #endif
00295     PsSimulatedObject * objDest = _controller.getPointerToSimulatedObjectNamed( event->receiver ) ;
00296     if ( objDest == NULL ) 
00297        {
00298           getController().addToPendingEvents( event ) ; 
00299        }
00300     else if ( objDest->getObjectHandle() == NULL )
00301        {
00302           getController().addToPendingEvents( event ) ; 
00303        }
00304     else
00305        {
00306           objDest->getObjectHandle()->receiveEvent ( event ) ;
00307        }     
00308  }

void PsSimulatedObject::sendEvent const PsEvent   event
 

send an event.

the event received is a copy of event

Parameters:
event the event to be sent

Definition at line 270 of file PsSimulatedObject.cxx.

References _controller, PsController::addToPendingEvents(), PsEvent::clone(), PsEvent::date, PsEvent::eventId, getController(), getObjectHandle(), PsController::getPointerToSimulatedObjectNamed(), PsnObjectHandle::receiveEvent(), and PsEvent::receiver.

00270                                                            {
00271 #ifdef _DEBUGEVT
00272     cerr<<"PsSimulatedObject::sendEvent ( const PsEvent & )"<<endl;
00273     cerr<<"   Sent "<<event.eventId<<" to "<<event.receiver <<" at "<<event.date<<endl;
00274 #endif
00275     PsSimulatedObject * objDest = _controller.getPointerToSimulatedObjectNamed( event.receiver ) ;
00276     if ( objDest == NULL ) 
00277        {
00278           getController().addToPendingEvents( event.clone() ) ; 
00279        }
00280     else if ( objDest->getObjectHandle() == NULL )
00281        {
00282           getController().addToPendingEvents( event.clone() ) ; 
00283        }
00284     else
00285        {
00286           objDest->getObjectHandle()->receiveEvent ( event ) ;
00287        }     
00288  }

void PsSimulatedObject::sendEvent PsSimulatedObject &    receiver,
const PsEventIdentifier   eventId
 

send an event

Parameters:
receiver pointer to the receiver the simulated object the event is sent to eventId signature of the sent event

Definition at line 310 of file PsSimulatedObject.cxx.

References sendEvent().

00310                                                                                                       {
00311 #ifdef _DEBUGEVT
00312     cerr<<"PsSimulatedObject::sendEvent ( PsSimulatedObject & "<<receiver<<" const PsEventIdentifier & "<<eventId <<" )"<<endl;
00313 #endif
00314     sendEvent (&receiver, eventId ) ;
00315 #ifdef _DEBUGEVT
00316     cerr<<"PsSimulatedObject::sendEvent () fin"<<endl;
00317 #endif
00318  }

void PsSimulatedObject::sendEvent PsSimulatedObject *    receiver,
const PsEventIdentifier   eventId
 

send an event

Parameters:
receiver pointer to the receiver the simulated object the event is sent to eventId signature of the sent event

Definition at line 320 of file PsSimulatedObject.cxx.

References _controller, PsController::addToPendingEvents(), getController(), getName(), getObjectHandle(), PsController::getSimulatedDate(), and PsnObjectHandle::receiveEvent().

00320                                                                                                       {
00321 #ifdef _DEBUGEVT
00322     cerr<<"PsSimulatedObject::sendEvent ( PsSimulatedObject * "<<receiver<<" const PsEventIdentifier & "<<eventId <<" )"<<endl;
00323 #endif
00324     assert ( receiver != NULL ) ;
00325     if ( receiver->getObjectHandle() != NULL )
00326        {
00327           receiver->getObjectHandle()->receiveEvent (new PsEvent (eventId,
00328                                                                   _controller.getSimulatedDate (),
00329                                                                   getName (),
00330                                                                   receiver->getName ()) ) ;
00331        }
00332     else
00333        //could happen during creation when the object handle is not yet created.
00334        {
00335           getController().addToPendingEvents(new PsEvent (eventId,
00336                                                           _controller.getSimulatedDate (),
00337                                                           getName (),
00338                                                           receiver->getName ())  ) ; 
00339        }
00340 #ifdef _DEBUGEVT
00341     cerr<<"PsSimulatedObject::sendEvent () fin"<<endl;
00342 #endif
00343  }

void PsSimulatedObject::sendEvent const PsName   receiver,
const PsEventIdentifier   eventId
 

send an event

Parameters:
receiver name of the receiver the simulated object the event is sent to eventId signature of the sent event

Definition at line 345 of file PsSimulatedObject.cxx.

References _controller, PsController::addToPendingEvents(), getController(), getName(), getObjectHandle(), PsController::getPointerToSimulatedObjectNamed(), PsController::getSimulatedDate(), and PsnObjectHandle::receiveEvent().

Referenced by PsController::createObject(), PsController::destroyObject(), PsDistributedController::processEvent(), PsDistributedController::processNewObjectDeclaration(), PsDistributedController::receiveCancellationForSignal(), PsDistributedController::receiveRegistrationForSignal(), sendEvent(), PsController::sendInitialEventsTo(), and PsSensitiveNotifyingInput< Type >::signalChange().

00345                                                                                                  {
00346 #ifdef _DEBUGEVT
00347     cerr<<"PsSimulatedObject::sendEvent ( const PsName & , const PsEventIdentifier & )"<<endl;
00348     cerr<<"   Sent "<<eventId<<" to "<<receiver <<" at "<<_controller.getSimulatedDate ()<<endl;
00349 #endif
00350     PsSimulatedObject * objDest= _controller.getPointerToSimulatedObjectNamed( receiver ) ;
00351     if ( (objDest == NULL) ) 
00352        {
00353           getController().addToPendingEvents(new PsEvent (eventId,
00354                                                           _controller.getSimulatedDate (),
00355                                                           getName (),
00356                                                           receiver) )  ; 
00357        }
00358     else if ( objDest->getObjectHandle() == NULL )
00359        {
00360           getController().addToPendingEvents (new PsEvent (eventId,
00361                                                            _controller.getSimulatedDate (),
00362                                                            getName (),
00363                                                            receiver) ) ;
00364        }
00365     else {
00366        objDest->getObjectHandle()->receiveEvent (new PsEvent (eventId,
00367                                                               _controller.getSimulatedDate (),
00368                                                               getName (),
00369                                                               receiver) ) ;
00370     } 
00371  }

template<typename UserType>
void PsSimulatedObject::sendValuedEvent PsSimulatedObject &    receiver,
const PsEventIdentifier   eventId,
const UserType &    userInfo
 

send a valued event

Parameters:
receiver pointer to the receiver the simulated object the event is sent to
userInfo the value associated to the sent event eventId signature of the sent event

Definition at line 1189 of file PsSimulatedObject.h.

References _controller, PsController::addToPendingEvents(), getController(), getName(), getObjectHandle(), PsController::getSimulatedDate(), and PsnObjectHandle::receiveEvent().

01191 {
01192    if ( receiver.getObjectHandle() != NULL )
01193       {
01194          receiver.getObjectHandle()->receiveEvent (new PsValuedEvent<UserType> (eventId,
01195                                                                                 _controller.getSimulatedDate (),
01196                                                                                 getName (),
01197                                                                                 receiver.getName (),
01198                                                                                 userInfo) ) ;
01199       }
01200    else
01201       {
01202          getController().addToPendingEvents (new PsValuedEvent<UserType> (eventId,
01203                                                                           _controller.getSimulatedDate (),
01204                                                                           getName (),
01205                                                                           receiver.getName (),
01206                                                                           userInfo) ) ;
01207       }

template<typename UserType>
void PsSimulatedObject::sendValuedEvent PsSimulatedObject *    receiver,
const PsEventIdentifier   eventId,
const UserType &    userInfo
 

send a valued event

Parameters:
receiver pointer to the receiver the simulated object the event is sent to
userInfo the value associated to the sent event eventId signature of the sent event

Definition at line 1168 of file PsSimulatedObject.h.

References _controller, PsController::addToPendingEvents(), getController(), getName(), getObjectHandle(), PsController::getSimulatedDate(), and PsnObjectHandle::receiveEvent().

01170 {
01171    if ( receiver->getObjectHandle() != NULL )
01172       {
01173          receiver->getObjectHandle()->receiveEvent (new PsValuedEvent<UserType> (eventId,
01174                                                                                  _controller.getSimulatedDate (),
01175                                                                                  getName (),
01176                                                                                  receiver->getName (),
01177                                                                                  userInfo) ) ;
01178       }
01179    else 
01180       {
01181          getController().addToPendingEvents(new PsValuedEvent<UserType> (eventId,
01182                                                                          _controller.getSimulatedDate (),
01183                                                                          getName (),
01184                                                                          receiver->getName (),
01185                                                                          userInfo) ) ;
01186       }

template<typename UserType>
void PsSimulatedObject::sendValuedEvent const PsName   receiver,
const PsEventIdentifier   eventId,
const UserType &    userInfo
 

send a valued event

Parameters:
receiver name of the receiver the simulated object the event is sent to
userInfo the value associated to the sent event eventId signature of the sent event

Definition at line 1135 of file PsSimulatedObject.h.

References _controller, PsController::addToPendingEvents(), getController(), getName(), getObjectHandle(), PsController::getPointerToSimulatedObjectNamed(), PsController::getSimulatedDate(), and PsnObjectHandle::receiveEvent().

Referenced by PsTestObject::compute(), PsInput< Type >::realConnect(), and PsGenericControlParameter< Type, AncestorClass >::set().

01136                                                                                                                                {
01137    PsSimulatedObject * receiverObject = _controller.getPointerToSimulatedObjectNamed( receiver ) ;
01138    if ( receiverObject == NULL ) 
01139       {
01140          getController().addToPendingEvents (new PsValuedEvent<UserType> (eventId,
01141                                                                           _controller.getSimulatedDate (),
01142                                                                           getName (),
01143                                                                           receiver ,
01144                                                                           userInfo) ) ;
01145       }
01146    else 
01147       {
01148          if ( receiverObject->getObjectHandle() != NULL )
01149             {
01150                receiverObject->getObjectHandle()->receiveEvent (new PsValuedEvent<UserType> (eventId,
01151                                                                                              _controller.getSimulatedDate (),
01152                                                                                              getName (),
01153                                                                                              receiver ,
01154                                                                                              userInfo) ) ;
01155             }
01156          else 
01157             {
01158                getController().addToPendingEvents(new PsValuedEvent<UserType> (eventId,
01159                                                                                _controller.getSimulatedDate (),
01160                                                                                getName (),
01161                                                                                receiver ,
01162                                                                                userInfo) ) ;
01163             }
01164       }

void PsSimulatedObject::setObjectHandle PsnObjectHandle   objectHandle
 

set the object handle : feils if an object handle allready exists

Definition at line 54 of file PsSimulatedObject.cxx.

References _objectHandle.

Referenced by PsnObjectHandle::PsnObjectHandle().

00055 {
00056    assert ( _objectHandle == NULL ) ;
00057    _objectHandle = objectHandle ;
00058 }

void PsSimulatedObject::unpack PsIncomingSynchronisationMessage   [virtual]
 

unpack an update from a message

Reimplemented from PsFlowable.

Definition at line 533 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), PsSynchronisationMessage::controlParameters, map< PsName, PsOutputNT * >::end(), PsSynchronisationMessage::endOfSynchronisationFragment, PsSynchronisationMessage::noControlParameters, and PsName::unpack().

Referenced by PsnMirrorObjectHandle::unpack().

00534 {
00535 
00536 #ifdef _DEBUGPVMMESS
00537    cout << "PsSimulatedObject:"<<this<<":unpack"<< endl ;
00538 #endif
00539    PsName attributeName ;
00540    PsNameToPointerMap<PsOutputNT>::iterator pOutput = _outputTable.begin();
00541    
00542    
00543    attributeName.unpack( in ) ;
00544    while ( (attributeName != PsSynchronisationMessage::controlParameters)
00545            && (attributeName != PsSynchronisationMessage::noControlParameters) )
00546       {
00547          if ( pOutput->first == attributeName )
00548             {
00549                (pOutput->second)->unpack(in) ;
00550                ++pOutput ;
00551             }
00552          else
00553             {
00554                do 
00555                   {
00556                      ++pOutput ;
00557                      assert ( pOutput != _outputTable.end() ) ;// a new output has been added : not accepted
00558                   }
00559                while ( pOutput->first != attributeName ) ;
00560 
00561                (pOutput->second)->unpack ( in ) ;
00562                ++pOutput ;
00563             }
00564          attributeName.unpack ( in ) ;
00565       }
00566    
00567    if (attributeName == PsSynchronisationMessage::controlParameters) 
00568       {
00569          //the control parameters have been added to the synchronisation message
00570          pOutput =  _controlParameterTable.begin();
00571          attributeName.unpack ( in ) ;
00572          while ( attributeName != PsSynchronisationMessage::endOfSynchronisationFragment )
00573             {
00574                if ( pOutput->first == attributeName )
00575                   {
00576                      (pOutput->second)->unpack( in ) ;
00577                      ++pOutput ;
00578                   }
00579                else
00580                   {
00581                      do 
00582                         {
00583                            ++pOutput ;
00584                            assert ( pOutput != _controlParameterTable.end() ) ;// a new control parameter has been added : not accepted
00585                         }
00586                      while ( pOutput->first != attributeName ) ;
00587                      
00588                      (pOutput->second)->unpack (in) ;
00589                      ++pOutput ;
00590                   }
00591               attributeName.unpack ( in ) ;
00592             }
00593       }
00594    else
00595       {
00596          // consume the PsnPvmMessage::endOfSyncronisationMessage 
00597          attributeName.unpack ( in ) ;
00598       }    
00599 }

void PsSimulatedObject::unpackAllValues PsIncomingSynchronisationMessage   [virtual]
 

unpack all necessary info if the object is a mirror from a message

Definition at line 602 of file PsSimulatedObject.cxx.

References _controlParameterTable, _outputTable, map< PsName, PsOutputNT * >::begin(), PsSynchronisationMessage::controlParameters, map< PsName, PsOutputNT * >::end(), PsSynchronisationMessage::endOfSynchronisationFragment, PsSynchronisationMessage::noControlParameters, and PsName::unpack().

Referenced by PsnMirrorObjectHandle::unpack().

00603 {
00604 
00605 #ifdef _DEBUGPVMMESS
00606    cout << "PsSimulatedObject:"<<this<<":unpackAllValues"<< endl ;
00607 #endif
00608    PsName attributeName ;
00609    PsNameToPointerMap<PsOutputNT>::iterator pOutput = _outputTable.begin();
00610    
00611    attributeName.unpack( in ) ;
00612    while ( (attributeName != PsSynchronisationMessage::controlParameters)
00613            && (attributeName != PsSynchronisationMessage::noControlParameters) )
00614       {
00615          if ( pOutput->first == attributeName )
00616             {
00617                (pOutput->second)->unpackAllValues(in) ;
00618                ++pOutput ;
00619             }
00620          else
00621             {
00622                do 
00623                   {
00624                      ++pOutput ;
00625                      assert ( pOutput != _outputTable.end() ) ;// a new output has been added : not accepted
00626                   }
00627                while ( pOutput->first != attributeName ) ;
00628                
00629                (pOutput->second)->unpackAllValues ( in ) ;
00630                ++pOutput ;
00631             }
00632          attributeName.unpack ( in ) ;
00633       }
00634    
00635    if (attributeName == PsSynchronisationMessage::controlParameters) 
00636       {
00637          //the control parameters have been added to the synchronisation message
00638          pOutput =  _controlParameterTable.begin();
00639          attributeName.unpack ( in ) ;
00640          while ( attributeName != PsSynchronisationMessage::endOfSynchronisationFragment )
00641             {
00642                if ( pOutput->first == attributeName )
00643                   {
00644                      (pOutput->second)->unpackAllValues( in ) ;
00645                      ++pOutput ;
00646                   }
00647                else
00648                   {
00649                      do 
00650                         {
00651                            ++pOutput ;
00652                            assert ( pOutput != _controlParameterTable.end() ) ;// a new control parameter has been added : not accepted
00653                         }
00654                      while ( pOutput->first != attributeName ) ;
00655                      
00656                      (pOutput->second)->unpackAllValues (in) ;
00657                      ++pOutput ;
00658                   }
00659               attributeName.unpack ( in ) ;
00660             }
00661       }
00662    else
00663       {
00664          // consume the PsnPvmMessage::endOfSyncronisationMessage 
00665          attributeName.unpack ( in ) ;
00666       }    
00667 }


Friends And Related Function Documentation

friend class PsInputNT [friend]
 

Reimplemented in PsController.

Definition at line 665 of file PsSimulatedObject.h.


Member Data Documentation

PsController& PsSimulatedObject::_controller [protected]
 

reéférence sur le controleur

Definition at line 660 of file PsSimulatedObject.h.

Referenced by addControlParameter(), addInput(), addInputAlias(), addOutput(), addOutputAlias(), addSensitiveInput(), addSensitiveInputAlias(), addSensitiveNotifyingInput(), addSensitiveNotifyingInputAlias(), cancelRegistrationForSignal(), cancelRegistrationForSignalBy(), getController(), getFather(), getSimulatedDate(), registerForSignal(), registerForSignalBy(), PsController::scheduleObject(), sendEvent(), and sendValuedEvent().

PsNameToPointerMap<PsOutputNT> PsSimulatedObject::_controlParameterTable [protected]
 

the table of control parameters

Definition at line 673 of file PsSimulatedObject.h.

Referenced by addControlParameter(), extract(), getControlParameterTable(), getPointerToControlParameterNamed(), insertInStream(), pack(), packAllValues(), unpack(), unpackAllValues(), and ~PsSimulatedObject().

PsNameToPointerMap< PsSimulatedObjectCreator > PsSimulatedObject::_encapsulatedClassesTable [protected]
 

the table of encapsulated classes creators

Definition at line 682 of file PsSimulatedObject.h.

Referenced by addInstanceCreator(), createInstanceOfEncapsulatedClass(), getEncapsulatedClassesTable(), and ~PsSimulatedObject().

PsNameToPointerMap<PsInputNT> PsSimulatedObject::_inputTable [protected]
 

the input table

Definition at line 667 of file PsSimulatedObject.h.

Referenced by addInput(), addInputAlias(), addSensitiveInput(), addSensitiveInputAlias(), addSensitiveNotifyingInput(), addSensitiveNotifyingInputAlias(), deleteInput(), getInputTable(), getPointerToInputNamed(), PsInputNT::registerMe(), and ~PsSimulatedObject().

list<PsEventListener *> PsSimulatedObject::_listOfEventListeners [protected]
 

the list of Event listeners of that object

Definition at line 676 of file PsSimulatedObject.h.

Referenced by addEventListener(), and getEventListeners().

const PsObjectDescriptor& PsSimulatedObject::_objectDescriptor [protected]
 

référence sur le descripteur d'objet

Definition at line 663 of file PsSimulatedObject.h.

Referenced by getConfigurationParameters(), getFather(), getFathersDescriptor(), getName(), getObjectDescriptor(), getPeriod(), PsSimulatedObject(), and ~PsSimulatedObject().

PsnObjectHandle* PsSimulatedObject::_objectHandle [protected]
 

pointeur on the associated objectHandle

Definition at line 679 of file PsSimulatedObject.h.

Referenced by getObjectHandle(), PsController::hasEventsToProcess(), PsController::PsController(), setObjectHandle(), and PsController::~PsController().

PsNameToPointerMap<PsOutputNT> PsSimulatedObject::_outputTable [protected]
 

the output table

Definition at line 670 of file PsSimulatedObject.h.

Referenced by addOutput(), addOutputAlias(), extract(), getOutputTable(), getPointerToOutputNamed(), insertInStream(), pack(), packAllValues(), unpack(), unpackAllValues(), and ~PsSimulatedObject().


The documentation for this class was generated from the following files:
logo OpenMask

Documentation generated on Mon Nov 25 15:26:30 2002

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