Fawkes API
Fawkes Development Version
|
A Golog++ action executor that just prints a message. More...
Public Member Functions | |
PrintActionExecutor (Logger *logger) | |
Constructor. More... | |
virtual | ~PrintActionExecutor () |
Destructor. More... | |
void | start (std::shared_ptr< gologpp::Activity > activity) override |
Start the given activity. More... | |
void | stop (std::shared_ptr< gologpp::Grounding< gologpp::Action >> activity) override |
Stop the given activity. More... | |
bool | can_execute_activity (std::shared_ptr< gologpp::Activity > activity) const override |
Determine if this executor can execute the given activity. More... | |
![]() | |
ActionExecutor (Logger *logger) | |
Constructor of an abstract executor. More... | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< gologpp::Activity > | running_activity_ |
A pointer to the currently running activity. More... | |
Logger * | logger_ |
The logger to use for logging messages. More... | |
A Golog++ action executor that just prints a message.
Definition at line 32 of file print_action_executor.h.
fawkes::gpp::PrintActionExecutor::PrintActionExecutor | ( | Logger * | logger | ) |
Constructor.
Initialize the executor to print with the given logger.
logger | The logger to send messages to |
Definition at line 38 of file print_action_executor.cpp.
|
virtual |
Destructor.
Definition at line 43 of file print_action_executor.cpp.
|
overridevirtual |
Determine if this executor can execute the given activity.
activity | The activity to execute. |
Implements fawkes::gpp::ActionExecutor.
Definition at line 48 of file print_action_executor.cpp.
Referenced by start().
|
overridevirtual |
Start the given activity.
activity | The activity to execute. |
Implements fawkes::gpp::ActionExecutor.
Definition at line 54 of file print_action_executor.cpp.
References can_execute_activity(), fawkes::Logger::LL_DEBUG, fawkes::Logger::LL_ERROR, fawkes::Logger::LL_INFO, fawkes::Logger::LL_NONE, fawkes::Logger::LL_WARN, fawkes::Logger::log(), and fawkes::gpp::ActionExecutor::logger_.
|
overridevirtual |
Stop the given activity.
The executor is expected to keep track of the currently executed activity. Only stop the activity if the executor is actually executing it. If the given activity is not executed by this executor, do nothing.
activity | The activity to stop. |
Implements fawkes::gpp::ActionExecutor.
Definition at line 82 of file print_action_executor.cpp.
References fawkes::Logger::log_error(), and fawkes::gpp::ActionExecutor::logger_.