#include <OSGScanParseSkel.h>

Member | |
| bool | _bMapTypeIds |
| Char8 * | _szReferenceHeader |
| OSGScanParseLexer * | _pLexer |
| void | reset (void) |
| void | setMapTypeIds (bool bVal) |
| void | setReferenceHeader (const Char8 *szReferenceHeader) |
Public Types | |
| enum | BuildInFieldType { OSGsfBool = TOK_SFBool, OSGsfColor = TOK_SFColor, OSGsfColorRGBA = TOK_SFColorRGBA, OSGsfDouble = TOK_SFDouble, OSGsfFloat = TOK_SFFloat, OSGsfImage = TOK_SFImage, OSGsfInt32 = TOK_SFInt32, OSGsfMatrix3d = TOK_SFMatrix3d, OSGsfMatrix3f = TOK_SFMatrix3f, OSGsfMatrix4d = TOK_SFMatrix4d, OSGsfMatrix4f = TOK_SFMatrix4f, OSGsfNode = TOK_SFNode, OSGsfRotation = TOK_SFRotation, OSGsfString = TOK_SFString, OSGsfTime = TOK_SFTime, OSGsfVec2d = TOK_SFVec2d, OSGsfVec2f = TOK_SFVec2f, OSGsfVec3d = TOK_SFVec3d, OSGsfVec3f = TOK_SFVec3f, OSGsfVec4d = TOK_SFVec4d, OSGsfVec4f = TOK_SFVec4f, OSGmfBool = TOK_MFBool, OSGmfColor = TOK_MFColor, OSGmfColorRGBA = TOK_MFColorRGBA, OSGmfDouble = TOK_MFDouble, OSGmfFloat = TOK_MFFloat, OSGmfImage = TOK_MFImage, OSGmfInt32 = TOK_MFInt32, OSGmfMatrix3d = TOK_MFMatrix3d, OSGmfMatrix3f = TOK_MFMatrix3f, OSGmfMatrix4d = TOK_MFMatrix4d, OSGmfMatrix4f = TOK_MFMatrix4f, OSGmfNode = TOK_MFNode, OSGmfRotation = TOK_MFRotation, OSGmfString = TOK_MFString, OSGmfTime = TOK_MFTime, OSGmfVec2d = TOK_MFVec2d, OSGmfVec2f = TOK_MFVec2f, OSGmfVec3d = TOK_MFVec3d, OSGmfVec3f = TOK_MFVec3f, OSGmfVec4d = TOK_MFVec4d, OSGmfVec4f = TOK_MFVec4f, OSGmfColor4f = TOK_MFColorRGBA, OSGmfColor4i = TOK_MFColor4i, OSGmfColor3f = TOK_MFColor, OSGmfMatrix = TOK_MFMatrix4f, OSGmfPnt2f = TOK_MFPnt2f, OSGmfPnt3f = TOK_MFPnt3f, OSGmfPnt4f = TOK_MFPnt4f, OSGmfPlane = TOK_MFPlane, OSGsfColor4f = TOK_SFColorRGBA, OSGsfColor4i = TOK_SFColor4i, OSGsfColor3f = TOK_SFColor, OSGsfMatrix = TOK_SFMatrix4f, OSGsfPnt2f = TOK_SFPnt2f, OSGsfPnt3f = TOK_SFPnt3f, OSGsfPnt4f = TOK_SFPnt4f, 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 (YYSTYPE *lvalp) |
| virtual const Char8 * | getText (void) |
| 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 | addBoolValue (bool b) |
| virtual void | addColorValue (const Color3f &c) |
| virtual void | addColorRGBAValue (const Color4f &c) |
| virtual void | addDoubleValue (Real64 d) |
| virtual void | addFloatValue (Real32 f) |
| virtual void | addImageValue (ImagePtr &img) |
| virtual void | addInt32Value (Int32 i) |
| virtual void | addMatrix3dValue (Real64 m00, Real64 m10, Real64 m20, Real64 m01, Real64 m11, Real64 m21, Real64 m02, Real64 m12, Real64 m22) |
| virtual void | addMatrix3fValue (Real32 m00, Real32 m10, Real32 m20, Real32 m01, Real32 m11, Real32 m21, Real32 m02, Real32 m12, Real32 m22) |
| virtual void | addMatrix4dValue (const Matrix4d &m) |
| virtual void | addMatrix4fValue (const Matrix4f &m) |
| virtual void | addRotationValue (const Vec3f &axis, Real32 angle) |
| virtual void | addStringValue (const std::string &s) |
| virtual void | addTimeValue (Time t) |
| virtual void | addVec2dValue (const Vec2d &v) |
| virtual void | addVec2fValue (const Vec2f &v) |
| virtual void | addVec3dValue (const Vec3d &v) |
| virtual void | addVec3fValue (const Vec3f &v) |
| virtual void | addVec4dValue (const Vec4d &v) |
| virtual void | addVec4fValue (const Vec4f &v) |
| virtual void | addColor4iValue (const Color4ub &c) |
| virtual void | addPnt2fValue (const Pnt2f &p) |
| virtual void | addPnt3fValue (const Pnt3f &p) |
| virtual void | addPnt4fValue (const Pnt4f &p) |
| virtual void | addPlaneValue (const Plane &p) |
| virtual void | addVolumeValue (const DynamicVolume &v) |
| 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) |
| OSGScanParseLexer * | getLexer (void) |
Private Member Functions | |
| friend | int::OSGScanParseSkel_parse (void *) |
| 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) | |
| void | beginValue () |
| void | appendValue () |
| void | beginImage (Int32 width, Int32 height, Int32 components) |
| void | addImagePixel (Int32 pixel) |
| void | endImage () |
Private Attributes | |
| std::string | _tmpString1 |
| std::string | _tmpString2 |
| std::string | _tmpString3 |
| Real32 | _tmpFloat1 |
| Real32 | _tmpFloat2 |
| Real32 | _tmpFloat3 |
| Real32 | _tmpFloat4 |
| ImagePtr | _image |
| UInt8 * | _imageDataPtr |
Definition at line 74 of file OSGScanParseSkel.h.
Definition at line 81 of file OSGScanParseSkel.h.
00082 { 00083 OSGsfBool = TOK_SFBool, 00084 OSGsfColor = TOK_SFColor, 00085 OSGsfColorRGBA = TOK_SFColorRGBA, 00086 OSGsfDouble = TOK_SFDouble, 00087 OSGsfFloat = TOK_SFFloat, 00088 OSGsfImage = TOK_SFImage, 00089 OSGsfInt32 = TOK_SFInt32, 00090 OSGsfMatrix3d = TOK_SFMatrix3d, 00091 OSGsfMatrix3f = TOK_SFMatrix3f, 00092 OSGsfMatrix4d = TOK_SFMatrix4d, 00093 OSGsfMatrix4f = TOK_SFMatrix4f, 00094 OSGsfNode = TOK_SFNode, 00095 OSGsfRotation = TOK_SFRotation, 00096 OSGsfString = TOK_SFString, 00097 OSGsfTime = TOK_SFTime, 00098 OSGsfVec2d = TOK_SFVec2d, 00099 OSGsfVec2f = TOK_SFVec2f, 00100 OSGsfVec3d = TOK_SFVec3d, 00101 OSGsfVec3f = TOK_SFVec3f, 00102 OSGsfVec4d = TOK_SFVec4d, 00103 OSGsfVec4f = TOK_SFVec4f, 00104 OSGmfBool = TOK_MFBool, 00105 OSGmfColor = TOK_MFColor, 00106 OSGmfColorRGBA = TOK_MFColorRGBA, 00107 OSGmfDouble = TOK_MFDouble, 00108 OSGmfFloat = TOK_MFFloat, 00109 OSGmfImage = TOK_MFImage, 00110 OSGmfInt32 = TOK_MFInt32, 00111 OSGmfMatrix3d = TOK_MFMatrix3d, 00112 OSGmfMatrix3f = TOK_MFMatrix3f, 00113 OSGmfMatrix4d = TOK_MFMatrix4d, 00114 OSGmfMatrix4f = TOK_MFMatrix4f, 00115 OSGmfNode = TOK_MFNode, 00116 OSGmfRotation = TOK_MFRotation, 00117 OSGmfString = TOK_MFString, 00118 OSGmfTime = TOK_MFTime, 00119 OSGmfVec2d = TOK_MFVec2d, 00120 OSGmfVec2f = TOK_MFVec2f, 00121 OSGmfVec3d = TOK_MFVec3d, 00122 OSGmfVec3f = TOK_MFVec3f, 00123 OSGmfVec4d = TOK_MFVec4d, 00124 OSGmfVec4f = TOK_MFVec4f, 00125 00126 OSGmfColor4f = TOK_MFColorRGBA, 00127 OSGmfColor4i = TOK_MFColor4i, 00128 OSGmfColor3f = TOK_MFColor, 00129 OSGmfMatrix = TOK_MFMatrix4f, 00130 OSGmfPnt2f = TOK_MFPnt2f, 00131 OSGmfPnt3f = TOK_MFPnt3f, 00132 OSGmfPnt4f = TOK_MFPnt4f, 00133 OSGmfPlane = TOK_MFPlane, 00134 OSGsfColor4f = TOK_SFColorRGBA, 00135 OSGsfColor4i = TOK_SFColor4i, 00136 OSGsfColor3f = TOK_SFColor, 00137 OSGsfMatrix = TOK_SFMatrix4f, 00138 OSGsfPnt2f = TOK_SFPnt2f, 00139 OSGsfPnt3f = TOK_SFPnt3f, 00140 OSGsfPnt4f = TOK_SFPnt4f, 00141 OSGsfPlane = TOK_SFPlane, 00142 OSGsfVolume = TOK_SFVolume 00143 };
| anonymous enum |
| ScanParseSkel::ScanParseSkel | ( | void | ) |
Definition at line 66 of file OSGScanParseSkel.cpp.
00066 : 00067 _bMapTypeIds (false ), 00068 _szReferenceHeader(NULL ), 00069 _pLexer (new OSGScanParseLexer), 00070 _image (NullFC), 00071 _imageDataPtr (0 ) 00072 { 00073 }
| ScanParseSkel::~ScanParseSkel | ( | void | ) | [virtual] |
Definition at line 78 of file OSGScanParseSkel.cpp.
References _image, _pLexer, osg::NullFC, and osg::subRefCP().
00079 { 00080 if (_image != NullFC) 00081 subRefCP(_image); 00082 if(_pLexer != NULL) 00083 delete _pLexer; 00084 }
| osg::ScanParseSkel::ScanParseSkel | ( | const ScanParseSkel & | source | ) | [private] |
| osg::ScanParseSkel::int::OSGScanParseSkel_parse | ( | void * | ) | [private] |
| void ScanParseSkel::scanStream | ( | std::istream & | is | ) | [virtual] |
Definition at line 92 of file OSGScanParseSkel.cpp.
References _pLexer, and OSGScanParseSkel_parse().
Referenced by scanFile().
00093 { 00094 if(is.good()) 00095 { 00096 _pLexer->switch_streams(&is, 0); 00097 OSGScanParseSkel_parse(this); 00098 } 00099 }
| void ScanParseSkel::scanFile | ( | const Char8 * | szFilename | ) | [virtual] |
Definition at line 102 of file OSGScanParseSkel.cpp.
References is(), OSGScanParseSkel_parse(), PNOTICE, and scanStream().
00103 { 00104 if(szFilename == NULL) 00105 return; 00106 00107 #ifdef OSG_FLEX_USE_IOSTREAM_INPUT 00108 std::ifstream is(szFilename); 00109 00110 if(is.good()) 00111 { 00112 PNOTICE << "Loading Stream: " << szFilename << std::endl; 00113 00114 scanStream(is); 00115 00116 is.close(); 00117 } 00118 #else 00119 FILE *pInFile = fopen(szFilename, "r"); 00120 00121 if(pInFile != NULL) 00122 { 00123 PNOTICE << "Loading File : " << szFilename << std::endl; 00124 00125 OSGScanParseSkel_in = pInFile; 00126 00127 OSGScanParseSkel_parse(this); 00128 00129 fclose(pInFile); 00130 } 00131 #endif 00132 }
| Int32 ScanParseSkel::lex | ( | YYSTYPE * | lvalp | ) | [virtual] |
Definition at line 134 of file OSGScanParseSkel.cpp.
References _pLexer, and OSGScanParseLexer::yylex().
| const Char8 * ScanParseSkel::getText | ( | void | ) | [virtual] |
Definition at line 139 of file OSGScanParseSkel.cpp.
References _pLexer.
00140 { 00141 return _pLexer->YYText(); 00142 }
| void ScanParseSkel::handleError | ( | const Char8 * | szErrorText | ) | [virtual] |
| bool ScanParseSkel::verifyHeader | ( | const Char8 * | szHeader | ) | [virtual] |
Definition at line 155 of file OSGScanParseSkel.cpp.
References _szReferenceHeader, SLOG, and osg::stringlen().
00156 { 00157 bool returnValue = true; 00158 00159 if(szHeader == NULL) 00160 { 00161 SLOG << "Error Null Header String Read" << std::endl; 00162 return false; 00163 } 00164 00165 if(_szReferenceHeader != NULL) 00166 { 00167 if(strncmp(szHeader, 00168 _szReferenceHeader, 00169 stringlen(_szReferenceHeader)) != 0) 00170 { 00171 SLOG << "Error : Header [" << szHeader << "] does not " 00172 << "match reference [" << _szReferenceHeader << "]" 00173 << std::endl; 00174 00175 returnValue = false; 00176 } 00177 } 00178 else 00179 { 00180 SLOG << "Error Null Reference Header, Check disabled " << std::endl; 00181 return true; 00182 } 00183 00184 return returnValue; 00185 }
| void ScanParseSkel::beginProto | ( | const Char8 * | szProtoname | ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 187 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::endProto | ( | void | ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 191 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::beginExternProto | ( | const Char8 * | szProtoname | ) | [virtual] |
| void ScanParseSkel::endExternProtoInterface | ( | void | ) | [virtual] |
| void ScanParseSkel::endExternProto | ( | void | ) | [virtual] |
| void ScanParseSkel::beginScript | ( | const Char8 * | szProtoname | ) | [virtual] |
| void ScanParseSkel::endScript | ( | void | ) | [virtual] |
| void ScanParseSkel::beginEventInDecl | ( | const Char8 * | szEventType, | |
| const UInt32 | uiFieldTypeId, | |||
| const Char8 * | szEventName | |||
| ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 215 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::beginEventOutDecl | ( | const Char8 * | szEventType, | |
| const UInt32 | uiFieldTypeId, | |||
| const Char8 * | szEventName | |||
| ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 221 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::endEventDecl | ( | void | ) | [virtual] |
| void ScanParseSkel::beginFieldDecl | ( | const Char8 * | szFieldType, | |
| const UInt32 | uiFieldTypeId, | |||
| const Char8 * | szFieldName | |||
| ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 231 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::endFieldDecl | ( | void | ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 237 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::beginExposedFieldDecl | ( | const Char8 * | szFieldType, | |
| const UInt32 | uiFieldTypeId, | |||
| const Char8 * | szFieldName | |||
| ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 241 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::endExposedFieldDecl | ( | void | ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 247 of file OSGScanParseSkel.cpp.
| void ScanParseSkel::endField | ( | void | ) | [virtual] |
Definition at line 291 of file OSGScanParseSkel.cpp.
00293 { 00294 fprintf(stderr, "Calling default begin node %s %s\n", 00295 szNodeTypename, 00296 szNodename); 00297 }
| void ScanParseSkel::endNode | ( | void | ) | [virtual] |
| void ScanParseSkel::use | ( | const Char8 * | szName | ) | [virtual] |
Definition at line 303 of file OSGScanParseSkel.cpp.
References PINFO.
00304 { 00305 PINFO << "Use : " << szName << std::endl; 00306 }
| void ScanParseSkel::is | ( | const Char8 * | szName | ) | [virtual] |
| void ScanParseSkel::addFieldValue | ( | const Char8 * | szFieldVal | ) | [virtual] |
Reimplemented in osg::VRMLNodeFactory< osg::ScanParseFieldTypeMapper< osg::ScanParseSkel > >.
Definition at line 345 of file OSGScanParseSkel.cpp.
Referenced by addBoolValue(), addColor4iValue(), addColorRGBAValue(), addColorValue(), addDoubleValue(), addFloatValue(), addImageValue(), addInt32Value(), addMatrix3dValue(), addMatrix3fValue(), addMatrix4dValue(), addMatrix4fValue(), addPlaneValue(), addPnt2fValue(), addPnt3fValue(), addPnt4fValue(), addRotationValue(), addStringValue(), addTimeValue(), addVec2dValue(), addVec2fValue(), addVec3dValue(), addVec3fValue(), addVec4dValue(), addVec4fValue(), and addVolumeValue().
| void ScanParseSkel::addBoolValue | ( | bool | b | ) | [virtual] |
Definition at line 349 of file OSGScanParseSkel.cpp.
References _pLexer, and addFieldValue().
00350 { 00351 addFieldValue(_pLexer->YYText()); 00352 }
| void ScanParseSkel::addColorValue | ( | const Color3f & | c | ) | [virtual] |
Definition at line 354 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00355 { 00356 addFieldValue(_tmpString1.c_str()); 00357 }
| void ScanParseSkel::addColorRGBAValue | ( | const Color4f & | c | ) | [virtual] |
Definition at line 359 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00360 { 00361 addFieldValue(_tmpString1.c_str()); 00362 }
| void ScanParseSkel::addDoubleValue | ( | Real64 | d | ) | [virtual] |
Definition at line 364 of file OSGScanParseSkel.cpp.
References _pLexer, and addFieldValue().
00365 { 00366 addFieldValue(_pLexer->YYText()); 00367 }
| void ScanParseSkel::addFloatValue | ( | Real32 | f | ) | [virtual] |
Definition at line 369 of file OSGScanParseSkel.cpp.
References _pLexer, and addFieldValue().
00370 { 00371 addFieldValue(_pLexer->YYText()); 00372 }
| void ScanParseSkel::addImageValue | ( | ImagePtr & | img | ) | [virtual] |
Definition at line 374 of file OSGScanParseSkel.cpp.
References addFieldValue().
Referenced by endImage().
00375 { 00376 UInt32 numComponents = img->getComponents(); 00377 std::ostringstream os; 00378 os << img->getWidth() << ' ' << img->getHeight() << ' ' << numComponents; 00379 addFieldValue(os.str().c_str()); 00380 UInt32 numPixels = img->getWidth() * img->getHeight(); 00381 UInt32 pixel; 00382 UInt8 *data = img->getData(); 00383 for (UInt32 i = 0; i < numPixels; ++i) 00384 { 00385 pixel = 0; 00386 for (UInt32 j = 0; j < numComponents; ++j) 00387 pixel = (pixel << 8) | *data++; 00388 os.str(std::string()); 00389 os << pixel; 00390 addFieldValue(os.str().c_str()); 00391 } 00392 }
| void ScanParseSkel::addInt32Value | ( | Int32 | i | ) | [virtual] |
Definition at line 394 of file OSGScanParseSkel.cpp.
References _pLexer, and addFieldValue().
00395 { 00396 addFieldValue(_pLexer->YYText()); 00397 }
| void ScanParseSkel::addMatrix3dValue | ( | Real64 | m00, | |
| Real64 | m10, | |||
| Real64 | m20, | |||
| Real64 | m01, | |||
| Real64 | m11, | |||
| Real64 | m21, | |||
| Real64 | m02, | |||
| Real64 | m12, | |||
| Real64 | m22 | |||
| ) | [virtual] |
Definition at line 399 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00402 { 00403 addFieldValue(_tmpString1.c_str()); 00404 }
| void ScanParseSkel::addMatrix3fValue | ( | Real32 | m00, | |
| Real32 | m10, | |||
| Real32 | m20, | |||
| Real32 | m01, | |||
| Real32 | m11, | |||
| Real32 | m21, | |||
| Real32 | m02, | |||
| Real32 | m12, | |||
| Real32 | m22 | |||
| ) | [virtual] |
Definition at line 406 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00409 { 00410 addFieldValue(_tmpString1.c_str()); 00411 }
| void ScanParseSkel::addMatrix4dValue | ( | const Matrix4d & | m | ) | [virtual] |
Definition at line 413 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00414 { 00415 addFieldValue(_tmpString1.c_str()); 00416 }
| void ScanParseSkel::addMatrix4fValue | ( | const Matrix4f & | m | ) | [virtual] |
Definition at line 418 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00419 { 00420 addFieldValue(_tmpString1.c_str()); 00421 }
Definition at line 423 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00424 { 00425 addFieldValue(_tmpString1.c_str()); 00426 }
| void ScanParseSkel::addStringValue | ( | const std::string & | s | ) | [virtual] |
Definition at line 428 of file OSGScanParseSkel.cpp.
References addFieldValue().
00429 { 00430 addFieldValue(s.c_str()); 00431 }
| void ScanParseSkel::addTimeValue | ( | Time | t | ) | [virtual] |
Definition at line 433 of file OSGScanParseSkel.cpp.
References _pLexer, and addFieldValue().
00434 { 00435 addFieldValue(_pLexer->YYText()); 00436 }
| void ScanParseSkel::addVec2dValue | ( | const Vec2d & | v | ) | [virtual] |
Definition at line 438 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00439 { 00440 addFieldValue(_tmpString1.c_str()); 00441 }
| void ScanParseSkel::addVec2fValue | ( | const Vec2f & | v | ) | [virtual] |
Definition at line 443 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00444 { 00445 addFieldValue(_tmpString1.c_str()); 00446 }
| void ScanParseSkel::addVec3dValue | ( | const Vec3d & | v | ) | [virtual] |
Definition at line 448 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00449 { 00450 addFieldValue(_tmpString1.c_str()); 00451 }
| void ScanParseSkel::addVec3fValue | ( | const Vec3f & | v | ) | [virtual] |
Definition at line 453 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00454 { 00455 addFieldValue(_tmpString1.c_str()); 00456 }
| void ScanParseSkel::addVec4dValue | ( | const Vec4d & | v | ) | [virtual] |
Definition at line 458 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00459 { 00460 addFieldValue(_tmpString1.c_str()); 00461 }
| void ScanParseSkel::addVec4fValue | ( | const Vec4f & | v | ) | [virtual] |
Definition at line 463 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00464 { 00465 addFieldValue(_tmpString1.c_str()); 00466 }
| void ScanParseSkel::addColor4iValue | ( | const Color4ub & | c | ) | [virtual] |
Definition at line 468 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00469 { 00470 addFieldValue(_tmpString1.c_str()); 00471 }
| void ScanParseSkel::addPnt2fValue | ( | const Pnt2f & | p | ) | [virtual] |
Definition at line 473 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00474 { 00475 addFieldValue(_tmpString1.c_str()); 00476 }
| void ScanParseSkel::addPnt3fValue | ( | const Pnt3f & | p | ) | [virtual] |
Definition at line 478 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00479 { 00480 addFieldValue(_tmpString1.c_str()); 00481 }
| void ScanParseSkel::addPnt4fValue | ( | const Pnt4f & | p | ) | [virtual] |
Definition at line 483 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00484 { 00485 addFieldValue(_tmpString1.c_str()); 00486 }
| void ScanParseSkel::addPlaneValue | ( | const Plane & | p | ) | [virtual] |
Definition at line 488 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00489 { 00490 addFieldValue(_tmpString1.c_str()); 00491 }
| void ScanParseSkel::addVolumeValue | ( | const DynamicVolume & | v | ) | [virtual] |
Definition at line 493 of file OSGScanParseSkel.cpp.
References _tmpString1, and addFieldValue().
00494 { 00495 addFieldValue(_tmpString1.c_str()); 00496 }
| void ScanParseSkel::profileElement | ( | const Char8 * | szProfileName | ) | [virtual] |
| void ScanParseSkel::componentElement | ( | const Char8 * | szComponentName | ) | [virtual] |
| void ScanParseSkel::importElement | ( | const Char8 * | szInlineName, | |
| const Char8 * | szNodeName, | |||
| const Char8 * | szImportAs | |||
| ) | [virtual] |
Definition at line 328 of file OSGScanParseSkel.cpp.
00331 { 00332 fprintf(stderr, "IMPORT %s.%s AS %s\n", 00333 szInlineName, szNodeName, szImportAs); 00334 }
| bool ScanParseSkel::getMapFieldTypes | ( | void | ) |
Definition at line 508 of file OSGScanParseSkel.cpp.
References _bMapTypeIds.
00509 { 00510 return _bMapTypeIds; 00511 }
| Int32 ScanParseSkel::mapExtIntFieldType | ( | const Char8 * | szFieldname, | |
| const Int32 | iFieldTypeId | |||
| ) | [virtual] |
Reimplemented in osg::ScanParseFieldTypeMapper< osg::ScanParseSkel >.
Definition at line 513 of file OSGScanParseSkel.cpp.
| OSGScanParseLexer * ScanParseSkel::getLexer | ( | void | ) |
Definition at line 523 of file OSGScanParseSkel.cpp.
References _pLexer.
00524 { 00525 return _pLexer; 00526 }
| void ScanParseSkel::reset | ( | void | ) | [protected] |
| void ScanParseSkel::setMapTypeIds | ( | bool | bVal | ) | [protected] |
Definition at line 535 of file OSGScanParseSkel.cpp.
References _bMapTypeIds.
00536 { 00537 _bMapTypeIds = bVal; 00538 }
| void ScanParseSkel::setReferenceHeader | ( | const Char8 * | szReferenceHeader | ) | [protected] |
Definition at line 540 of file OSGScanParseSkel.cpp.
References _szReferenceHeader, and osg::stringDup().
00541 { 00542 stringDup(szReferenceHeader, _szReferenceHeader); 00543 }
| void osg::ScanParseSkel::operator= | ( | const ScanParseSkel & | source | ) | [private] |
| void ScanParseSkel::beginValue | ( | ) | [private] |
Definition at line 547 of file OSGScanParseSkel.cpp.
References _pLexer, and _tmpString1.
00548 { 00549 _tmpString1.assign(_pLexer->YYText(), _pLexer->YYLeng()); 00550 }
| void ScanParseSkel::appendValue | ( | ) | [private] |
Definition at line 552 of file OSGScanParseSkel.cpp.
References _pLexer, and _tmpString1.
00553 { 00554 _tmpString1.push_back(' '); 00555 _tmpString1.append(_pLexer->YYText(), _pLexer->YYLeng()); 00556 }
Definition at line 558 of file OSGScanParseSkel.cpp.
References _image, _imageDataPtr, _pLexer, osg::addRefCP(), osg::ImageBase::create(), OSGScanParseLexer::expectImageInts(), osg::NullFC, osg::Image::OSG_INVALID_PF, osg::Image::OSG_L_PF, osg::Image::OSG_LA_PF, osg::Image::OSG_RGB_PF, and osg::Image::OSG_RGBA_PF.
00559 { 00560 if (_image == NullFC) 00561 { 00562 _image = Image::create(); 00563 addRefCP(_image); 00564 } 00565 UInt32 pixelFormat; 00566 switch (components) 00567 { 00568 case 1: pixelFormat = Image::OSG_L_PF; break; 00569 case 2: pixelFormat = Image::OSG_LA_PF; break; 00570 case 3: pixelFormat = Image::OSG_RGB_PF; break; 00571 case 4: pixelFormat = Image::OSG_RGBA_PF; break; 00572 default: pixelFormat = Image::OSG_INVALID_PF; break; 00573 } 00574 _image->set(pixelFormat, width, height); 00575 _imageDataPtr = _image->getData(); 00576 _pLexer->expectImageInts(width * height); 00577 }
| void ScanParseSkel::addImagePixel | ( | Int32 | pixel | ) | [private] |
Definition at line 579 of file OSGScanParseSkel.cpp.
References _image, _imageDataPtr, osg::Image::OSG_L_PF, osg::Image::OSG_LA_PF, osg::Image::OSG_RGB_PF, and osg::Image::OSG_RGBA_PF.
00580 { 00581 switch (_image->getPixelFormat()) 00582 { 00583 case Image::OSG_RGBA_PF: 00584 *_imageDataPtr++ = pixel >> 24; 00585 // Fall through 00586 case Image::OSG_RGB_PF: 00587 *_imageDataPtr++ = pixel >> 16; 00588 // Fall through 00589 case Image::OSG_LA_PF: 00590 *_imageDataPtr++ = pixel >> 8; 00591 // Fall through 00592 case Image::OSG_L_PF: 00593 *_imageDataPtr++ = pixel; 00594 // Fall through 00595 default: 00596 break; 00597 } 00598 }
| void ScanParseSkel::endImage | ( | ) | [private] |
Definition at line 600 of file OSGScanParseSkel.cpp.
References _image, _imageDataPtr, addImageValue(), osg::NullFC, and osg::subRefCP().
00601 { 00602 _imageDataPtr = 0; 00603 addImageValue(_image); 00604 subRefCP(_image); 00605 _image = NullFC; 00606 }
bool osg::ScanParseSkel::_bMapTypeIds [protected] |
Definition at line 362 of file OSGScanParseSkel.h.
Referenced by getMapFieldTypes(), and setMapTypeIds().
Char8* osg::ScanParseSkel::_szReferenceHeader [protected] |
Definition at line 363 of file OSGScanParseSkel.h.
Referenced by setReferenceHeader(), and verifyHeader().
OSGScanParseLexer* osg::ScanParseSkel::_pLexer [protected] |
Definition at line 364 of file OSGScanParseSkel.h.
Referenced by addBoolValue(), addDoubleValue(), addFloatValue(), addInt32Value(), addTimeValue(), appendValue(), beginImage(), beginValue(), getLexer(), getText(), handleError(), lex(), scanStream(), and ~ScanParseSkel().
std::string osg::ScanParseSkel::_tmpString1 [private] |
Definition at line 381 of file OSGScanParseSkel.h.
Referenced by addColor4iValue(), addColorRGBAValue(), addColorValue(), addMatrix3dValue(), addMatrix3fValue(), addMatrix4dValue(), addMatrix4fValue(), addPlaneValue(), addPnt2fValue(), addPnt3fValue(), addPnt4fValue(), addRotationValue(), addVec2dValue(), addVec2fValue(), addVec3dValue(), addVec3fValue(), addVec4dValue(), addVec4fValue(), addVolumeValue(), appendValue(), and beginValue().
std::string osg::ScanParseSkel::_tmpString2 [private] |
Definition at line 381 of file OSGScanParseSkel.h.
std::string osg::ScanParseSkel::_tmpString3 [private] |
Definition at line 381 of file OSGScanParseSkel.h.
Real32 osg::ScanParseSkel::_tmpFloat1 [private] |
Definition at line 382 of file OSGScanParseSkel.h.
Real32 osg::ScanParseSkel::_tmpFloat2 [private] |
Definition at line 382 of file OSGScanParseSkel.h.
Real32 osg::ScanParseSkel::_tmpFloat3 [private] |
Definition at line 382 of file OSGScanParseSkel.h.
Real32 osg::ScanParseSkel::_tmpFloat4 [private] |
Definition at line 382 of file OSGScanParseSkel.h.
ImagePtr osg::ScanParseSkel::_image [private] |
Definition at line 394 of file OSGScanParseSkel.h.
Referenced by addImagePixel(), beginImage(), endImage(), and ~ScanParseSkel().
UInt8* osg::ScanParseSkel::_imageDataPtr [private] |
Definition at line 396 of file OSGScanParseSkel.h.
Referenced by addImagePixel(), beginImage(), and endImage().
1.5.5