-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo_generator.h
More file actions
36 lines (31 loc) · 801 Bytes
/
demo_generator.h
File metadata and controls
36 lines (31 loc) · 801 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
27
28
29
30
31
32
33
34
35
36
#include <string>
#include <fstream>
#include <rapidxml.hpp>
class ProgramGenerator {
public:
bool Parse();
bool Build();
private:
std::string xml_source = "program_test.xml";
std::string stp_source = "demo_program_steps.cc";
std::ofstream stepsOut;
int loop_count = 0;
int step_count = 0;
bool ParseLoop(rapidxml::xml_node<>* node);
bool ParseStep(rapidxml::xml_node<>* node);
bool ParsePrms(rapidxml::xml_node<>* node);
};
class ProductGenerator {
public:
ProductGenerator(const char *xml = "build_test_100.xml") :
xml_source(xml) {
};
bool Parse();
bool Build();
private:
const std::string xml_source;
std::string product_source = "demo_product.cc";
std::ofstream product_cfile;
bool ParsePCB(rapidxml::xml_node<>* node);
bool ParseProgram(rapidxml::xml_node<>* node);
};