knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
CompoundFormula.h
Go to the documentation of this file.
1 /*
2  * This file is part of KnowRob, please consult
3  * https://github.com/knowrob/knowrob for license details.
4  */
5 
6 #ifndef KNOWROB_COMPOUND_FORMULA_H_
7 #define KNOWROB_COMPOUND_FORMULA_H_
8 
9 #include <ostream>
10 #include <vector>
11 #include "knowrob/terms/Term.h"
12 #include <knowrob/formulas/Formula.h>
13 
14 namespace knowrob {
18  class CompoundFormula : public Formula {
19  public:
24  CompoundFormula(FormulaType type, const std::vector<FormulaPtr> &formulae);
25 
26  virtual ~CompoundFormula() = default;
27 
31  const std::vector<FormulaPtr> &formulae() const { return formulae_; }
32 
36  virtual const char *operator_symbol() const = 0;
37 
38  // Override Printable
39  void write(std::ostream &os) const override;
40 
41  protected:
42  const std::vector<FormulaPtr> formulae_;
43 
44  bool isGround1() const;
45  };
46 }
47 
48 #endif //KNOWROB_COMPOUND_FORMULA_H_
const std::vector< FormulaPtr > & formulae() const
virtual const char * operator_symbol() const =0
virtual ~CompoundFormula()=default
const std::vector< FormulaPtr > formulae_
void write(std::ostream &os) const override
CompoundFormula(FormulaType type, const std::vector< FormulaPtr > &formulae)
FormulaType type() const
Definition: Formula.h:52
FormulaType
Definition: Formula.h:17