OSgLParserData.h
Go to the documentation of this file.
1 /* $Id: OSgLParserData.h 2698 2009-06-09 04:14:07Z kmartin $ */
14 #ifndef OSGLPARSERDATA_H
15 #define OSGLPARSERDATA_H
16 
17 #include "OSGeneral.h"
18 #include "OSMatrix.h"
19 
20 #include <stdio.h>
21 #include <string>
22 
23 
24 
34 {
35 public:
36 
41 
42  double* osglDblArray;
44 
46  std::string fileName;
47  std::string source;
48  std::string fileCreator;
49  std::string licence;
54 
56  OSgLParserData( );
57 
58  //** the OSgLParserData class destructor */
59  ~OSgLParserData() ;
60 
61 
65  void* scanner;
66 
70  char *errorText;
71 
75  std::string parser_errors;
76 
80 
83 
88 
93 
96 
99 
102 
104  std::vector<MatrixNode*> mtxConstructorVec;
105  std::vector<MatrixNode*> mtxBlocksVec;
106  std::vector<MatrixNode*> mtxBlkVec;
107  std::vector<int> nBlocksVec;
108 
113  std::vector<int*> rowOffsets;
114  std::vector<int*> colOffsets;
115 
138 
158 
179 
188  double coef;
189  double constant;
190  int idx;
191  int incr;
195  int mult;
199 
223 
225  std::string category;
226  std::string conType;
227  std::string description;
228  std::string enumType;
229  std::string matrixConType;
230  std::string matrixName;
231  std::string matrixObjType;
232  std::string matrixType;
233  std::string matrixVarType;
234  std::string name;
235  std::string objType;
236  bool rowMajor;
237  std::string shape;
238  std::string solver;
239  std::string symmetry;
240  std::string type;
241  std::string unit;
242  std::string value;
243  std::string valueType;
244  std::string varType;
245 };//OSgLParserData
246 
248 {
249  if (osglData->osglIntArray != NULL)
250  delete[] osglData->osglIntArray;
251  osglData->osglIntArray = NULL;
252 }//end osgl_empty_vectors
253 
254 
255 #endif /*OSGLPARSERDATA_H_*/
bool targetMatrixFirstColPresent
bool targetMatrixFirstRowPresent
std::string matrixVarType
std::string fileCreator
OSMatrixWithMatrixVarIdx ** matrixWithMatrixVarIdx
There are also other variants of these ...
std::string licence
std::string name
std::string unit
std::string matrixType
std::vector< MatrixNode * > mtxBlocksVec
std::string type
int matrixCounter
We also need to keep track locally of the number of matrices.
bool numberOfMatrixVarPresent
int * osglIntArray
data structure to process an IntVector and hold the data temporarily
std::vector< int > nBlocksVec
std::string source
std::string category
bool numberOfObjectivesPresent
bool numberOfConstraintsPresent
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
Definition: OSMatrix.h:50
OSMatrixWithMatrixConIdx ** matrixWithMatrixConIdx
bool numberOfMatricesPresent
int * matrixVarIndexes
In order to use synergies in the parser, we store matrixXXXIdx in a separate vector.
this class extends OSMatrix for use, e.g., in the matrixVar section of OSoL and OSrL ...
Definition: OSMatrix.h:2336
std::string parser_errors
used to accumulate error message so the parser does not die on the first error encountered ...
void osgl_empty_vectors(OSgLParserData *osglData)
OSMatrix ** matrix
We need to hold an array of &lt;matrix&gt; elements temporarily.
bool numberOfVarIdxPresent
bool scalarMultiplierPresent
bool numberOfMatrixObjPresent
OSgLParserData * osglData
bool suppressFurtherErrorMessages
std::string description
bool baseMatrixStartRowPresent
bool numberOfEnumerationsPresent
OSgLParserData()
the OSgLParserData class constructor
bool numberOfBlocksPresent
Data elements for parsing number-valued attributes and elements.
std::vector< int * > rowOffsets
Vectors to hold rowOffset and colOffset arrays in a place where they are easily accessible while the ...
std::vector< int * > colOffsets
MatrixNode * tempC
This matrix constructor is needed in order to properly push the constructor vector.
this class extends OSMatrix for use, e.g., in the matrixCon section of OSoL and OSrL ...
Definition: OSMatrix.h:2445
std::vector< MatrixNode * > mtxConstructorVec
Several vectors to process the matrix nodes into the right order.
std::string matrixName
bool numberOfColumnsPresent
std::string value
bool baseTransposePresent
Data elements for parsing string-valued attributes and text elements.
std::vector< MatrixNode * > mtxBlkVec
bool numberOfObjIdxPresent
bool numberOfVariablesPresent
OSMatrixWithMatrixObjIdx ** matrixWithMatrixObjIdx
double scalarMultiplier
std::string solver
void * scanner
scanner is used to store data in a reentrant lexer we use this to pass an OSgLParserData object to th...
bool ignoreDataAfterErrors
two booleans to govern the behavior after an error has been encountered
std::string fileName
data structure to process a GeneralFileHeader and hold the data temporarily
double * osglDblArray
bool baseMatrixEndColPresent
bool baseMatrixEndRowPresent
int nonzeroCounter
Linear matrices need a counter to count the number of terms within each element.
bool numberOfMatrixConPresent
std::string matrixObjType
std::string conType
std::string valueType
int * matrixObjIndexes
bool baseMatrixStartColPresent
std::string objType
std::string enumType
std::string symmetry
char * errorText
if the parser finds invalid text it is held here and we delete if the file was not valid ...
this class extends OSMatrix for use, e.g., in the matrixObj section of OSoL and OSrL ...
Definition: OSMatrix.h:2391
bool numberOfValuesPresent
std::string matrixConType
The OSgLParserData Class.
int * matrixConIndexes
std::string varType
std::string shape
a data structure to represent a matrix object (derived from MatrixType)
Definition: OSMatrix.h:2185
bool numberOfConIdxPresent