libecs::Model Class Reference
[The Model.]

Model class represents a simulation model. More...

#include <Model.hpp>

List of all members.

Public Member Functions

ECELL_API void initialize ()
 Initialize the whole model.
void step ()
 Conduct a step of the simulation.
const StepperEvent & getTopEvent () const
 Get the next event to occur on the scheduler.
const Real getCurrentTime () const
 Returns the current time.
const StepperPtr getLastStepper () const
ECELL_API PolymorphMap getClassInfo (StringCref aClassType, StringCref aClassname, Integer forceReload)
 Creates a new Entity object and register it in an appropriate System in the Model.
ECELL_API void createEntity (StringCref aClassname, FullIDCref aFullID)
 Creates a new Entity object and register it in an appropriate System in the Model.
ECELL_API EntityPtr getEntity (FullIDCref aFullID) const
 This method finds an Entity object pointed by the FullID.
ECELL_API SystemPtr getSystem (SystemPathCref aSystemPath) const
 This method finds a System object pointed by the SystemPath.
ECELL_API void createStepper (StringCref aClassname, StringCref anID)
 Create a stepper with an ID and a classname.
ECELL_API StepperPtr getStepper (StringCref anID) const
 Get a stepper by an ID.
StepperMapCref getStepperMap () const
 Get the StepperMap of this Model.
ECELL_API void flushLoggers ()
 Flush the data in all Loggers immediately.
SystemPtr getRootSystem () const
 Get the RootSystem.
SystemStepperPtr getSystemStepper () const
LoggerBrokerRef getLoggerBroker () const
 Get the LoggerBroker.
StepperEventScheduler & getScheduler ()
StepperMakerRef getStepperMaker ()
ProcessMakerRef getProcessMaker ()
VariableMakerRef getVariableMaker ()
SystemMakerRef getSystemMaker ()

Protected Types

typedef EventScheduler
< StepperEvent > 
StepperEventScheduler
typedef
StepperEventScheduler::EventIndex 
EventIndex


Detailed Description

Model class represents a simulation model.

Model has a list of Steppers and a pointer to the root system.


Member Function Documentation

ECELL_API void libecs::Model::initialize (  ) 

Initialize the whole model.

This method must be called before running the model, and when structure of the model is changed.

Procedure of the initialization is as follows:

1. Initialize Systems recursively starting from theRootSystem. ( System::initialize() ) 2. Check if all the Systems have a Stepper each. 3. Initialize Steppers. ( Stepper::initialize() ) 4. Construct Stepper interdependency graph ( Stepper::updateDependentStepperVector() )

Exceptions:
InitializationFailed 

void libecs::Model::step (  )  [inline]

Conduct a step of the simulation.

See also:
Scheduler

References libecs::EventScheduler< Event_ >::getTopEvent(), and libecs::EventScheduler< Event_ >::step().

const Real libecs::Model::getCurrentTime (  )  const [inline]

Returns the current time.

Returns:
time elasped since start of the simulation.

ECELL_API PolymorphMap libecs::Model::getClassInfo ( StringCref  aClassType,
StringCref  aClassname,
Integer  forceReload 
)

Creates a new Entity object and register it in an appropriate System in the Model.

Parameters:
aClassname 
aClassType 

ECELL_API void libecs::Model::createEntity ( StringCref  aClassname,
FullIDCref  aFullID 
)

Creates a new Entity object and register it in an appropriate System in the Model.

Parameters:
aClassname 
aFullID 
aName 

ECELL_API EntityPtr libecs::Model::getEntity ( FullIDCref  aFullID  )  const

This method finds an Entity object pointed by the FullID.

Parameters:
aFullID a FullID of the requested Entity.
Returns:
A borrowed pointer to an Entity specified by the FullID.

ECELL_API SystemPtr libecs::Model::getSystem ( SystemPathCref  aSystemPath  )  const

This method finds a System object pointed by the SystemPath.

Parameters:
aSystemPath a SystemPath of the requested System.
Returns:
A borrowed pointer to a System.

ECELL_API void libecs::Model::createStepper ( StringCref  aClassname,
StringCref  anID 
)

Create a stepper with an ID and a classname.

Parameters:
aClassname a classname of the Stepper to create.
anID a Stepper ID string of the Stepper to create.

ECELL_API StepperPtr libecs::Model::getStepper ( StringCref  anID  )  const

Get a stepper by an ID.

Parameters:
anID a Stepper ID string of the Stepper to get.
Returns:
a borrowed pointer to the Stepper.

StepperMapCref libecs::Model::getStepperMap (  )  const [inline]

Get the StepperMap of this Model.

Returns:
the const reference of the StepperMap.

ECELL_API void libecs::Model::flushLoggers (  ) 

Flush the data in all Loggers immediately.

Usually Loggers record data with logging intervals. This method orders every Logger to write the data immediately ignoring the logging interval.

SystemPtr libecs::Model::getRootSystem (  )  const [inline]

Get the RootSystem.

Returns:
a borrowed pointer to the RootSystem.

LoggerBrokerRef libecs::Model::getLoggerBroker (  )  const [inline]

Get the LoggerBroker.

Returns:
a borrowed pointer to the LoggerBroker.

StepperMakerRef libecs::Model::getStepperMaker (  )  [inline]

For internal use only.

ProcessMakerRef libecs::Model::getProcessMaker (  )  [inline]

For internal use only.

VariableMakerRef libecs::Model::getVariableMaker (  )  [inline]

For internal use only.

SystemMakerRef libecs::Model::getSystemMaker (  )  [inline]

For internal use only.


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

Generated on Tue Mar 11 03:57:12 2008 for E-CELL C++ libraries (libecs and libemc) 3.1.105 by  doxygen 1.5.5