#include <ConditionOnce.hpp>
Public Member Functions | |
ConditionInterface * | clone () const |
ConditionOnce (bool what) | |
virtual bool | evaluate () |
Evaluate the Condition and return the outcome. More... | |
virtual void | reset () |
virtual | ~ConditionOnce () |
Public Member Functions inherited from RTT::scripting::ConditionInterface | |
virtual ConditionInterface * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const |
virtual | ~ConditionInterface () |
Private Attributes | |
bool | _what |
bool | ran |
A conditional that evaluates the first time true and afterwards always false (or vice versa).
Definition at line 53 of file ConditionOnce.hpp.
RTT::ConditionOnce::ConditionOnce | ( | bool | what | ) |
Create a condition which will return once true or once false.
what | supply false it must return once false and supply true if it must return once true. |
Definition at line 46 of file ConditionOnce.cpp.
|
virtual |
Definition at line 49 of file ConditionOnce.cpp.
|
virtual |
The Clone Software Pattern.
Implements RTT::scripting::ConditionInterface.
Definition at line 66 of file ConditionOnce.cpp.
|
virtual |
Evaluate the Condition and return the outcome.
Implements RTT::scripting::ConditionInterface.
Definition at line 52 of file ConditionOnce.cpp.
|
virtual |
Some conditions need to be reset at some points. E.g. a scripting::ConditionDuration counts the time since the first time a Command was executed, and if this time exceeds a certain preset time, returns true. Therefore, it needs to be reset, i.e. it needs to start counting, when the command is first executed.. scripting::ConditionOnce has a similar need. This function is called at such times.
Reimplemented from RTT::scripting::ConditionInterface.
Definition at line 61 of file ConditionOnce.cpp.
|
private |
Definition at line 80 of file ConditionOnce.hpp.
|
private |
Becomes true after one evaluation after its reset() method has been called.
Definition at line 79 of file ConditionOnce.hpp.