#include <OSGScanParseSkel.h>
Inheritance diagram for osg::ScanParseSkel:

Member | |
| void | reset (void) |
| void | setMapTypeIds (bool bVal) |
| void | setReferenceHeader (const Char8 *szReferenceHeader) |
| *bool | _bMapTypeIds |
| Char8 * | _szReferenceHeader |
| OSGScanParseLexer * | _pLexer |
Public Types | |
| enum | BuildInFieldType { OSGsfBool = TOK_SFBOOL, OSGsfColor = TOK_SFCOLOR, OSGsfFloat = TOK_SFFLOAT, OSGsfImage = TOK_SFIMAGE, OSGsfInt32 = TOK_SFINT32, OSGsfNode = TOK_SFNODE, OSGsfRotation = TOK_SFROTATION, OSGsfString = TOK_SFSTRING, OSGsfTime = TOK_SFTIME, OSGsfVec2f = TOK_SFVEC2F, OSGsfVec3f = TOK_SFVEC3F, OSGmfColor = TOK_MFCOLOR, OSGmfFloat = TOK_MFFLOAT, OSGmfInt32 = TOK_MFINT32, OSGmfNode = TOK_MFNODE, OSGmfRotation = TOK_MFROTATION, OSGmfString = TOK_MFSTRING, OSGmfTime = TOK_MFTIME, OSGmfVec2f = TOK_MFVEC2F, OSGmfVec3f = TOK_MFVEC3F, OSGmfColor4f = TOK_MFCOLOR4F, OSGmfColor4i = TOK_MFCOLOR4I, OSGmfColor3f = TOK_MFCOLOR3F, OSGmfMatrix = TOK_MFMATRIX, OSGmfPnt2f = TOK_MFPNT2F, OSGmfPnt3f = TOK_MFPNT3F, OSGmfPnt4f = TOK_MFPNT4F, OSGmfVec4f = TOK_MFVEC4F, OSGmfPlane = TOK_MFPLANE, OSGsfColor4f = TOK_SFCOLOR4F, OSGsfColor4i = TOK_SFCOLOR4I, OSGsfColor3f = TOK_SFCOLOR3F, OSGsfMatrix = TOK_SFMATRIX, OSGsfPnt2f = TOK_SFPNT2F, OSGsfPnt3f = TOK_SFPNT3F, OSGsfPnt4f = TOK_SFPNT4F, OSGsfVec4f = TOK_SFVEC4F, OSGsfPlane = TOK_SFPLANE, OSGsfVolume = TOK_SFVOLUME } |
| enum | { LastOption = 0x0001 } |
Public Member Functions | |
Constructors | |
| * | ScanParseSkel (void) |
Destructor | |
| *virtual | ~ScanParseSkel (void) |
Scan | |
| *virtual void | scanStream (std::istream &is) |
| virtual void | scanFile (const Char8 *szFilename) |
| virtual Int32 | lex (void) |
| virtual const Char8 * | getText (void) |
| void | expectType (Int32 iNextType) |
| virtual void | handleError (const Char8 *szErrorText) |
Prototypes | |
| *virtual bool | verifyHeader (const Char8 *szHeader) |
| virtual void | beginProto (const Char8 *szProtoname) |
| virtual void | endProto (void) |
| virtual void | beginExternProto (const Char8 *szProtoname) |
| virtual void | endExternProtoInterface (void) |
| virtual void | endExternProto (void) |
| virtual void | beginScript (const Char8 *szProtoname) |
| virtual void | endScript (void) |
| virtual void | beginEventInDecl (const Char8 *szEventType, const UInt32 uiFieldTypeId, const Char8 *szEventName) |
| virtual void | beginEventOutDecl (const Char8 *szEventType, const UInt32 uiFieldTypeId, const Char8 *szEventName) |
| virtual void | endEventDecl (void) |
| virtual void | beginFieldDecl (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
| virtual void | endFieldDecl (void) |
| virtual void | beginExposedFieldDecl (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
| virtual void | endExposedFieldDecl (void) |
| virtual void | addExternEventInDecl (const Char8 *szEventType, const UInt32 uiFieldTypeId, const Char8 *szEventName) |
| virtual void | addExternEventOutDecl (const Char8 *szEventType, const UInt32 uiFieldTypeId, const Char8 *szEventName) |
| virtual void | addExternFieldDecl (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
| virtual void | addExternExposedFieldDecl (const Char8 *szFieldType, const UInt32 uiFieldTypeId, const Char8 *szFieldName) |
Fields | |
| *virtual void | beginField (const Char8 *szFieldname, const UInt32 uiFieldTypeId) |
| virtual void | endField (void) |
Nodes | |
| *virtual void | beginNode (const Char8 *szNodeTypename, const Char8 *szNodename) |
| virtual void | endNode (void) |
| virtual void | use (const Char8 *szName) |
| virtual void | is (const Char8 *szName) |
Misc | |
| *virtual void | addFieldValue (const Char8 *szFieldVal) |
| virtual void | addRoute (const Char8 *szOutNodename, const Char8 *szOutFieldname, const Char8 *szInNodename, const Char8 *szInFieldname) |
| virtual void | profileElement (const Char8 *szProfileName) |
| virtual void | componentElement (const Char8 *szComponentName) |
| virtual void | metaElement (const Char8 *szMetaKey, const Char8 *szMetaValue) |
| virtual void | importElement (const Char8 *szInlineName, const Char8 *szNodeName, const Char8 *szImportAs) |
| virtual void | exportElement (const Char8 *szNodeName, const Char8 *szExportAs) |
Type Information | |
| *bool | getMapFieldTypes (void) |
| virtual Int32 | mapExtIntFieldType (const Char8 *szFieldname, const Int32 iFieldTypeId) |
| virtual UInt32 | getFieldType (const Char8 *szFieldname) |
Private Member Functions | |
| ScanParseSkel (const ScanParseSkel &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const ScanParseSkel &source) |
| prohibit default function (move to 'public' if needed) | |
Definition at line 62 of file OSGScanParseSkel.h.
|
|
Definition at line 67 of file OSGScanParseSkel.h. 00068 { 00069 OSGsfBool = TOK_SFBOOL, 00070 OSGsfColor = TOK_SFCOLOR, 00071 OSGsfFloat = TOK_SFFLOAT, 00072 OSGsfImage = TOK_SFIMAGE, 00073 OSGsfInt32 = TOK_SFINT32, 00074 OSGsfNode = TOK_SFNODE, 00075 OSGsfRotation = TOK_SFROTATION, 00076 OSGsfString = TOK_SFSTRING, 00077 OSGsfTime = TOK_SFTIME, 00078 OSGsfVec2f = TOK_SFVEC2F, 00079 OSGsfVec3f = TOK_SFVEC3F, 00080 OSGmfColor = TOK_MFCOLOR, 00081 OSGmfFloat = TOK_MFFLOAT, 00082 OSGmfInt32 = TOK_MFINT32, 00083 OSGmfNode = TOK_MFNODE, 00084 OSGmfRotation = TOK_MFROTATION, 00085 OSGmfString = TOK_MFSTRING, 00086 OSGmfTime = TOK_MFTIME, 00087 OSGmfVec2f = TOK_MFVEC2F, 00088 OSGmfVec3f = TOK_MFVEC3F, 00089 00090 OSGmfColor4f = TOK_MFCOLOR4F, 00091 OSGmfColor4i = TOK_MFCOLOR4I, 00092 OSGmfColor3f = TOK_MFCOLOR3F, 00093 OSGmfMatrix = TOK_MFMATRIX, 00094 OSGmfPnt2f = TOK_MFPNT2F, 00095 OSGmfPnt3f = TOK_MFPNT3F, 00096 OSGmfPnt4f = TOK_MFPNT4F, 00097 OSGmfVec4f = TOK_MFVEC4F, 00098 OSGmfPlane = TOK_MFPLANE, 00099 OSGsfColor4f = TOK_SFCOLOR4F, 00100 OSGsfColor4i = TOK_SFCOLOR4I, 00101 OSGsfColor3f = TOK_SFCOLOR3F, 00102 OSGsfMatrix = TOK_SFMATRIX, 00103 OSGsfPnt2f = TOK_SFPNT2F, 00104 OSGsfPnt3f = TOK_SFPNT3F, 00105 OSGsfPnt4f = TOK_SFPNT4F, 00106 OSGsfVec4f = TOK_SFVEC4F, 00107 OSGsfPlane = TOK_SFPLANE, 00108 OSGsfVolume = TOK_SFVOLUME 00109 };
|
|
|
Definition at line 111 of file OSGScanParseSkel.h. 00112 { 00113 LastOption = 0x0001 00114 };
|
|
|
Definition at line 65 of file OSGScanParseSkel.cpp. 00065 : 00066 _bMapTypeIds (false), 00067 _szReferenceHeader(NULL ), 00068 _pLexer (NULL ) 00069 { 00070 }
|
|
|
Definition at line 75 of file OSGScanParseSkel.cpp.
|
|
|
|
|
|
Reimplemented in osg::OSGLoader. Definition at line 85 of file OSGScanParseSkel.cpp. References _pLexer, and OSGScanParseSkel_parse(). Referenced by scanFile(), and osg::OSGLoader::scanStream(). 00086 { 00087 if(is.good()) 00088 { 00089 delete _pLexer; 00090 00091 _pLexer = new OSGScanParseLexer(this, &is); 00092 00093 OSGScanParseSkel_parse(this); 00094 } 00095 }
|
|
|
Definition at line 98 of file OSGScanParseSkel.cpp. References is(), OSGScanParseSkel_parse(), PNOTICE, and scanStream(). 00099 { 00100 if(szFilename == NULL) 00101 return; 00102 00103 #ifdef OSG_FLEX_USE_IOSTREAM_INPUT 00104 std::ifstream is(szFilename); 00105 00106 if(is.good()) 00107 { 00108 PNOTICE << "Loading Stream: " << szFilename << std::endl; 00109 00110 scanStream(is); 00111 00112 is.close(); 00113 } 00114 #else 00115 FILE *pInFile = fopen(szFilename, "r"); 00116 00117 if(pInFile != NULL) 00118 { 00119 PNOTICE << "Loading File : " << szFilename << std::endl; 00120 00121 OSGScanParseSkel_in = pInFile; 00122 00123 OSGScanParseSkel_parse(this); 00124 00125 fclose(pInFile); 00126 } 00127 #endif 00128 }
|
|
|
Definition at line 130 of file OSGScanParseSkel.cpp. References _pLexer, and OSGScanParseLexer::yylex(). 00131 { 00132 Int32 returnValue = -1; 00133 00134 if(_pLexer != NULL) 00135 returnValue = _pLexer->yylex(); 00136 00137 return returnValue; 00138 }
|
|
|
Definition at line 140 of file OSGScanParseSkel.cpp. References _pLexer. 00141 { 00142 const Char8 *returnValue = NULL; 00143 00144 if(_pLexer != NULL) 00145 returnValue = _pLexer->YYText(); 00146 00147 return returnValue; 00148 }
|
|
|
Definition at line 150 of file OSGScanParseSkel.cpp. References _pLexer, and OSGScanParseLexer::expectType(). 00151 { 00152 if(_pLexer != NULL) 00153 _pLexer->expectType(iNextType); 00154 }
|
|
|
Implements osg::ScanParseSkelBase. Definition at line 157 of file OSGScanParseSkel.cpp. References _pLexer, and FWARNING. 00158 { 00159 FWARNING(("-----> %s in Line %d, read\n", 00160 szErrorText, 00161 _pLexer->lineno(), 00162 _pLexer->YYText())); 00163 }
|
|
|
Implements osg::ScanParseSkelBase. Definition at line 168 of file OSGScanParseSkel.cpp. References _szReferenceHeader, SLOG, and osg::stringlen(). 00169 { 00170 bool returnValue = true; 00171 00172 if(szHeader == NULL) 00173 { 00174 SLOG << "Error Null Header String Read" << std::endl; 00175 return false; 00176 } 00177 00178 if(_szReferenceHeader != NULL) 00179 { 00180 if(strncmp(szHeader, 00181 _szReferenceHeader, 00182 stringlen(_szReferenceHeader)) != 0) 00183 { 00184 SLOG << "Error : Header [" << szHeader << "] does not " 00185 << "match reference [" << _szReferenceHeader << "]" 00186 << std::endl; 00187 00188 returnValue = false; 00189 } 00190 } 00191 else 00192 { 00193 SLOG << "Error Null Reference Header, Check disabled " << std::endl; 00194 return true; 00195 } 00196 00197 return returnValue; 00198 }
|
|
|
Definition at line 200 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 204 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 208 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 212 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 216 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 220 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 224 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 228 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 234 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 240 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 244 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 250 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 254 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 260 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 265 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 271 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 277 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 283 of file OSGScanParseSkel.cpp.
|
|
||||||||||||
|
Reimplemented in osg::OSGLoader. Definition at line 292 of file OSGScanParseSkel.cpp.
|
|
|
Reimplemented in osg::OSGLoader. Definition at line 297 of file OSGScanParseSkel.cpp.
|
|
||||||||||||
|
Reimplemented in osg::OSGLoader. Definition at line 304 of file OSGScanParseSkel.cpp. 00306 { 00307 fprintf(stderr, "Calling default begin node %s %s\n", 00308 szNodeTypename, 00309 szNodename); 00310 }
|
|
|
Reimplemented in osg::OSGLoader. Definition at line 312 of file OSGScanParseSkel.cpp.
|
|
|
Reimplemented in osg::OSGLoader. Definition at line 316 of file OSGScanParseSkel.cpp. References PINFO. 00317 { 00318 PINFO << "Use : " << szName << std::endl; 00319 }
|
|
|
Definition at line 321 of file OSGScanParseSkel.cpp. Referenced by scanFile().
|
|
|
Implements osg::ScanParseSkelBase. Reimplemented in osg::OSGLoader. Definition at line 358 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||||||
|
Definition at line 362 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 325 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 330 of file OSGScanParseSkel.cpp.
|
|
||||||||||||
|
Definition at line 335 of file OSGScanParseSkel.cpp.
|
|
||||||||||||||||
|
Definition at line 341 of file OSGScanParseSkel.cpp. 00344 { 00345 fprintf(stderr, "IMPORT %s.%s AS %s\n", 00346 szInlineName, szNodeName, szImportAs); 00347 }
|
|
||||||||||||
|
Definition at line 349 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 372 of file OSGScanParseSkel.cpp. References _bMapTypeIds. 00373 { 00374 return _bMapTypeIds; 00375 }
|
|
||||||||||||
|
Reimplemented in osg::OSGLoader, and osg::ScanParseFieldTypeMapper< ScanParseSkel >. Definition at line 377 of file OSGScanParseSkel.cpp.
|
|
|
Reimplemented in osg::OSGLoader. Definition at line 382 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 390 of file OSGScanParseSkel.cpp.
|
|
|
Definition at line 394 of file OSGScanParseSkel.cpp. References _bMapTypeIds. 00395 { 00396 _bMapTypeIds = bVal; 00397 }
|
|
|
Definition at line 399 of file OSGScanParseSkel.cpp. References _szReferenceHeader, and osg::stringDup(). Referenced by osg::OSGLoader::OSGLoader(). 00400 { 00401 stringDup(szReferenceHeader, _szReferenceHeader); 00402 }
|
|
|
|
|
|
Definition at line 272 of file OSGScanParseSkel.h. Referenced by getMapFieldTypes(), and setMapTypeIds(). |
|
|