Fawkes API  Fawkes Development Version
fawkes::gpp::ActionExecutorDispatcher Class Reference

Dispatch an activity to a number of registered executors by checking all registered executors subsequently, whether they can execute the given activity. More...

Public Member Functions

std::shared_ptr< ActionExecutorget_executor (std::shared_ptr< gologpp::Activity >)
 Determine the executor for a given activity. More...
 
void register_executor (std::shared_ptr< ActionExecutor > executor)
 Register a new executor. More...
 

Detailed Description

Dispatch an activity to a number of registered executors by checking all registered executors subsequently, whether they can execute the given activity.

The first suitable executor is used to execute the activity.

Author
Till Hofmann

Definition at line 31 of file action_executor_dispatcher.h.

Member Function Documentation

◆ get_executor()

std::shared_ptr< ActionExecutor > fawkes::gpp::ActionExecutorDispatcher::get_executor ( std::shared_ptr< gologpp::Activity >  activity)

Determine the executor for a given activity.

Check all registered executors if any of them can execute the given activity.

Parameters
activityThe activity to execute.
Returns
The executor that can execute the activity.
Exceptions
ExceptionIf no suitable executor for the given activity exists.

Definition at line 43 of file action_executor_dispatcher.cpp.

Referenced by fawkes::gpp::GologppFawkesBackend::preempt_activity().

◆ register_executor()

void fawkes::gpp::ActionExecutorDispatcher::register_executor ( std::shared_ptr< ActionExecutor executor)

Register a new executor.

Parameters
executorThe new executor

Definition at line 57 of file action_executor_dispatcher.cpp.

Referenced by fawkes::gpp::GologppFawkesBackend::GologppFawkesBackend().


The documentation for this class was generated from the following files: