JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
ValToPredicate.h
Go to the documentation of this file.
1 //
2 // Created by Nico Schäfer on 11/23/17.
3 //
4 
5 #ifndef JODA_VALTOPREDICATE_H
6 #define JODA_VALTOPREDICATE_H
7 
8 #include "../../../../../values/include/joda/query/values/IValueProvider.h"
9 #include "Predicate.h"
10 
11 namespace joda::query {
18  public:
19  explicit ValToPredicate(std::unique_ptr<IValueProvider> &&val);
20  explicit ValToPredicate(bool b);
21  bool check(const RapidJsonDocument &val) override;
22  bool isCompatible(Predicate *other) override;
23  std::string getType() override;
24  void accept(class PredicateVisitor &v) override;
25 
26  std::unique_ptr<ValToPredicate> duplicate() const;
27  std::unique_ptr<IValueProvider> duplicateIVal() const;
28  std::string toString() const;
29 
34  bool isConstTrue() const;
39  bool isConstFalse() const;
40 
45  void getAttributes(std::vector<std::string> &vec) const;
46  static const std::string type;
47 
48  protected:
49  std::unique_ptr<IValueProvider> val;
50 };
51 } // namespace joda::query
52 
53 #endif // JODA_VALTOPREDICATE_H
Definition: RapidJsonDocument.h:22
Definition: PredicateVisitor.h:29
Definition: Predicate.h:20
Definition: ValToPredicate.h:17
std::unique_ptr< ValToPredicate > duplicate() const
Definition: ValToPredicate.cpp:49
ValToPredicate(std::unique_ptr< IValueProvider > &&val)
Definition: ValToPredicate.cpp:39
std::unique_ptr< IValueProvider > duplicateIVal() const
Definition: ValToPredicate.cpp:71
static const std::string type
Definition: ValToPredicate.h:46
bool check(const RapidJsonDocument &val) override
Definition: ValToPredicate.cpp:8
std::string toString() const
Definition: ValToPredicate.cpp:52
void getAttributes(std::vector< std::string > &vec) const
Definition: ValToPredicate.cpp:65
std::string getType() override
Definition: ValToPredicate.cpp:31
bool isConstFalse() const
Definition: ValToPredicate.cpp:61
void accept(class PredicateVisitor &v) override
Definition: ValToPredicate.cpp:34
std::unique_ptr< IValueProvider > val
Definition: ValToPredicate.h:49
bool isConstTrue() const
Definition: ValToPredicate.cpp:58
bool isCompatible(Predicate *other) override
Definition: ValToPredicate.cpp:28
Definition: AttributeStatAggregator.h:12