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

PsCalculus Class Reference

This class is the base class for any computationnal object. More...

#include <PsCalculus.h>

Collaboration diagram for PsCalculus:

Collaboration graph
[legend]
List of all members.

Public Methods

cnstruction, destruction and life of this computational object.
 PsCalculus (PsSimulatedObject &object)
 constructor.

virtual ~PsCalculus ()
 Destructor.

virtual void init ()
 initialise the object.

virtual void compute ()
 compute the next simulation step

virtual void finish ()
 finish calculations, and prepare for reinitialisation.

old paradigm for user interface integration
virtual void initUserInterface ()
 initialise user interface

virtual void runUserInterfaceDuringInit ()
 use user interface before simulation begins

virtual void runUserInterface ()
 use user interface while object is running

virtual void runUserInterfaceDuringSuspend ()
 use user interface while object is suspended

virtual void terminateUserInterface ()
 kill user interface

Accessor to widely used simulated object's member function : will disapear is further versions
virtual PsControllergetController () const
 get access to our controler.

virtual const PsDategetSimulatedDate () const
 get the current simulated date

virtual PsSimulatedObjectgetSimulatedObject () const
 get our simulated object

virtual const PsNamegetName () const
virtual const PsNamegetClass () const
 get simulated object's class

virtual const PsNamegetProcess () const
 get simulated object's process

virtual const PsFrequencygetFrequency () const
 get simulated object's frequency

virtual float getPeriod () const
 get object's period (if meanningfull)

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

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 an input


Protected Attributes

PsSimulatedObject_object
 a reference to the simultaion object associated to the calculus


Detailed Description

This class is the base class for any computationnal object.

It essentialiy defines three base member functions, init, compute and finish, which are the default member function used by the simulated object. It also defines helper member functions for an easy acces to widely used simulatedObject member functions.

Author:
Siames
Version:
1.0

Definition at line 40 of file PsCalculus.h.


Constructor & Destructor Documentation

PsCalculus::PsCalculus PsSimulatedObject   object
 

constructor.

a reference to the simulated object delegating computations here, all the simulated objects have been created, with their public attributes

Definition at line 22 of file PsCalculus.cxx.

00022                                                :
00023    _object ( obj ) {
00024 
00025 }

PsCalculus::~PsCalculus   [virtual]
 

Destructor.

Definition at line 28 of file PsCalculus.cxx.

00028                          {
00029 
00030 }


Member Function Documentation

void PsCalculus::compute   [virtual]
 

compute the next simulation step

Definition at line 35 of file PsCalculus.cxx.

00036 {
00037 
00038 }

void PsCalculus::finish   [virtual]
 

finish calculations, and prepare for reinitialisation.

if data needs examining and the end of the simulation, this can be done after finish was called

Definition at line 39 of file PsCalculus.cxx.

00040 {
00041 
00042 }

const PsName & PsCalculus::getClass   const [virtual]
 

get simulated object's class

Definition at line 86 of file PsCalculus.cxx.

References _object, PsObjectDescriptor::getClass(), and PsSimulatedObject::getObjectDescriptor().

00087 {
00088    return _object.getObjectDescriptor().getClass();
00089 }

const PsConfigurationParameterDescriptor * PsCalculus::getConfigurationParameters   const [virtual]
 

get a pointer to the structure describing our configuration parameters

Definition at line 102 of file PsCalculus.cxx.

References _object, PsObjectDescriptor::getConfigurationParameters(), and PsSimulatedObject::getObjectDescriptor().

00102                                                                                         {
00103    return _object.getObjectDescriptor().getConfigurationParameters();
00104 }

PsController & PsCalculus::getController   const [virtual]
 

get access to our controler.

Returns:
reference to our controler

Definition at line 57 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getController().

00058 {
00059    return _object.getController();
00060 }

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

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

Definition at line 117 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getControlParameterTable().

00118 {
00119    return _object.getControlParameterTable () ;
00120 }

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

get a reference to the list of EventListeners

Definition at line 137 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getEventListeners().

00138 {
00139    return _object.getEventListeners() ;
00140 }

const PsFrequency & PsCalculus::getFrequency   const [virtual]
 

get simulated object's frequency

Definition at line 97 of file PsCalculus.cxx.

References _object, PsObjectDescriptor::getFrequency(), PsSimulatedObject::getObjectDescriptor(), and PsFrequency.

00097                                                     {
00098    return _object.getObjectDescriptor().getFrequency();
00099 }

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

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

Definition at line 107 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getInputTable().

00108 {
00109    return _object.getInputTable () ;
00110 }

const PsName & PsCalculus::getName   const [virtual]
 

Definition at line 80 of file PsCalculus.cxx.

References _object, PsObjectDescriptor::getName(), and PsSimulatedObject::getObjectDescriptor().

00081 {
00082    return _object.getObjectDescriptor().getName();
00083 }

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

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

Definition at line 112 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getOutputTable().

00113 {
00114    return _object.getOutputTable () ;
00115 }

float PsCalculus::getPeriod   const [virtual]
 

get object's period (if meanningfull)

Definition at line 68 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getPeriod().

00069 {
00070   return _object.getPeriod () ;
00071 }

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

get a pointer to an input

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 132 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getPointerToControlParameterNamed().

00133 {
00134    return _object.getPointerToControlParameterNamed ( parameterName ) ;
00135 }

PsInputNT * PsCalculus::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 122 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getPointerToInputNamed().

00123 {
00124    return _object.getPointerToInputNamed ( inputName ) ;
00125 }

PsOutputNT * PsCalculus::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 127 of file PsCalculus.cxx.

References _object, and PsSimulatedObject::getPointerToOutputNamed().

00128 {  
00129    return _object.getPointerToOutputNamed ( outputName ) ;
00130 }

const PsName & PsCalculus::getProcess   const [virtual]
 

get simulated object's process

Definition at line 92 of file PsCalculus.cxx.

References _object, PsSimulatedObject::getObjectDescriptor(), and PsObjectDescriptor::getProcess().

00093 {
00094    return _object.getObjectDescriptor().getProcess();
00095 }

const PsDate & PsCalculus::getSimulatedDate   const [virtual]
 

get the current simulated date

Definition at line 74 of file PsCalculus.cxx.

References _object, PsSimulatedObject::getController(), PsController::getSimulatedDate(), and PsDate.

00075 {
00076    return _object.getController().getSimulatedDate();
00077 }

PsSimulatedObject & PsCalculus::getSimulatedObject   const [virtual]
 

get our simulated object

Definition at line 62 of file PsCalculus.cxx.

References _object.

00063 {
00064    return _object ;
00065 }

void PsCalculus::init   [virtual]
 

initialise the object.

called for initilisation and reinitialisation the constructor should be used to initialise members and connections with other objects

Definition at line 31 of file PsCalculus.cxx.

00032 {
00033 
00034 }

void PsCalculus::initUserInterface   [virtual]
 

initialise user interface

Definition at line 45 of file PsCalculus.cxx.

00045                                     {
00046 }

void PsCalculus::runUserInterface   [virtual]
 

use user interface while object is running

Definition at line 49 of file PsCalculus.cxx.

00049                                    {
00050 }

void PsCalculus::runUserInterfaceDuringInit   [virtual]
 

use user interface before simulation begins

Definition at line 47 of file PsCalculus.cxx.

00047                                              {
00048 }

void PsCalculus::runUserInterfaceDuringSuspend   [virtual]
 

use user interface while object is suspended

Definition at line 51 of file PsCalculus.cxx.

00051                                                 {
00052 }

void PsCalculus::terminateUserInterface   [virtual]
 

kill user interface

Definition at line 53 of file PsCalculus.cxx.

00053                                          {
00054 }


Member Data Documentation

PsSimulatedObject& PsCalculus::_object [protected]
 

a reference to the simultaion object associated to the calculus

Definition at line 179 of file PsCalculus.h.

Referenced by getClass(), getConfigurationParameters(), getController(), getControlParameterTable(), getEventListeners(), getFrequency(), getInputTable(), getName(), getOutputTable(), getPeriod(), getPointerToControlParameterNamed(), getPointerToInputNamed(), getPointerToOutputNamed(), getProcess(), getSimulatedDate(), and getSimulatedObject().


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

Documentation generated on Mon Nov 25 15:25:52 2002

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