JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
AndPredicate.h
Go to the documentation of this file.
1 //
2 // Created by "Nico Schaefer" on 12/9/16.
3 //
4 
5 #ifndef JODA_ANDPREDICATE_H
6 #define JODA_ANDPREDICATE_H
7 
8 #include "Predicate.h"
9 namespace joda::query {
13 class AndPredicate : public Predicate {
14  public:
15  explicit AndPredicate(std::unique_ptr<Predicate> p1,
16  std::unique_ptr<Predicate> p2);
17 
18  bool check(const RapidJsonDocument &val) override;
19  bool isCompatible(Predicate *other) override;
20  virtual std::string getType() override;
21  void accept(PredicateVisitor &v) override;
22 
23  const std::unique_ptr<Predicate>& getLHS();
24  const std::unique_ptr<Predicate>& getRHS();
25 
32  void subAccept(PredicateVisitor &v, bool lhs);
33  const static std::string type;
34 
35  friend class CNFPredicateVisitor;
37  friend class CopyPredicateVisitor;
38 
39  protected:
40  std::unique_ptr<Predicate> p1, p2;
41 };
42 } // namespace joda::query
43 
44 #endif // JODA_ANDPREDICATE_H
Definition: RapidJsonDocument.h:22
Definition: AndPredicate.h:13
bool isCompatible(Predicate *other) override
Definition: AndPredicate.cpp:15
bool check(const RapidJsonDocument &val) override
Definition: AndPredicate.cpp:11
std::unique_ptr< Predicate > p1
Definition: AndPredicate.h:40
void accept(PredicateVisitor &v) override
Definition: AndPredicate.cpp:29
static const std::string type
Definition: AndPredicate.h:33
AndPredicate(std::unique_ptr< Predicate > p1, std::unique_ptr< Predicate > p2)
Definition: AndPredicate.cpp:7
virtual std::string getType() override
Definition: AndPredicate.cpp:23
void subAccept(PredicateVisitor &v, bool lhs)
Definition: AndPredicate.cpp:31
friend class CNFtoListPredicateVisitor
Definition: AndPredicate.h:36
const std::unique_ptr< Predicate > & getLHS()
Definition: AndPredicate.cpp:39
const std::unique_ptr< Predicate > & getRHS()
Definition: AndPredicate.cpp:43
std::unique_ptr< Predicate > p2
Definition: AndPredicate.h:40
friend class CNFPredicateVisitor
Definition: AndPredicate.h:35
Definition: CopyPredicateVisitor.h:20
Definition: PredicateVisitor.h:29
Definition: Predicate.h:20
Definition: AttributeStatAggregator.h:12