DRDE/AusRegCliever/include/mdJSON.hpp

53 lines
927 B
C++

/*
* mdJSON.hpp
*
* Created on: Jan 28, 2014
* Author: jdaugherty
*/
#ifndef MDJSON_HPP_
#define MDJSON_HPP_
typedef void (*caseBody)(void);
typedef struct {
string desc;
const char *caseName;
caseBody fBody;
int parms; // Index of JSON Value in testSuite00
} testCase;
namespace ACPRODINOTE {
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_ */