knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
Implication.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_IMPLICATION_H
7 #define KNOWROB_IMPLICATION_H
8 
9 #include "CompoundFormula.h"
10 
11 namespace knowrob {
15  class Implication : public CompoundFormula {
16  public:
22 
26  const FormulaPtr &antecedent() const { return formulae_[0]; }
27 
31  const FormulaPtr &consequent() const { return formulae_[1]; }
32 
33  // Override ConnectiveFormula
34  const char *operator_symbol() const override { return "->"; }
35 
36  protected:
37  bool isEqual(const Formula &other) const override;
38  };
39 
40 } // knowrob
41 
42 #endif //KNOWROB_IMPLICATION_H
const std::vector< FormulaPtr > formulae_
Implication(const FormulaPtr &antecedent, const FormulaPtr &consequent)
const FormulaPtr & antecedent() const
Definition: Implication.h:26
bool isEqual(const Formula &other) const override
const FormulaPtr & consequent() const
Definition: Implication.h:31
const char * operator_symbol() const override
Definition: Implication.h:34
std::shared_ptr< Formula > FormulaPtr
Definition: Formula.h:99