00001 /* $Id: OSgLParserData.h 2698 2009-06-09 04:14:07Z kmartin $ */ 00014 #ifndef OSGLPARSERDATA_H 00015 #define OSGLPARSERDATA_H 00016 00017 #include "OSGeneral.h" 00018 #include "OSMatrix.h" 00019 00020 #include <stdio.h> 00021 #include <string> 00022 00023 00024 00033 class OSgLParserData 00034 { 00035 public: 00036 00038 int* osglIntArray; 00039 int osglCounter; 00040 int osglTempint; 00041 00042 double* osglDblArray; 00043 int* osglValArray; 00044 00046 std::string fileName; 00047 std::string source; 00048 std::string fileCreator; 00049 std::string licence; 00050 bool fileNamePresent; 00051 bool sourcePresent; 00052 bool fileCreatorPresent; 00053 bool licencePresent; 00054 00056 OSgLParserData( ); 00057 00058 //** the OSgLParserData class destructor */ 00059 ~OSgLParserData() ; 00060 00061 00065 void* scanner; 00066 00070 char *errorText; 00071 00075 std::string parser_errors; 00076 00078 bool ignoreDataAfterErrors; 00079 bool suppressFurtherErrorMessages; 00080 00082 OSMatrix** matrix; 00083 00085 OSMatrixWithMatrixVarIdx** matrixWithMatrixVarIdx; 00086 OSMatrixWithMatrixObjIdx** matrixWithMatrixObjIdx; 00087 OSMatrixWithMatrixConIdx** matrixWithMatrixConIdx; 00088 00090 int* matrixVarIndexes; 00091 int* matrixObjIndexes; 00092 int* matrixConIndexes; 00093 00095 int matrixCounter; 00096 00098 int nonzeroCounter; 00099 00101 MatrixNode* tempC; 00102 00104 std::vector<MatrixNode*> mtxConstructorVec; 00105 std::vector<MatrixNode*> mtxBlocksVec; 00106 std::vector<MatrixNode*> mtxBlkVec; 00107 std::vector<int> nBlocksVec; 00108 00113 std::vector<int*> rowOffsets; 00114 std::vector<int*> colOffsets; 00115 00118 bool numberOfBlocksPresent; 00119 bool numberOfColumnsPresent; 00120 bool numberOfConPresent; 00121 bool numberOfConIdxPresent; 00122 bool numberOfConstraintsPresent; 00123 bool numberOfElPresent; 00124 bool numberOfEnumerationsPresent; 00125 bool numberOfItemsPresent; 00126 bool numberOfMatricesPresent; 00127 bool numberOfMatrixConPresent; 00128 bool numberOfMatrixObjPresent; 00129 bool numberOfMatrixVarPresent; 00130 bool numberOfObjPresent; 00131 bool numberOfObjIdxPresent; 00132 bool numberOfObjectivesPresent; 00133 bool numberOfRowsPresent; 00134 bool numberOfValuesPresent; 00135 bool numberOfVarPresent; 00136 bool numberOfVarIdxPresent; 00137 bool numberOfVariablesPresent; 00138 00139 bool base64SizePresent; 00140 bool baseMatrixIdxPresent; 00141 bool baseMatrixStartRowPresent; 00142 bool baseMatrixStartColPresent; 00143 bool baseMatrixEndRowPresent; 00144 bool baseMatrixEndColPresent; 00145 bool blockRowIdxPresent; 00146 bool blockColIdxPresent; 00147 bool coefPresent; 00148 bool constantPresent; 00149 bool idxPresent; 00150 bool incrPresent; 00151 bool matrixConIdxPresent; 00152 bool matrixObjIdxPresent; 00153 bool matrixVarIdxPresent; 00154 bool multPresent; 00155 bool scalarMultiplierPresent; 00156 bool targetMatrixFirstRowPresent; 00157 bool targetMatrixFirstColPresent; 00158 00159 int numberOfBlocks; 00160 int numberOfColumns; 00161 int numberOfCon; 00162 int numberOfConIdx; 00163 int numberOfConstraints; 00164 int numberOfEl; 00165 int numberOfEnumerations; 00166 int numberOfItems; 00167 int numberOfMatrices; 00168 int numberOfMatrixCon; 00169 int numberOfMatrixObj; 00170 int numberOfMatrixVar; 00171 int numberOfObj; 00172 int numberOfObjIdx; 00173 int numberOfObjectives; 00174 int numberOfRows; 00175 int numberOfValues; 00176 int numberOfVar; 00177 int numberOfVarIdx; 00178 int numberOfVariables; 00179 00180 int base64Size; 00181 int baseMatrixIdx; 00182 int baseMatrixStartRow; 00183 int baseMatrixStartCol; 00184 int baseMatrixEndRow; 00185 int baseMatrixEndCol; 00186 int blockRowIdx; 00187 int blockColIdx; 00188 double coef; 00189 double constant; 00190 int idx; 00191 int incr; 00192 int matrixConIdx; 00193 int matrixObjIdx; 00194 int matrixVarIdx; 00195 int mult; 00196 double scalarMultiplier; 00197 int targetMatrixFirstRow; 00198 int targetMatrixFirstCol; 00199 00202 bool baseTransposePresent; 00203 bool categoryPresent; 00204 bool conTypePresent; 00205 bool descriptionPresent; 00206 bool enumTypePresent; 00207 bool matrixConTypePresent; 00208 bool matrixNamePresent; 00209 bool matrixObjTypePresent; 00210 bool matrixTypePresent; 00211 bool matrixVarTypePresent; 00212 bool namePresent; 00213 bool objTypePresent; 00214 bool rowMajorPresent; 00215 bool shapePresent; 00216 bool solverPresent; 00217 bool symmetryPresent; 00218 bool typePresent; 00219 bool unitPresent; 00220 bool valuePresent; 00221 bool valueTypePresent; 00222 bool varTypePresent; 00223 00224 bool baseTranspose; 00225 std::string category; 00226 std::string conType; 00227 std::string description; 00228 std::string enumType; 00229 std::string matrixConType; 00230 std::string matrixName; 00231 std::string matrixObjType; 00232 std::string matrixType; 00233 std::string matrixVarType; 00234 std::string name; 00235 std::string objType; 00236 bool rowMajor; 00237 std::string shape; 00238 std::string solver; 00239 std::string symmetry; 00240 std::string type; 00241 std::string unit; 00242 std::string value; 00243 std::string valueType; 00244 std::string varType; 00245 };//OSgLParserData 00246 00247 inline void osgl_empty_vectors( OSgLParserData* osglData) 00248 { 00249 if (osglData->osglIntArray != NULL) 00250 delete[] osglData->osglIntArray; 00251 osglData->osglIntArray = NULL; 00252 }//end osgl_empty_vectors 00253 00254 00255 #endif /*OSGLPARSERDATA_H_*/
1.6.1