|
C++ YASMIN (Yet Another State MachINe)
|
Trampoline class to enable Python classes to inherit from C++ State. More...


Public Member Functions | |
| std::string | execute (std::shared_ptr< blackboard::Blackboard > blackboard) override |
| Override execute() to call Python implementation. We wrap the C++ Blackboard in BlackboardPyWrapper before passing to Python. The GIL must be acquired before calling into Python. | |
| void | cancel_state () override |
| Override cancel_state() to call Python implementation if available. The GIL must be acquired before calling into Python. | |
| std::string | to_string () override |
| Override to_string(). The GIL must be acquired before calling into Python. | |
| State (const std::set< std::string > &outcomes) | |
| Constructs a State with a set of possible outcomes. | |
Public Member Functions inherited from yasmin::State | |
| State (const std::set< std::string > &outcomes) | |
| Constructs a State with a set of possible outcomes. | |
| StateStatus | get_status () const |
| Gets the current status of the state. | |
| bool | is_idle () const |
| Checks if the state is idle. | |
| bool | is_running () const |
| Checks if the state is currently running. | |
| bool | is_canceled () const |
| Checks if the state has been canceled. | |
| bool | is_completed () const |
| Checks if the state has completed execution. | |
| std::string | operator() (std::shared_ptr< blackboard::Blackboard > blackboard) |
| Executes the state and returns the outcome. | |
| std::set< std::string > const & | get_outcomes () |
| Gets the set of possible outcomes for this state. | |
Additional Inherited Members | |
Protected Attributes inherited from yasmin::State | |
| std::set< std::string > | outcomes |
| The possible outcomes of this state. | |
Trampoline class to enable Python classes to inherit from C++ State.
This class allows Python code to override the virtual methods of the State class, particularly the execute() method, while maintaining C++ type safety and performance.
|
inlineoverridevirtual |
Override cancel_state() to call Python implementation if available. The GIL must be acquired before calling into Python.
Reimplemented from yasmin::State.
|
inlineoverridevirtual |
Override execute() to call Python implementation. We wrap the C++ Blackboard in BlackboardPyWrapper before passing to Python. The GIL must be acquired before calling into Python.
Reimplemented from yasmin::State.
| State::State | ( | const std::set< std::string > & | outcomes | ) |
Constructs a State with a set of possible outcomes.
| outcomes | A set of possible outcomes for this state. |
|
inlineoverridevirtual |
Override to_string(). The GIL must be acquired before calling into Python.
Reimplemented from yasmin::State.