59{
60
61
62
63
64 try {
65 XMLPlatformUtils::Initialize();
66
67 }
68
69 catch (const XMLException& toCatch) {
70
71 exit(1);
72 }
73
74
75 XercesDOMParser* signatureParser = new XercesDOMParser;
76 signatureParser->setValidationScheme(XercesDOMParser::Val_Always);
77 signatureParser->setDoNamespaces(true);
78
79
80 XercesDOMParser* sequenceParser = new XercesDOMParser;
81 sequenceParser->setValidationScheme(XercesDOMParser::Val_Always);
82 sequenceParser->setDoNamespaces(true);
83
84
85 try {
86 signatureParser->parse(signatureFile.c_str());
87
88
89 sequenceParser->parse(sequenceFile.c_str());
90
91 }
92
93 catch (const XMLException& toCatch) {
94
95 exit(1);
96 }
97 catch (const DOMException& toCatch) {
98
99 XMLPlatformUtils::Terminate();
100 exit(1);
101 }
102 catch (...) {
103
104 XMLPlatformUtils::Terminate();
105 exit(1);
106 }
107
108
109 m_Sequence_DocNode = sequenceParser->getDocument();
110 m_Signature_DocNode = signatureParser->getDocument();
111
112
113
114 if(m_first){
115 m_first=false;
116 }
117 else{
118 for (unsigned int i = 0; i < m_SignatureVec.size(); i++) delete m_SignatureVec[i];
119 for (unsigned int j = 0; j < m_SequenceVec.size(); j++) delete m_SequenceVec[j];
120 m_SignatureVec.clear();
121 m_SequenceVec.clear();
122 m_TableVector.clear();
123 m_idCriteria=0;
124 m_idSignature=0;
125 m_idSequence=0;
126 m_idItem=0;
127 }
128
129
130
131
132
133
134
135
136
137
138
139
140
141 buildSequenceList(m_Sequence_DocNode, true);
142
143
144
145
146
147
148
149
150
151
152 buildSignatureList(m_Signature_DocNode, true);
153
154
155
156 delete sequenceParser;
157 delete signatureParser;
158
160
161 m_first=false;
162 std::cout << "MyFrame init() succuss" << "criteria num=" << m_idCriteria << std::endl;
163}