-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainCreationTest.cpp
34 lines (27 loc) · 1.31 KB
/
mainCreationTest.cpp
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
#include <iostream>
#include "sim/XMLData.hpp"
#include "sim/functions.hpp"
#include "DNA.hpp"
using namespace std;
using namespace xercesc;
int main(int argc, char **argv) {
srand(time(0));
XMLData* xml = XMLData::getInstance();
xml->parseXML("sim/codes.xml");
DNA dna = createRandomDNA();
map<string, Strand*> strands = dna.getDNAStrand();
SkinStrand* skin = (SkinStrand*) strands.find("skin")->second;
LimbStrand* limb = (LimbStrand*) strands.find("limb")->second;
EarStrand* ear = (EarStrand*) strands.find("ear")->second;
EyeStrand* eye = (EyeStrand*) strands.find("eye")->second;
MouthStrand* mouth = (MouthStrand*) strands.find("mouth")->second;
NostrilStrand* nostril = (NostrilStrand*) strands.find("nostril")->second;
cout << "========================================" << endl << "========================================" << endl << "DNA N°0" << endl;
cout << skin->toString() << "----------------------------------------" << endl;
cout << limb->toString() << "----------------------------------------" << endl;
cout << ear->toString() << "----------------------------------------" << endl;
cout << eye->toString() << "----------------------------------------" << endl;
cout << mouth->toString() << "----------------------------------------" << endl;
cout << nostril->toString() << endl;
return 0;
}