|
| virtual double | Simulate (double)=0 |
| | Outputs one step of the simualtion given one sample of the input. More...
|
| |
|
virtual void | GetOutputHistory (std::vector< double > &) const =0 |
| | Outputs all output samples recorded by far.
|
| |
|
virtual void | EraseOutputHistory ()=0 |
| | Deletes all recorded samples of output.
|
| |
|
virtual void | SetOutputHistory (std::vector< double > &)=0 |
| | Set output history.
|
| |
|
virtual void | SetInputHistory (std::vector< double > &)=0 |
| | Set input history.
|
| |
|
virtual void | SaveState (boost::property_tree::ptree &) const =0 |
| | Adds internal object state data to the stream object.
|
| |
|
virtual void | LoadState (boost::property_tree::ptree::value_type const &)=0 |
| | Load internal object state data from tree. Each object manages the data itself.
|
| |
|
virtual void | SetID (int)=0 |
| | Enables user to set an ID of the object. User must ensure that the name is unique.
|
| |
| virtual int | GetID () const =0 |
| | Fetches object's ID. More...
|
| |
|
virtual void | SetName (std::string &)=0 |
| | Registers a name with the object. User must ensure that the name is unique.
|
| |
| virtual const std::string & | GetName () const =0 |
| | Fetches object's name. More...
|
| |
|
virtual void | GetName (boost::property_tree::ptree &) const =0 |
| | Builds a tree containing names and types of all children nodes.
|
| |
|
virtual void | SetParent (ISISO *)=0 |
| | Sets object's parent. There can be only one parent of the same object.
|
| |
| virtual ISISO * | GetParent ()=0 |
| | Fetches object's parent pointer. More...
|
| |
|
virtual void | AddChild (std::shared_ptr< ISISO >)=0 |
| | Allows adding children to the object.
|
| |
|
virtual void | RemoveChild (std::shared_ptr< ISISO >)=0 |
| | Removes a child of the object.
|
| |
|
virtual void | GetChildren (std::list< std::weak_ptr< ISISO > > &) const =0 |
| | Fetches the list of object's children.
|
| |
| virtual bool | RemoveObject (int)=0 |
| | Allows to remove the object. Function searches all the children of the object. More...
|
| |
| virtual ISISO * | SearchObject (const std::string &)=0 |
| | Searches all the children of the object to find object with the specified name. More...
|
| |
| virtual ISISO * | FindFirstRegulator ()=0 |
| | Searches the tree for the first regulator object. Implements BFS algorithm. More...
|
| |
| virtual ObjType | GetType () const =0 |
| | Retrive object functional type. More...
|
| |
|
virtual void | SetType (ObjType)=0 |
| | Set object functional type.
|
| |
|
virtual void | SetStreamForOutput (std::shared_ptr< std::ostream >)=0 |
| | Set the output stream for object output values.
|
| |
|
virtual void | SetVariableToStoreCurrentOutput (std::weak_ptr< double >)=0 |
| | Set the variable to store the current output value.
|
| |
|
virtual void | SetVariableToStoreCurrentInput (std::weak_ptr< double >)=0 |
| | Set the variable to store the current input value.
|
| |
|
virtual void | RemoveStreamForOutput ()=0 |
| | Disable the output stream for objects input values.
|
| |
|
virtual bool | MoveObjectToFront (ISISO *FrontObject)=0 |
| | Move object to the front so it can be run first.
|
| |
|
virtual void | ResetMemory ()=0 |
| | Resets objects memory (reset generators if present).
|
| |
Intefrace to be used in the simulation loop. Part of the composite design pattern.
- Main features:
- simulate method with one input and one output,
- saving and loading state - serialization,
- enables recording both input and output of every object into i/o stream,
- can be used to create a self-organising tree,
- automatic parent/children relation handling, with only one parent and many children,
- deallocating children of the destroyed node based on smart pointers,
- searching objects using BFS or DFS algorithm.