#include <SimObjectRegistry.h>
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 |
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.
SimObjectRegistry::SimObjectRegistry | ( | ) |
Definition at line 12 of file SimObjectRegistry.cpp.
SimObjectRegistry::~SimObjectRegistry | ( | ) | [virtual] |
Definition at line 20 of file SimObjectRegistry.cpp.
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().
void SimObjectRegistry::finalize | ( | ) |
Definition at line 46 of file SimObjectRegistry.cpp.
References SimObjectRegistry::FirstIndexOf::AdvancePhase1, SimObjectRegistry::FirstIndexOf::AdvancePhase2, AdvancePhase::None::enumval, AdvancePhase::Two::enumval, AdvancePhase::SpikeDriven::enumval, AdvancePhase::One::enumval, SimObjectFactory::getObjectTypeID(), SimObjectRegistry::FirstIndexOf::NoAdvance, SimObject::setObjectTypeID(), and SimObjectRegistry::FirstIndexOf::SpikeDriven.
size_t SimObjectRegistry::nRegisteredObjectTypes | ( | void | ) | [inline] |
Definition at line 88 of file SimObjectRegistry.h.
SimObject const & SimObjectRegistry::getObject | ( | object_type_t | tid | ) |
Definition at line 102 of file SimObjectRegistry.cpp.
Referenced by DistributedNetwork::_addSpikeMessage_(), DistributedNetwork::_connect_(), and DistributedNetwork::getGhostID().
SimObjectFactory const & SimObjectRegistry::getSimObjectFactory | ( | string | name | ) |
Definition at line 111 of file SimObjectRegistry.cpp.