Fawkes API  Fawkes Development Version
predicate.h
1 
2 /***************************************************************************
3  * predicate.h - stn-generator
4  *
5  * Created: Sat May 6 20:16:21 2017
6  * Copyright 2017 Matthias Loebach
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef PLUGINS_PREDICATE_H_
23 #define PLUGINS_PREDICATE_H_
24 
25 #include <iostream>
26 #include <string>
27 #include <vector>
28 
29 namespace fawkes {
30 namespace stn {
31 
32 class Predicate
33 {
34 public:
35  Predicate(const std::string &name, bool condition, const std::vector<std::string> &attrs);
36  virtual ~Predicate(){};
37 
38  friend std::ostream &operator<<(std::ostream &, const Predicate &);
39  bool operator==(const Predicate &rhs);
40 
41  std::string name() const;
42  bool condition() const;
43  const std::vector<std::string> &attrs() const;
44 
45 private:
46  std::string name_;
47  bool condition_;
48  std::vector<std::string> attrs_;
49 };
50 } // namespace stn
51 } // namespace fawkes
52 #endif
fawkes::stn::Predicate::name
std::string name() const
Get the name of the predicate.
Definition: predicate.cpp:72
fawkes::stn::Predicate::attrs
const std::vector< std::string > & attrs() const
Get the attributes of the predicate.
Definition: predicate.cpp:90
fawkes
Fawkes library namespace.
fawkes::stn::Predicate::Predicate
Predicate(const std::string &name, bool condition, const std::vector< std::string > &attrs)
Constructor.
Definition: predicate.cpp:36
fawkes::stn::Predicate::operator==
bool operator==(const Predicate &rhs)
Compare two Predicates.
Definition: predicate.cpp:63
fawkes::stn::Predicate
A representation of a Predicate in the STN.
Definition: predicate.h:33
fawkes::stn::Predicate::condition
bool condition() const
Get the condition of the predicate.
Definition: predicate.cpp:81
fawkes::stn::Predicate::operator<<
friend std::ostream & operator<<(std::ostream &, const Predicate &)
Print a Predicate.
Definition: predicate.cpp:47