DRDE/AusRegCliever/include/mdJSON.hpp

59 lines
1.1 KiB
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 testSuiteAC
} testCase;
typedef struct {
string case_name;
string case_desc;
} testDesc;
namespace ACPRODINOTE {
typedef std::map<int,testDesc> testDescs;
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_ */