Fawkes API Fawkes Development Version
action_executor_dispatcher.h
1/***************************************************************************
2 * action_executor_dispatcher.h - Dispatch a Golog++ activity to executors
3 *
4 * Created: Thu 03 Oct 2019 10:43:28 CEST 10:43
5 * Copyright 2019 Till Hofmann <hofmann@kbsg.rwth-aachen.de>
6 ****************************************************************************/
7
8/* This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Library General Public License for more details.
17 *
18 * Read the full text in the LICENSE.GPL file in the doc directory.
19 */
20
21#ifndef FAWKES_GOLOGPP_ASPECT_ACTION_EXECUTOR_DISPATCHER_H
22#define FAWKES_GOLOGPP_ASPECT_ACTION_EXECUTOR_DISPATCHER_H
23
24#include "../action_executor.h"
25
26#include <aspect/aspect.h>
27
28namespace fawkes {
29namespace gpp {
30
32{
33public:
34 std::shared_ptr<ActionExecutor> get_executor(std::shared_ptr<gologpp::Activity>);
35 void register_executor(std::shared_ptr<ActionExecutor> executor);
36
37private:
38 std::vector<std::shared_ptr<ActionExecutor>> action_executors_;
39};
40
41} // namespace gpp
42
43class GologppDispatcherAspect : public virtual Aspect
44{
45public:
49
50protected:
52};
53
54} // namespace fawkes
55
56#endif /* !FAWKES_GOLOGPP_ASPECT_ACTION_EXECUTOR_DISPATCHER_H */
Fawkes aspect base class.
Definition: aspect.h:32
An aspect that provides access to the Golog++ Action Executor Dispatcher.
void init_GologppDispatcherAspect(gpp::ActionExecutorDispatcher *dispatcher)
Init GologppDispatcherAspect.
void finalize_GologppDispatcherAspect()
Finalize the GologppDispatcherAspect.
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.