Template Function yasmin::pybind11_utils::add_call_operator
Defined in File pybind11_utils.hpp
Function Documentation
-
template<typename ClassType, typename StateType>
inline void yasmin::pybind11_utils::add_call_operator(ClassType &cls) Helper to define the standard call method for State classes.
This template function adds a call method that:
Accepts an optional Python blackboard object
Converts it to a C++ Blackboard using convert_blackboard_from_python
Releases the GIL to allow C++ threads to run
Calls the C++ operator() with the converted blackboard
Reacquires the GIL before returning to Python
- Template Parameters:
ClassType – The pybind11 class type
StateType – The state class type (State, StateMachine, Concurrence)
- Parameters:
cls – The pybind11 class definition