-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjson_preprocessor.h
More file actions
26 lines (23 loc) · 969 Bytes
/
Copy pathjson_preprocessor.h
File metadata and controls
26 lines (23 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef JSON_PREPROCESSOR_H
#define JSON_PREPROCESSOR_H
#include <string>
#include <vector>
#include "preprocessor.h"
#include "rapidjson/document.h"
#include "logger.h"
#include <map>
class json_preprocessor:public preprocessor{
private:
rapidjson::Document jsondoc;
std::vector<std::pair<std::string,std::string>> ref_ids_and_rows;
std::map<std::string,std::string> ref_ids_to_search_ref_ids;
void traverse(const rapidjson::Value::Object&,const std::string&,const unsigned int,const unsigned int,const unsigned int);
void traverseArray(const rapidjson::Value::Array&,const std::string&,const unsigned int,const unsigned int,const unsigned int,std::string&);
public:
json_preprocessor(const time_t&,const std::string&);
~json_preprocessor();
std::pair<std::string,std::string> get_row(const unsigned int) const;
std::string get_search_ref_id(const std::string&) const;
bool is_last_row(const unsigned int) const;
};
#endif