DRDE/AusRegCliever/include/mdJSON.hpp

48 lines
840 B
C++

/*
* mdJSON.hpp
*
* Created on: Jan 28, 2014
* Author: jdaugherty
*/
#ifndef MDJSON_HPP_
#define MDJSON_HPP_
typedef void (*caseBody)(void);
typedef struct {
const char *caseName;
caseBody fBody;
const void *parms; // JSON Value
} testCase;
typedef std::map<int,testCase> testCases;
typedef std::map<string,caseBody> testFuncs;
#ifdef MD_JSON
static Json::Value root;
#else
extern Json::Value root;
#endif
class mdJSON {
private:
std::string path;
public:
bool fatal;
mdJSON() : fatal(false) {}
bool parse();
bool didDie() {return fatal;}
void die(){ fatal = true;}
void setPath(char *filePath);
bool run();
};
#endif /* MDJSON_HPP_ */