reworked JLoader as JSON_Loader, will require rework of rest of obj model
This commit is contained in:
31
src/loaders/JSON_Loader.h
Normal file
31
src/loaders/JSON_Loader.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Created by phanes on 4/22/17.
|
||||
//
|
||||
|
||||
#ifndef FTESTS_JLOADER_H
|
||||
#define FTESTS_JLOADER_H
|
||||
#include "../json/json.h"
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
class JSON_Loader
|
||||
{
|
||||
private:
|
||||
Json::Value json_root;
|
||||
public:
|
||||
// constructor
|
||||
JSON_Loader();
|
||||
|
||||
// load from json file
|
||||
int load_json_file( std::string filename, bool verbose );
|
||||
|
||||
// load from std::string json
|
||||
int load_json_string( std::string input, bool verbose );
|
||||
|
||||
// return as a JSONCPP serialized object
|
||||
Json::Value as_serialized();
|
||||
std::string as_string();
|
||||
};
|
||||
#endif //FTESTS_JLOADER_H
|
||||
Reference in New Issue
Block a user