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