JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
RJAttributeReader.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 16/05/2019.
3 //
4 
5 #ifndef JODA_RJATTRIBUTEREADER_H
6 #define JODA_RJATTRIBUTEREADER_H
7 
8 #include <rapidjson/reader.h>
9 #include <set>
10 #include <string>
11 #include <vector>
12 
14  : public rapidjson::BaseReaderHandler<rapidjson::UTF8<>,
15  RJAttributeReader> {
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::set<std::string> &getAttributes() const;
34  void clear();
35 
36  private:
37  std::set<std::string> attributes;
38 };
39 
40 #endif // JODA_RJATTRIBUTEREADER_H
Definition: RJAttributeReader.h:15
bool Bool(bool b)
Definition: RJAttributeReader.cpp:12
bool Uint(unsigned int i)
Definition: RJAttributeReader.cpp:16
bool StartObject()
Definition: RJAttributeReader.cpp:34
bool EndArray(rapidjson::SizeType type)
Definition: RJAttributeReader.cpp:46
const std::set< std::string > & getAttributes() const
Definition: RJAttributeReader.cpp:50
bool String(const Ch *ch, rapidjson::SizeType type, bool b)
Definition: RJAttributeReader.cpp:29
bool StartArray()
Definition: RJAttributeReader.cpp:44
bool Int(int i)
Definition: RJAttributeReader.cpp:14
bool Double(double d)
Definition: RJAttributeReader.cpp:22
bool Int64(int64_t int64)
Definition: RJAttributeReader.cpp:18
bool Null()
Definition: RJAttributeReader.cpp:10
void clear()
Definition: RJAttributeReader.cpp:54
bool RawNumber(const Ch *str, rapidjson::SizeType len, bool copy)
Definition: RJAttributeReader.cpp:24
bool Key(const Ch *str, rapidjson::SizeType len, bool copy)
Definition: RJAttributeReader.cpp:36
bool Default()
Definition: RJAttributeReader.cpp:8
RJAttributeReader()
Definition: RJAttributeReader.cpp:48
bool EndObject(rapidjson::SizeType type)
Definition: RJAttributeReader.cpp:42
bool Uint64(uint64_t uint64)
Definition: RJAttributeReader.cpp:20