21#include "action_executor_dispatcher.h"
23#include <core/exception.h>
24#include <golog++/model/activity.h>
42std::shared_ptr<ActionExecutor>
45 for (
auto &executor : action_executors_) {
46 if (executor->can_execute_activity(activity)) {
50 throw Exception(std::string(
"No known executor for " + activity->mapped_name()).c_str());
59 action_executors_.push_back(executor);
void add_aspect(const char *name)
Add an aspect to a thread.
Base class for exceptions in Fawkes.
void init_GologppDispatcherAspect(gpp::ActionExecutorDispatcher *dispatcher)
Init GologppDispatcherAspect.
void finalize_GologppDispatcherAspect()
Finalize the GologppDispatcherAspect.
GologppDispatcherAspect()
Constructor.
gpp::ActionExecutorDispatcher * gologpp_dispatcher
A pointer to the dispatcher that the aspect provides.
Dispatch an activity to a number of registered executors by checking all registered executors subsequ...
std::shared_ptr< ActionExecutor > get_executor(std::shared_ptr< gologpp::Activity >)
Determine the executor for a given activity.
void register_executor(std::shared_ptr< ActionExecutor > executor)
Register a new executor.
Fawkes library namespace.