SimObjectRegistry.h File Reference

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

Include dependency graph for SimObjectRegistry.h:

This graph shows which files directly or indirectly include this file:

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

SimObjectRegistrytheSimObjectRegistry
 We only need one instantiation of the SimObjectRegistry.


Define Documentation

#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 (  )     }

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.


Function Documentation

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().

Here is the call graph for this function:


Variable Documentation

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().


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