Fawkes API  Fawkes Development Version
action_executor.cpp
1 /***************************************************************************
2  * action_executor.cpp - An abstract action executor for Golog++
3  *
4  * Created: Thu 03 Oct 2019 08:56:15 CEST 08:56
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 #include "action_executor.h"
22 
23 namespace fawkes {
24 namespace gpp {
25 
26 /** @class ActionExecutor
27  * Abstract class to execute a Golog++ activity.
28  * Any implementation is expected to give feedback about the execution by
29  * directly calling the activity's update function.
30  * @author Till Hofmann
31  *
32  * @fn ActionExecutor::start(std::shared_ptr<gologpp::Activity> activity)
33  * Start the given activity.
34  * @param activity The activity to execute.
35  *
36  * @fn ActionExecutor::stop(std::shared_ptr<gologpp::Activity> activity)
37  * Stop the given activity.
38  * The executor is expected to keep track of the currently executed activity.
39  * Only stop the activity if the executor is actually executing it. If the
40  * given activity is not executed by this executor, do nothing.
41  * @param activity The activity to stop.
42  *
43  * @fn ActionExecutor::can_execute_activity(std::shared_ptr<gologpp::Activity> activity)
44  * Determine if this executor can execute the given activity.
45  * @param activity The activity to execute.
46  * @return True iff the given activity can be executed by this executor.
47  *
48  * @var ActionExecutor::running_activity_
49  * A pointer to the currently running activity.
50  *
51  * @var ActionExecutor::logger_
52  * The logger to use for logging messages.
53  */
54 
55 /** Constructor of an abstract executor.
56  * @param logger The logger to use
57  */
59 {
60 }
61 
62 } // namespace gpp
63 } // namespace fawkes
Interface for logging.
Definition: logger.h:42
ActionExecutor(Logger *logger)
Constructor of an abstract executor.
Fawkes library namespace.