#include "SimEngine.h"#include "pcsim_hash.h"#include "PCSIMException.h"#include <typeinfo>#include <map>#include <string>#include <limits>


Go to the source code of this file.
Namespaces | |
| namespace | PCSIM | 
Classes | |
| class | PCSIM::ObjectRegistryException | 
| class | SimObjectRegistry | 
| Class for registering simulation object classes.  More... | |
| class | SimObjectRegistry::FirstIndexOf | 
Defines | |
| #define | REGISTER_SCALAR_FIELD(_class_, _type_, _field_, _desc_) | 
| #define | BEGIN_REGISTER_OBJECT(T, desc, advtype) | 
| #define | END_REGISTER_OBJECT(T) } | 
Functions | |
| object_type_t | registerSimObject (SimObject *obj, AdvancePhase::enum_t phase, string const &name=string(""), string const &description=string("")) | 
| Function to be used to register a SimObject.   | |
Variables | |
| SimObjectRegistry * | theSimObjectRegistry | 
| We only need one instantiation of the SimObjectRegistry.   | |
| #define BEGIN_REGISTER_OBJECT | ( | T, | |||
| desc, | |||||
| advtype | ) | 
Value:
T T::model;                                                               \
        SimObjectInformation *T::simObjectInfo = NULL;                            \
        object_type_t T::type = 0;                                                \
        void T::registerSimObject() {                                             \
                T::type = ::registerSimObject(&T::model, advtype::enumval, #T, desc );\
        }                                                                         \
        void T::registerFields(void) {                                            \
Definition at line 104 of file SimObjectRegistry.h.
| #define END_REGISTER_OBJECT | ( | T | ) | } | 
Definition at line 115 of file SimObjectRegistry.h.
| #define REGISTER_SCALAR_FIELD | ( | _class_, | |||
| _type_, | |||||
| _field_, | |||||
| _desc_ | ) | 
Value:
if( std::numeric_limits<_type_>::is_specialized ) \ _class_::registerField( ScalarField< _type_ >( #_field_, _desc_, ( (char*)(&(_class_::model._field_))-(char*)(&_class_::model) ) ) );
Definition at line 99 of file SimObjectRegistry.h.
| object_type_t registerSimObject | ( | SimObject * | obj, | |
| AdvancePhase::enum_t | phase, | |||
| string const & |  name = string(""),  | 
        |||
| string const & |  description = string("") | |||
| ) | 
Function to be used to register a SimObject.
Definition at line 92 of file SimObjectRegistry.cpp.
References SimObjectRegistry::registerSimObject().

We only need one instantiation of the SimObjectRegistry.
Definition at line 9 of file SimObjectRegistry.cpp.
Referenced by DistributedNetwork::_addSpikeMessage_(), DistributedNetwork::_connect_(), and DistributedNetwork::getGhostID().
 1.5.5