SimObjectRegistry Class Reference

Class for registering simulation object classes. More...

#include <SimObjectRegistry.h>

Collaboration diagram for SimObjectRegistry:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimObjectRegistry ()
virtual ~SimObjectRegistry ()
object_type_t registerSimObject (SimObject *obj, AdvancePhase::enum_t phase, string const &name=string(""), string const &description=string(""))
void finalize ()
size_t nRegisteredObjectTypes (void)
SimObject const & getObject (object_type_t tid)
SimObjectFactory const & getSimObjectFactory (string name)

Classes

class  FirstIndexOf


Detailed Description

Class for registering simulation object classes.

The static field named "type" of each sim object class defines the order in which the objects are advanced and is also part of the SimObject::ID bcs objets of the same type are numbered starting from 0. The objects are advanced in ascending order of their type. No order exists within the objects of one type. The type is devided into several ranges where each of them has a special meaning. The following table explains these ranges. A range goes from its first index to <first index="" of="" next="" group>=""> - 1.

NAMING                    | First index;                        | EXPLANATION
--------------------------+-------------------------------------+-------------------------------------------------
AdvancePhase::One         | 0 (zero)                            | advance() is called and spikes are distributed
AdvancePhase::SpikeDriven | determined in SimobjcetRegistry     | These are the event driven objects
AdvancePhase::Two         | determined in SimobjcetRegistry     | advance() is called  and spikes are distributed
AdvancePhase::None        | determined in SimobjcetRegistry     | advance is not called at all

Explanation of event driven objects: advance() is called only if object is active. Activation occures either

An event driven object goes idle if advance() & ADVACNEFLAG_DEACTIVATE is true

Definition at line 58 of file SimObjectRegistry.h.


Constructor & Destructor Documentation

SimObjectRegistry::SimObjectRegistry (  ) 

Definition at line 12 of file SimObjectRegistry.cpp.

SimObjectRegistry::~SimObjectRegistry (  )  [virtual]

Definition at line 20 of file SimObjectRegistry.cpp.


Member Function Documentation

object_type_t SimObjectRegistry::registerSimObject ( SimObject obj,
AdvancePhase::enum_t  phase,
string const &  name = string(""),
string const &  description = string("") 
)

Definition at line 27 of file SimObjectRegistry.cpp.

References INVALID_OBJECT_TYPE_ID, and SimObject::setSimObjectInformation().

Referenced by registerSimObject().

Here is the call graph for this function:

void SimObjectRegistry::finalize (  ) 

size_t SimObjectRegistry::nRegisteredObjectTypes ( void   )  [inline]

Definition at line 88 of file SimObjectRegistry.h.

SimObject const & SimObjectRegistry::getObject ( object_type_t  tid  ) 

SimObjectFactory const & SimObjectRegistry::getSimObjectFactory ( string  name  ) 

Definition at line 111 of file SimObjectRegistry.cpp.


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

Generated on Wed Jul 9 16:34:53 2008 for PCSIM by  doxygen 1.5.5