#include <loopcontrol.h>
Inheritance diagram for simth::LoopControl< T >:
Public Member Functions | |
LoopControl () | |
virtual | ~LoopControl () |
virtual const std::string & | name () const =0 |
virtual std::string | currentIteration () const =0 |
virtual std::string | lastIteration () const =0 |
virtual bool | nextIteration ()=0 |
virtual void | connectControlInterface (ControlInterface *interface)=0 |
virtual bool | reachedEnd ()=0 |
virtual void | reset ()=0 |
This abstract class is the base class of all loop controls. When processing the function next iteration, a derived class should (or must) call the function callFunc() of the connected control interfaces in order to invoke the functions wrapped by these control interfaces. A wrapped function with a certain argument list needs a certain loop control it is connected with, because the loop control has to consider this argument list when calling the wrapped function. Until now, argument lists with none and with one arbitrary argument are considered.
|
Default Constructor |
|
Default Destructor |
|
Each loop control has a unique name to be adressed in a simulation system.
Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
Returns a string that describes the current iteration value. Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
Returns a string that describes the last iteration value, i.e. the iteration value when reachedEnd() equals true. Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
In derived classes the implemented functions must provide the following behaviour: Proceed to the next iteration step. If the loop control does not reach its end, it returns true and calls the function of all connected loop interfaces. If it reaches its end, it returns false and does not call any function of the connected loop interfaces. Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
Connect the loop control to a ControlInterface: each time the function nextIteration() is called, the function of a Device that is wrapped by the given ControlInterface is called also. (This is similar to the signal slot concept of QT.)
Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
Request the state of the loop control. Returns true if the last iteration has been executed. Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |
|
Reset the state of the loop control to its starting state and calls the functions of the connected loop interface. Implemented in simth::CounterLoopControl, and simth::LinearLoopControl< T >. |