JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Predicate.h
Go to the documentation of this file.
1 //
2 // Created by "Nico Schaefer" on 11/25/16.
3 //
4 
5 #ifndef JODA_PREDICATE_H
6 #define JODA_PREDICATE_H
7 namespace joda::query {
8 class PredicateVisitor;
9 }
10 #include <memory>
11 
12 #include "PredicateVisitor.h"
14 
15 namespace joda::query {
20 class Predicate {
21  public:
22  virtual ~Predicate() = default;
23 
29  virtual bool check(const RapidJsonDocument &val) = 0;
30 
35  virtual bool isCompatible(Predicate *other);
36 
41  virtual std::string getType();
42 
48  virtual void accept(class PredicateVisitor &v) = 0;
49 
50  const static std::string type;
51 };
52 
53 typedef std::shared_ptr<Predicate> PredType;
54 } // namespace joda::query
55 
56 #endif // JODA_PREDICATE_H
Definition: RapidJsonDocument.h:22
Definition: PredicateVisitor.h:29
Definition: Predicate.h:20
static const std::string type
Definition: Predicate.h:50
virtual void accept(class PredicateVisitor &v)=0
virtual bool isCompatible(Predicate *other)
Definition: Predicate.cpp:7
virtual ~Predicate()=default
virtual bool check(const RapidJsonDocument &val)=0
virtual std::string getType()
Definition: Predicate.cpp:11
Definition: AttributeStatAggregator.h:12
std::shared_ptr< Predicate > PredType
Definition: Predicate.h:53