#include <Simulator.hpp>
Collaboration diagram for libemc::Simulator:

Public Member Functions | |
| const libecs::PolymorphMap | getClassInfo (libecs::StringCref aClasstype, libecs::StringCref aClassname) |
| const libecs::PolymorphMap | getClassInfo (libecs::StringCref aClasstype, libecs::StringCref aClassname, const libecs::Integer forceReload) |
Stepper methods. | |
| void | createStepper (libecs::StringCref aClassname, libecs::StringCref anId) |
| Create a new Stepper in the model. | |
| void | deleteStepper (libecs::StringCref anID) |
| Delete a Stepper. | |
| const libecs::Polymorph | getStepperList () const |
| List Steppers in the model. | |
| const libecs::Polymorph | getStepperPropertyList (libecs::StringCref aStepperID) const |
| List names of properties of a Stepper. | |
| const libecs::Polymorph | getStepperPropertyAttributes (libecs::StringCref aStepperID, libecs::StringCref aPropertyName) const |
| Get attributes of a property of a Stepper. | |
| void | setStepperProperty (libecs::StringCref aStepperID, libecs::StringCref aPropertyName, libecs::PolymorphCref aValue) |
| Set a property value of a Stepper. | |
| const libecs::Polymorph | getStepperProperty (libecs::StringCref aStepperID, libecs::StringCref aPropertyName) const |
| Get a value of a property from a Stepper. | |
| void | loadStepperProperty (libecs::StringCref aStepperID, libecs::StringCref aPropertyName, libecs::PolymorphCref aValue) |
| Load a property value of a Stepper. | |
| const libecs::Polymorph | saveStepperProperty (libecs::StringCref aStepperID, libecs::StringCref aPropertyName) const |
| Get a value of a property from an Stepper. | |
| const libecs::String | getStepperClassName (libecs::StringCref aStepperID) const |
| Get class name of a Stepper. | |
Entity methods. | |
| void | createEntity (libecs::StringCref aClassname, libecs::StringCref aFullIDString) |
| Create a new Entity in the model. | |
| void | deleteEntity (libecs::StringCref aFullIDString) |
| Delete an Entity. | |
| const libecs::Polymorph | getEntityList (libecs::StringCref anEntityTypeString, libecs::StringCref aSystemPathString) const |
| Get a list of Entities in a System. | |
| const libecs::Polymorph | getEntityPropertyList (libecs::StringCref aFullIDString) const |
| List names of properties of an Entity. | |
| const bool | isEntityExist (libecs::StringCref aFullIDString) const |
| Check if an Entity object specified by a FullID exists in the model. | |
| void | setEntityProperty (libecs::StringCref aFullPNString, libecs::PolymorphCref aValue) |
| Set a property value of an Entity. | |
| const libecs::Polymorph | getEntityProperty (libecs::StringCref aFullPNString) const |
| Get a value of a property from an Entity. | |
| void | loadEntityProperty (libecs::StringCref aFullPNString, libecs::PolymorphCref aValue) |
| Load a property value of an Entity. | |
| const libecs::Polymorph | saveEntityProperty (libecs::StringCref aFullPNString) const |
| Save a value of a property from an Entity. | |
| const libecs::Polymorph | getEntityPropertyAttributes (libecs::StringCref aFullPNString) const |
| Get attributes of a property of an Entity. | |
| const libecs::String | getEntityClassName (libecs::StringCref aFullIDString) const |
| Get class name of an Entity. | |
Logger methods. | |
| void | createLogger (libecs::StringCref aFullPNString) |
| Create a Logger. | |
| void | createLogger (libecs::StringCref aFullPNString, libecs::Polymorph aParamList) |
| Create a Logger with parameters. | |
| const libecs::Polymorph | getLoggerList () const |
| List Loggers in the simulator. | |
| const libecs::DataPointVectorSharedPtr | getLoggerData (libecs::StringCref aFullPNString) const |
| const libecs::DataPointVectorSharedPtr | getLoggerData (libecs::StringCref aFullPNString, libecs::RealCref aStartTime, libecs::RealCref anEndTime) const |
| const libecs::DataPointVectorSharedPtr | getLoggerData (libecs::StringCref aFullPNString, libecs::RealCref aStartTime, libecs::RealCref anEndTime, libecs::RealCref anInterval) const |
| const libecs::Real | getLoggerStartTime (libecs::StringCref aFullPNString) const |
| const libecs::Real | getLoggerEndTime (libecs::StringCref aFullPNString) const |
| void | setLoggerMinimumInterval (libecs::StringCref aFullPNString, libecs::RealCref anInterval) |
| const libecs::Real | getLoggerMinimumInterval (libecs::StringCref aFullPNString) const |
| void | setLoggerPolicy (libecs::StringCref aFullPNString, libecs::Polymorph aParamList) |
| libecs::Polymorph | getLoggerPolicy (libecs::StringCref aFullPNString) const |
| const libecs::Integer | getLoggerSize (libecs::StringCref aFullPNString) const |
Simulator methods. | |
| void | step (const libecs::Integer aNumSteps=1) |
| Conduct a step of the simulation. | |
| const libecs::Polymorph | getNextEvent () const |
| const libecs::Real | getCurrentTime () const |
| Get current time of the simulator. | |
| void | run () |
| Run the simulation. | |
| void | run (const libecs::Real aDuration) |
| Run the simulation with a duration. | |
| void | stop () |
| Stop the simulation. | |
| void | setEventChecker (EventCheckerSharedPtr aEventChecker) |
| Set a pending event checker. | |
| void | setEventHandler (EventHandlerSharedPtrCref anEventHandler) |
| Set an event handler. | |
| const libecs::Polymorph | getDMInfo () |
Simulator class provides a unified API to the libecs, C++ library for cell modeling and simulation.
Unlike libecs::Model class, this API does involve only standard C++ types/classes, and doesn't depend on libecs classes. An only exception is Polymorph class.
The public API methods are classified into these four groups:
Model
|
||||||||||||
|
Create a new Entity in the model.
|
|
||||||||||||
|
Create a Logger with parameters. First parameter - minimum log interval dimension 0 - none, 1 - by step, 2 - by time Second parameter - behaviour when run out of disk - 0 - throw exception, 1 - overwrite data Third parameter - minimum log interval If the Logger already exists, this method does nothing.
|
|
|
Create a Logger. If the Logger already exists, this method does nothing.
|
|
||||||||||||
|
Create a new Stepper in the model.
|
|
|
Delete an Entity. This method is not supported yet. |
|
|
Delete a Stepper. This method is not supported yet. |
|
|
Get current time of the simulator.
|
|
|
Get class name of an Entity.
|
|
||||||||||||
|
Get a list of Entities in a System.
|
|
|
Get a value of a property from an Entity.
|
|
|
Get attributes of a property of an Entity. The attributes are returned as a form of boolean 2-tuple ( setable, getable ). ( 1, 0 ) means that the property is setable but not getable,,, and so on.
|
|
|
List names of properties of an Entity.
|
|
|
List Loggers in the simulator.
|
|
|
Get class name of a Stepper.
|
|
|
List Steppers in the model. a list of Steppers. |
|
||||||||||||
|
Get a value of a property from a Stepper.
|
|
||||||||||||
|
Get attributes of a property of a Stepper. The attributes are returned as a form of boolean 2-tuple ( setable, getable ). ( 1, 0 ) means that the property is setable but not getable,,, and so on.
|
|
|
List names of properties of a Stepper.
|
|
|
Check if an Entity object specified by a FullID exists in the model.
|
|
||||||||||||
|
Load a property value of an Entity.
|
|
||||||||||||||||
|
Load a property value of a Stepper.
|
|
|
Run the simulation with a duration.
|
|
|
Run the simulation.
|
|
|
Save a value of a property from an Entity.
|
|
||||||||||||
|
Get a value of a property from an Stepper.
|
|
||||||||||||
|
Set a property value of an Entity.
|
|
|
Set a pending event checker. The event checker must be a subclass of EventChecker class. This is usually used to set to form a mainloop of GUI toolkit. If you are using gtk, the event checker would call gtk_events_pending() function. While the simulation is running by the run() method, the function object given by this method is called once in several simulation steps. If it returns true, the EventHandler given by setEventHandler() method is called.
|
|
|
Set an event handler. The event handler must be a subclass of EventHandler class. If you are using gtk, it would call gtk_main_iteration() function.
|
|
||||||||||||||||
|
Set a property value of a Stepper.
|
|
|
Stop the simulation. Usually this is called from the EventHandler. |
1.4.6