Fawkes API  Fawkes Development Version
print_action_executor.h
1 /***************************************************************************
2  * print_action_executor.h - A simple action executor for printing
3  *
4  * Created: Tue 05 Nov 2019 14:38:28 CET 14:38
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 #pragma once
22 
23 #include "action_executor.h"
24 
25 #include <golog++/model/activity.h>
26 
27 namespace fawkes {
28 
29 class Logger;
30 
31 namespace gpp {
33 {
34 public:
35  PrintActionExecutor(Logger *logger);
36  virtual ~PrintActionExecutor();
37 
38  void start(std::shared_ptr<gologpp::Activity> activity) override;
39  void stop(std::shared_ptr<gologpp::Grounding<gologpp::Action>> activity) override;
40  bool can_execute_activity(std::shared_ptr<gologpp::Activity> activity) const override;
41 };
42 } // namespace gpp
43 } // namespace fawkes
Interface for logging.
Definition: logger.h:42
Abstract class to execute a Golog++ activity.
A Golog++ action executor that just prints a message.
PrintActionExecutor(Logger *logger)
Constructor.
void start(std::shared_ptr< gologpp::Activity > activity) override
Start the given activity.
void stop(std::shared_ptr< gologpp::Grounding< gologpp::Action >> activity) override
Stop the given activity.
bool can_execute_activity(std::shared_ptr< gologpp::Activity > activity) const override
Determine if this executor can execute the given activity.
Fawkes library namespace.