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


Public Member Functions | |
| std::string | execute (yasmin::Blackboard::SharedPtr 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 () const override |
| Override to_string(). The GIL must be acquired before calling into Python. | |
| State (const Outcomes &outcomes) | |
| Shared pointer type for State. | |
Public Member Functions inherited from yasmin::State | |
| State (const Outcomes &outcomes) | |
| Shared pointer type for State. | |
| virtual | ~State ()=default |
| Virtual destructor for proper polymorphic destruction. | |
| bool | is_idle () const noexcept |
| Checks if the state is idle. | |
| bool | is_running () const noexcept |
| Checks if the state is currently running. | |
| bool | is_canceled () const noexcept |
| Checks if the state has been canceled. | |
| bool | is_completed () const noexcept |
| Checks if the state has completed execution. | |
| std::string | operator() (Blackboard::SharedPtr blackboard) |
| Executes the state and returns the outcome. | |
| Outcomes const & | get_outcomes () const noexcept |
| Gets the set of possible outcomes for this state. | |
Additional Inherited Members | |
Protected Attributes inherited from yasmin::State | |
| Outcomes | 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 Outcomes & | outcomes | ) |
|
inlineoverridevirtual |
Override to_string(). The GIL must be acquired before calling into Python.
Reimplemented from yasmin::State.