JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
BloomAttributeHandler.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 11/09/2018.
3 //
4 
5 #ifndef JODA_RJPATHSREADER_H
6 #define JODA_RJPATHSREADER_H
7 
8 #include <rapidjson/reader.h>
9 #include <string>
10 #include <vector>
11 #define JODA_DEFAULT_PATH_DEPTH 50
12 
14  : public rapidjson::BaseReaderHandler<rapidjson::UTF8<>,
15  BloomAttributeHandler> {
16  public:
18  bool Default();
19  bool Null();
20  bool Bool(bool b);
21  bool Int(int i);
22  bool Uint(unsigned int i);
23  bool Int64(int64_t int64);
24  bool Uint64(uint64_t uint64);
25  bool Double(double d);
26  bool RawNumber(const Ch *str, rapidjson::SizeType len, bool copy);
27  bool String(const Ch *ch, rapidjson::SizeType type, bool b);
28  bool StartObject();
29  bool Key(const Ch *str, rapidjson::SizeType len, bool copy);
30  bool EndObject(rapidjson::SizeType type);
31  bool StartArray();
32  bool EndArray(rapidjson::SizeType type);
33  const std::vector<std::string> &getPaths() const;
34  void clear();
35 
36  private:
37  std::vector<std::string> stack;
38  std::vector<std::string> paths;
39  std::vector<long> arrStack;
40  void addPath();
41  void addArray();
42  void incArray();
43  void stopArray();
44  void addStack(const Ch *str, rapidjson::SizeType len);
45  void popStack();
46 };
47 
48 #endif // JODA_RJPATHSREADER_H
Definition: BloomAttributeHandler.h:15
bool Key(const Ch *str, rapidjson::SizeType len, bool copy)
Definition: BloomAttributeHandler.cpp:72
BloomAttributeHandler()
Definition: BloomAttributeHandler.cpp:99
bool EndObject(rapidjson::SizeType type)
Definition: BloomAttributeHandler.cpp:79
bool String(const Ch *ch, rapidjson::SizeType type, bool b)
Definition: BloomAttributeHandler.cpp:60
bool StartObject()
Definition: BloomAttributeHandler.cpp:67
bool Uint(unsigned int i)
Definition: BloomAttributeHandler.cpp:28
const std::vector< std::string > & getPaths() const
Definition: BloomAttributeHandler.cpp:115
bool Null()
Definition: BloomAttributeHandler.cpp:10
bool StartArray()
Definition: BloomAttributeHandler.cpp:86
bool Default()
Definition: BloomAttributeHandler.cpp:8
bool EndArray(rapidjson::SizeType type)
Definition: BloomAttributeHandler.cpp:91
bool Int64(int64_t int64)
Definition: BloomAttributeHandler.cpp:34
bool Bool(bool b)
Definition: BloomAttributeHandler.cpp:16
bool Int(int i)
Definition: BloomAttributeHandler.cpp:22
bool Double(double d)
Definition: BloomAttributeHandler.cpp:46
bool Uint64(uint64_t uint64)
Definition: BloomAttributeHandler.cpp:40
void clear()
Definition: BloomAttributeHandler.cpp:135
bool RawNumber(const Ch *str, rapidjson::SizeType len, bool copy)
Definition: BloomAttributeHandler.cpp:52