Fawkes API
Fawkes Development Version
precondition_visitor.h
1
/***************************************************************************
2
* precondition_visitor.h - A static visitor to translate a precondition
3
*
4
* Created: Mon 16 Oct 2017 18:33:34 CEST 18:33
5
* Copyright 2017 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 _PLUGINS_CLIPS_PDDL_PARSER_PRECONDITION_VISITOR_H_
22
#define _PLUGINS_CLIPS_PDDL_PARSER_PRECONDITION_VISITOR_H_
23
24
#include <pddl_parser/pddl_parser.h>
25
26
#include <boost/variant/variant.hpp>
27
#include <string>
28
#include <vector>
29
30
class
PreconditionToCLIPSFactVisitor
:
public
boost::static_visitor<std::vector<std::string>>
31
{
32
public
:
33
PreconditionToCLIPSFactVisitor
(
const
std::string &parent,
int
sub_counter,
bool
is_main =
false
);
34
std::vector<std::string>
operator()
(pddl_parser::Atom &a)
const
;
35
std::vector<std::string>
operator()
(
pddl_parser::Predicate
&p)
const
;
36
37
private
:
38
std::string parent_;
39
uint sub_counter_;
40
bool
is_main_;
41
};
42
43
#endif
/* !PLUGINS_CLIPS_PDDL_PARSER_PRECONDITION_VISITOR_H__ */
pddl_parser::Predicate
A PDDL formula (either part of a precondition or an effect(.
Definition:
pddl_ast.h:60
PreconditionToCLIPSFactVisitor::PreconditionToCLIPSFactVisitor
PreconditionToCLIPSFactVisitor(const std::string &parent, int sub_counter, bool is_main=false)
Constructor.
Definition:
precondition_visitor.cpp:41
PreconditionToCLIPSFactVisitor
Translate a PDDL precondition into CLIPS facts.
Definition:
precondition_visitor.h:31
PreconditionToCLIPSFactVisitor::operator()
std::vector< std::string > operator()(pddl_parser::Atom &a) const
Translate an Atom into a vector of strings.
Definition:
precondition_visitor.cpp:56
src
plugins
clips-pddl-parser
precondition_visitor.h
Generated by
1.8.20