My Project
OSgLParserData.cpp
Go to the documentation of this file.
1/* $Id: OSgLParserData.cpp 3710 2010-10-04 03:39:42Z Gassmann $ */
14#include "OSgLParserData.h"
15#include <stdio.h>
16
17
19{
20 if (osglIntArray != NULL)
21 delete[] osglIntArray;
22 osglIntArray = NULL;
23 if (osglDblArray != NULL)
24 delete[] osglDblArray;
25 osglDblArray = NULL;
26 if (osglValArray != NULL)
27 delete[] osglValArray;
28 osglValArray = NULL;
29}//~OSgLParserData
30
31
33 osglIntArray(NULL),
34 osglCounter(0),
35 osglTempint(0),
36 osglDblArray(NULL),
37 osglValArray(NULL),
38
39 fileName(""),
40 source(""),
41 fileCreator(""),
42 licence(""),
43 fileNamePresent(false),
44 sourcePresent(false),
45 fileCreatorPresent(false),
46 licencePresent(false),
47
48 parser_errors(""),
51 matrix(NULL),
55 matrixVarIndexes(NULL),
56 matrixObjIndexes(NULL),
57 matrixConIndexes(NULL),
60 tempC(NULL),
61
64 numberOfConPresent(false),
67 numberOfElPresent(false),
74 numberOfObjPresent(false),
79 numberOfVarPresent(false),
82
83 base64SizePresent(false),
89 blockRowIdxPresent(false),
90 blockColIdxPresent(false),
91 coefPresent(false),
92 constantPresent(false),
93 idxPresent(false),
94 incrPresent(false),
98 multPresent(false),
102
103 numberOfBlocks(-1),
104 numberOfColumns(-1),
105 numberOfCon(-1),
106 numberOfConIdx(-1),
108 numberOfEl(-1),
110 numberOfItems(-1),
115 numberOfObj(1),
116 numberOfObjIdx(-1),
118 numberOfRows(-1),
119 numberOfValues(-1),
120 numberOfVar(-1),
121 numberOfVarIdx(-1),
123
124 base64Size(0),
125 baseMatrixIdx(-1),
130 blockRowIdx(-1),
131 blockColIdx(-1),
132 coef(0.0),
133 constant(0.0),
134 idx(-1),
135 incr(1),
136 matrixConIdx(-1),
137 matrixObjIdx(-1),
138 matrixVarIdx(-1),
139 mult(1),
143
145 categoryPresent(false),
146 conTypePresent(false),
147 descriptionPresent(false),
148 enumTypePresent(false),
150 matrixNamePresent(false),
152 matrixTypePresent(false),
154 namePresent(false),
155 objTypePresent(false),
156 rowMajorPresent(false),
157 shapePresent(false),
158 solverPresent(false),
159 symmetryPresent(false),
160 typePresent(false),
161 unitPresent(false),
162 valuePresent(false),
163 valueTypePresent(false),
164 varTypePresent(false),
165
166 baseTranspose(""),
167 category(""),
168 conType(""),
169 description(""),
170 enumType(""),
171 matrixConType(""),
172 matrixName(""),
173 matrixObjType(""),
174 matrixType(""),
175 matrixVarType(""),
176 name(""),
177 objType(""),
178 rowMajor(""),
179 shape(""),
180 solver(""),
181 symmetry(""),
182 type(""),
183 unit(""),
184 value(""),
185 valueType(""),
186 varType("")
187
188
189/*
190=================================
191 symmetry(""),
192 symmetryPresent(false),
193 name(""),
194 type(""),
195 idx(-1),
196 namePresent(false),
197 typePresent(false),
198 idxPresent(false),
199 numberOfBlocks(-1),
200 numberOfColumns(-1),
201 numberOfRows(-1),
202 baseMatrixIdx(-1),
203 targetMatrixFirstRow(0),
204 targetMatrixFirstCol(0),
205 baseMatrixStartRow(0),
206 baseMatrixStartCol(0),
207 baseMatrixEndRow(-1),
208 baseMatrixEndCol(-1),
209 baseTranspose(false),
210 scalarMultiplier(0.0),
211 baseMatrixIdxPresent(false),
212 targetMatrixFirstRowPresent(false),
213 targetMatrixFirstColPresent(false),
214 baseMatrixStartRowPresent(false),
215 baseMatrixStartColPresent(false),
216 baseMatrixEndRowPresent(false),
217 baseMatrixEndColPresent(false),
218 baseTransposePresent(false),
219 scalarMultiplierPresent(false),
220 rowMajorPresent(false),
221 rowMajor(false),
222 blockRowIdx(-1),
223 blockRowIdxPresent(false),
224 blockColIdx(-1),
225 blockColIdxPresent(false),
226 osglConstantPresent(false),
227 osglCoefPresent(false),
228 osglCoef(0.0),
229 numberOfBlocksPresent(false),
230 numberOfColumnsPresent(false),
231 numberOfRowsPresent(false),
232 numberOfValuesPresent(false),
233 numberOfValues(0),
234 numberOfVarIdxPresent(false),
235 numberOfVarIdx(0),
236 numberOfElPresent(false),
237 numberOfEl(0),
238 osglNumberOfNonzeros(0),
239 osglNonzeroCounter(0),
240 matrixBlockNumberOfRows(NULL),
241 matrixBlockNumberOfCols(NULL),
242 shape(ENUM_NL_EXPR_SHAPE_general),
243 shapePresent(false),
244 valueType(ENUM_CONREFERENCE_VALUETYPE_value),
245 valueTypePresent(false),
246
247 numberOfMatrixVar(0),
248 osglMatrixVarIdxATT(-1),
249 osglMatrixVarIdxATTPresent(false),
250 osglMatrixVarTypeAttributePresent(false),
251 osglMatrixVarTypeAttribute(""),
252
253 numberOfMatrixObj(0),
254 osglMatrixObjIdxATT(-1),
255 osglMatrixObjIdxATTPresent(false),
256 osglMatrixObjTypeAttributePresent(false),
257 osglMatrixObjTypeAttribute(""),
258
259 numberOfMatrixCon(0),
260 osglMatrixConIdxATT(-1),
261 osglMatrixConIdxATTPresent(false),
262 osglMatrixConTypeAttributePresent(false),
263 osglMatrixConTypeAttribute("")
264*/{
265}//OSgLParserData
266
std::string fileCreator
bool numberOfMatrixConPresent
int * osglIntArray
data structure to process an IntVector and hold the data temporarily
std::string matrixConType
bool numberOfObjectivesPresent
std::string licence
bool targetMatrixFirstRowPresent
bool suppressFurtherErrorMessages
std::string matrixType
std::string conType
std::string value
std::string valueType
std::string fileName
data structure to process a GeneralFileHeader and hold the data temporarily
bool numberOfBlocksPresent
Data elements for parsing number-valued attributes and elements.
std::string symmetry
std::string matrixVarType
double * osglDblArray
std::string solver
MatrixNode * tempC
This matrix constructor is needed in order to properly push the constructor vector.
bool numberOfConstraintsPresent
std::string matrixObjType
std::string name
bool baseMatrixStartRowPresent
OSMatrix ** matrix
We need to hold an array of <matrix> elements temporarily.
int matrixCounter
We also need to keep track locally of the number of matrices.
std::string type
bool baseTransposePresent
Data elements for parsing string-valued attributes and text elements.
int nonzeroCounter
Linear matrices need a counter to count the number of terms within each element.
int * matrixVarIndexes
In order to use synergies in the parser, we store matrixXXXIdx in a separate vector.
std::string objType
OSMatrixWithMatrixVarIdx ** matrixWithMatrixVarIdx
There are also other variants of these ...
OSgLParserData()
the OSgLParserData class constructor
std::string parser_errors
used to accumulate error message so the parser does not die on the first error encountered
std::string description
std::string varType
bool numberOfVariablesPresent
std::string category
bool numberOfMatrixVarPresent
bool numberOfEnumerationsPresent
bool ignoreDataAfterErrors
two booleans to govern the behavior after an error has been encountered
bool targetMatrixFirstColPresent
std::string unit
bool baseMatrixStartColPresent
std::string source
std::string shape
std::string matrixName
bool numberOfMatrixObjPresent
std::string enumType
OSMatrixWithMatrixObjIdx ** matrixWithMatrixObjIdx
OSMatrixWithMatrixConIdx ** matrixWithMatrixConIdx