osg::TypedObjectFunctorBase< Parent, Params > Class Template Reference
[Functors]

#include <OSGTypedFunctorBase.h>

Inheritance diagram for osg::TypedObjectFunctorBase< Parent, Params >:

osg::VRMLNodeFactory< BaseT > osg::TypedObjectFunctor1< RetT, CallArgT, SizeTraitsT > osg::TypedObjectFunctor2< RetT, CallArgT, ArgsT, SizeTraitsT > osg::TypedObjectVoidFunctor1< CallArgT, SizeTraitsT > osg::TypedObjectVoidFunctor2< CallArgT, ArgsT, SizeTraitsT >

List of all members.

Member



VRMLNodeDescfindNodeDesc (const Char8 *szNodeTypename)
void addNodeDesc (const Char8 *szNodeTypename, VRMLNodeDesc *pDesc)
virtual void preStandardProtos (void)
virtual void postStandardProtos (void)
VRMLNodeDesc_pCurrentNodeDesc
NodeNameDescHash _mNodeDescHash
bool _bInFieldProto
bool _bIgnoreProto

Public Types

Types


typedef Params::ObjMethodF ObjMethodF

Public Member Functions

Constructors


 TypedObjectFunctorBase (void)
 TypedObjectFunctorBase (const TypedObjectFunctorBase &source)
Destructor


virtual ~TypedObjectFunctorBase (void)
Set


void setMethod (ObjMethodF pFunc)
Skel replacements


virtual void beginProto (const Char8 *szProtoname)
virtual void endProto (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 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 addFieldValue (const Char8 *szFieldVal)
Dump


void dumpTable (void)

Protected Types

typedef std::map< const Char8
*, VRMLNodeDesc *, LTString
NodeNameDescHash

Protected Member Functions

Operators


void operator= (const TypedObjectFunctorBase &source)

Private Types

Types


typedef Parent Inherited
typedef TypedObjectFunctorBase
< Parent, Params > 
Self


Detailed Description

template<class Parent, class Params>
class osg::TypedObjectFunctorBase< Parent, Params >

, CallArgT, SizeTraitsT>, TypedTraits1< RetT, CallArgT> >

, SizeTraitsT>, TypedTraits1 <void, CallArgT> >

, CallArgT, ArgsT, SizeTraitsT>, TypedTraits2 <RetT, CallArgT, ArgsT> >

, ArgsT, SizeTraitsT>, TypedTraits2 <void, CallArgT, ArgsT> >

Definition at line 210 of file OSGTypedFunctorBase.h.


Member Typedef Documentation

template<class Parent, class Params>
typedef Params::ObjMethodF osg::TypedObjectFunctorBase< Parent, Params >::ObjMethodF

Definition at line 220 of file OSGTypedFunctorBase.h.

template<class Parent, class Params>
typedef Parent osg::TypedObjectFunctorBase< Parent, Params >::Inherited [private]

template<class Parent, class Params>
typedef TypedObjectFunctorBase<Parent, Params> osg::TypedObjectFunctorBase< Parent, Params >::Self [private]

template<class BaseT>
typedef std::map< const Char8 *, VRMLNodeDesc *, LTString > osg::VRMLNodeFactory< BaseT >::NodeNameDescHash [protected, inherited]

Definition at line 96 of file OSGVRMLNodeFactory.h.


Constructor & Destructor Documentation

template<class Parent, class Params>
osg::TypedObjectFunctorBase< Parent, Params >::TypedObjectFunctorBase ( void   )  [inline]

Definition at line 147 of file OSGTypedFunctorBase.inl.

00147                                                                     :
00148     Inherited()
00149 {
00150 }

template<class Parent, class Params>
osg::TypedObjectFunctorBase< Parent, Params >::TypedObjectFunctorBase ( const TypedObjectFunctorBase< Parent, Params > &  source  )  [inline]

Definition at line 154 of file OSGTypedFunctorBase.inl.

00155                                           : 
00156 
00157     Inherited(source) 
00158 {
00159 }

template<class Parent, class Params>
osg::TypedObjectFunctorBase< Parent, Params >::~TypedObjectFunctorBase ( void   )  [inline, virtual]

Definition at line 163 of file OSGTypedFunctorBase.inl.

00164 {
00165 }


Member Function Documentation

template<class Parent, class Params>
void osg::TypedObjectFunctorBase< Parent, Params >::setMethod ( ObjMethodF  pFunc  )  [inline]

Definition at line 169 of file OSGTypedFunctorBase.inl.

00170 {
00171     Self::_flags |=  Self::FuncPtrValid;
00172 
00173     *((ObjMethodF *) Self::_data2) = pFunc; 
00174 }

template<class Parent, class Params>
void osg::TypedObjectFunctorBase< Parent, Params >::operator= ( const TypedObjectFunctorBase< Parent, Params > &  source  )  [protected]

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::beginProto ( const Char8 szProtoname  )  [inline, virtual, inherited]

Definition at line 96 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bIgnoreProto, osg::VRMLNodeFactory< BaseT >::_mNodeDescHash, osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc, osg::VRMLNodeDesc::getIndent(), osg::VRMLNodeDesc::incIndent(), osg::indentLog(), osg::VRMLNodeDesc::init(), PINFO, osg::stringcasecmp(), and osg::stringDup().

Referenced by osg::VRMLFile::createStandardPrototypes().

00098 {
00099 #ifdef OSG_DEBUG_VRML
00100     indentLog(VRMLNodeDesc::getIndent(), PINFO);
00101     PINFO << "Begin Proto " << szProtoname << std::endl;
00102 #endif
00103 
00104     Char8 *szName = NULL;
00105 
00106     NodeNameDescHash::iterator mNodeDescIt =
00107         _mNodeDescHash.find(szProtoname);
00108 
00109     if(mNodeDescIt == _mNodeDescHash.end())
00110     {
00111         if(stringcasecmp("IndexedFaceSet", szProtoname) == 0)
00112         {
00113             stringDup(szProtoname, szName);
00114 
00115             _pCurrentNodeDesc = new VRMLGeometryDesc(true);
00116 
00117             _pCurrentNodeDesc->init(szProtoname);
00118 
00119             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00120         }
00121         else if(stringcasecmp("IndexedLineSet", szProtoname) == 0)
00122         {
00123             stringDup(szProtoname, szName);
00124 
00125             _pCurrentNodeDesc = new VRMLGeometryDesc(false);
00126 
00127             _pCurrentNodeDesc->init(szProtoname);
00128 
00129             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00130         }
00131         else if(stringcasecmp("PointSet", szProtoname) == 0)
00132         {
00133             stringDup(szProtoname, szName);
00134 
00135             _pCurrentNodeDesc = new VRMLGeometryPointSetDesc();
00136 
00137             _pCurrentNodeDesc->init(szProtoname);
00138 
00139             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00140         }
00141         else if(stringcasecmp("Shape", szProtoname) == 0)
00142         {
00143             stringDup(szProtoname, szName);
00144 
00145             _pCurrentNodeDesc = new VRMLShapeDesc;
00146 
00147             _pCurrentNodeDesc->init(szProtoname);
00148 
00149             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00150         }
00151         else if(stringcasecmp("Coordinate", szProtoname) == 0)
00152         {
00153             stringDup(szProtoname, szName);
00154 
00155             _pCurrentNodeDesc = new VRMLGeometryPartDesc("point",
00156                                                          "positions",
00157                                                          "GeoPositions3f");
00158 
00159             _pCurrentNodeDesc->init(szProtoname);
00160 
00161             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00162         }
00163         else if(stringcasecmp("Normal", szProtoname) == 0)
00164         {
00165             stringDup(szProtoname, szName);
00166 
00167             _pCurrentNodeDesc = new VRMLGeometryPartDesc("vector",
00168                                                          "normals",
00169                                                          "GeoNormals3f");
00170 
00171             _pCurrentNodeDesc->init(szProtoname);
00172 
00173             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00174         }
00175         else if(stringcasecmp("Color", szProtoname) == 0)
00176         {
00177             stringDup(szProtoname, szName);
00178 
00179             _pCurrentNodeDesc = new VRMLGeometryPartDesc("color",
00180                                                          "colors",
00181                                                          "GeoColors3f");
00182 
00183             _pCurrentNodeDesc->init(szProtoname);
00184 
00185             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00186         }
00187         else if(stringcasecmp("TextureCoordinate", szProtoname) == 0)
00188         {
00189             stringDup(szProtoname, szName);
00190 
00191             _pCurrentNodeDesc = new VRMLGeometryPartDesc("point",
00192                                                          "TexCoords",
00193                                                          "GeoTexCoords2f");
00194 
00195             _pCurrentNodeDesc->init(szProtoname);
00196 
00197             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00198         }
00199         else if(stringcasecmp("Appearance", szProtoname) == 0)
00200         {
00201             stringDup(szProtoname, szName);
00202 
00203             _pCurrentNodeDesc = new VRMLAppearanceDesc();
00204 
00205             _pCurrentNodeDesc->init(szProtoname);
00206 
00207             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00208         }
00209         else if(stringcasecmp("Material", szProtoname) == 0)
00210         {
00211             stringDup(szProtoname, szName);
00212 
00213             _pCurrentNodeDesc = new VRMLMaterialDesc();
00214 
00215             _pCurrentNodeDesc->init(szProtoname);
00216 
00217             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00218         }
00219         else if(stringcasecmp("Box", szProtoname) == 0)
00220         {
00221             stringDup(szProtoname, szName);
00222 
00223             _pCurrentNodeDesc = new VRMLGeometryObjectDesc("Box");
00224 
00225             _pCurrentNodeDesc->init(szProtoname);
00226 
00227             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00228         }
00229         else if(stringcasecmp("Cone", szProtoname) == 0)
00230         {
00231             stringDup(szProtoname, szName);
00232 
00233             _pCurrentNodeDesc = new VRMLGeometryObjectDesc("Cone");
00234 
00235             _pCurrentNodeDesc->init(szProtoname);
00236 
00237             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00238         }
00239         else if(stringcasecmp("Cylinder", szProtoname) == 0)
00240         {
00241             stringDup(szProtoname, szName);
00242 
00243             _pCurrentNodeDesc = new VRMLGeometryObjectDesc("Cylinder");
00244 
00245             _pCurrentNodeDesc->init(szProtoname);
00246 
00247             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00248         }
00249         else if(stringcasecmp("Sphere", szProtoname) == 0)
00250         {
00251             stringDup(szProtoname, szName);
00252 
00253             _pCurrentNodeDesc = new VRMLGeometryObjectDesc("Sphere");
00254 
00255             _pCurrentNodeDesc->init(szProtoname);
00256 
00257             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00258         }
00259         else if(stringcasecmp("TextureTransform", szProtoname) == 0)
00260         {
00261             stringDup(szProtoname, szName);
00262 
00263             _pCurrentNodeDesc = new VRMLTextureTransformDesc();
00264 
00265             _pCurrentNodeDesc->init(szProtoname);
00266 
00267             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00268         }
00269         else if(stringcasecmp("ImageTexture", szProtoname) == 0)
00270         {
00271             stringDup(szProtoname, szName);
00272 
00273             _pCurrentNodeDesc = new VRMLImageTextureDesc();
00274 
00275             _pCurrentNodeDesc->init(szProtoname);
00276 
00277             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00278         }
00279         else if(stringcasecmp("PixelTexture", szProtoname) == 0)
00280         {
00281             stringDup(szProtoname, szName);
00282 
00283             _pCurrentNodeDesc = new VRMLPixelTextureDesc();
00284 
00285             _pCurrentNodeDesc->init(szProtoname);
00286 
00287             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00288         }
00289         else if(stringcasecmp("LOD", szProtoname) == 0)
00290         {
00291             stringDup(szProtoname, szName);
00292 
00293             _pCurrentNodeDesc = new VRMLLODDesc();
00294 
00295             _pCurrentNodeDesc->init(szProtoname);
00296 
00297             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00298         }
00299         else if(stringcasecmp("Switch", szProtoname) == 0)
00300         {
00301             stringDup(szProtoname, szName);
00302 
00303             _pCurrentNodeDesc = new VRMLSwitchDesc();
00304 
00305             _pCurrentNodeDesc->init(szProtoname);
00306 
00307             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00308         }
00309         else if(stringcasecmp("Group", szProtoname) == 0)
00310         {
00311             stringDup(szProtoname, szName);
00312 
00313             _pCurrentNodeDesc = new VRMLGroupDesc();
00314 
00315             _pCurrentNodeDesc->init(szProtoname);
00316 
00317             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00318         }
00319         else if(stringcasecmp("Inline", szProtoname) == 0)
00320         {
00321             stringDup(szProtoname, szName);
00322 
00323             _pCurrentNodeDesc = new VRMLInlineDesc();
00324 
00325             _pCurrentNodeDesc->init(szProtoname);
00326 
00327             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00328         }
00329         else if(stringcasecmp("Viewpoint", szProtoname) == 0)
00330         {
00331             stringDup(szProtoname, szName);
00332 
00333             _pCurrentNodeDesc = new VRMLViewpointDesc();
00334 
00335             _pCurrentNodeDesc->init(szProtoname);
00336 
00337             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00338         }
00339         else if(stringcasecmp("Extrusion", szProtoname) == 0)
00340         {
00341             stringDup(szProtoname, szName);
00342 
00343             _pCurrentNodeDesc = new VRMLExtrusionDesc();
00344 
00345             _pCurrentNodeDesc->init(szProtoname);
00346 
00347             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00348         }
00349         else
00350         {
00351             stringDup(szProtoname, szName);
00352 
00353             _pCurrentNodeDesc = new VRMLNodeDesc;
00354 
00355             _pCurrentNodeDesc->init(szProtoname);
00356 
00357             _mNodeDescHash[szName] = _pCurrentNodeDesc;
00358         }
00359 
00360     }
00361     else
00362     {
00363 #ifdef OSG_DEBUG_VRML
00364         indentLog(VRMLNodeDesc::getIndent(), PINFO);
00365         PINFO << "Could not add second proto named "
00366               << szProtoname
00367               << std::endl;
00368 #endif
00369 
00370         _bIgnoreProto = true;
00371     }
00372 
00373     VRMLNodeDesc::incIndent();
00374 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::endProto ( void   )  [inline, virtual, inherited]

Definition at line 377 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bIgnoreProto, osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc, osg::VRMLNodeDesc::decIndent(), and osg::VRMLNodeDesc::endProtoInterface().

Referenced by osg::VRMLFile::createStandardPrototypes().

00378 {
00379     if(_pCurrentNodeDesc != NULL)
00380         _pCurrentNodeDesc->endProtoInterface();
00381 
00382 #ifdef OSG_DEBUG_VRML
00383     VRMLNodeDesc::decIndent();
00384 #endif
00385 
00386     _bIgnoreProto = false;
00387 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::beginEventInDecl ( const Char8 szEventType,
const UInt32  uiFieldTypeId,
const Char8 szEventName 
) [inline, virtual, inherited]

Definition at line 390 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bIgnoreProto, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.

Referenced by osg::VRMLFile::createStandardPrototypes().

00394 {
00395     if(_bIgnoreProto == true)
00396         return;
00397 
00398 #ifdef OSG_DEBUG_VRML
00399     indentLog(VRMLNodeDesc::getIndent(), PINFO);
00400     PINFO << "AddEventIn " << szEventType << " " << szEventName << std::endl;
00401 #endif
00402 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::beginEventOutDecl ( const Char8 szEventType,
const UInt32  uiFieldTypeId,
const Char8 szEventName 
) [inline, virtual, inherited]

Definition at line 405 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bIgnoreProto, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.

Referenced by osg::VRMLFile::createStandardPrototypes().

00409 {
00410     if(_bIgnoreProto == true)
00411         return;
00412 
00413 #ifdef OSG_DEBUG_VRML
00414     indentLog(VRMLNodeDesc::getIndent(), PINFO);
00415     PINFO << "AddEventOut " << szEventType << " " << szEventName << std::endl;
00416 #endif
00417 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::beginFieldDecl ( const Char8 szFieldType,
const UInt32  uiFieldTypeId,
const Char8 szFieldName 
) [inline, virtual, inherited]

Reimplemented in osg::VRMLFile.

Definition at line 420 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bIgnoreProto, osg::VRMLNodeFactory< BaseT >::_bInFieldProto, osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc, and osg::VRMLNodeDesc::prototypeAddField().

Referenced by osg::VRMLNodeFactory< BaseT >::beginExposedFieldDecl(), and osg::VRMLFile::beginFieldDecl().

00424 {
00425     bool rc;
00426 
00427     if(_bIgnoreProto == true)
00428         return;
00429 
00430     if(_pCurrentNodeDesc != NULL)
00431     {
00432         rc = _pCurrentNodeDesc->prototypeAddField(
00433             szFieldType,
00434             Self::mapIntExtFieldType(szFieldName, uiFieldTypeId),
00435             szFieldName);
00436 
00437         if(rc == true)
00438         {
00439             _bInFieldProto = true;
00440         }
00441     }
00442 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::endFieldDecl ( void   )  [inline, virtual, inherited]

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::beginExposedFieldDecl ( const Char8 szFieldType,
const UInt32  uiFieldTypeId,
const Char8 szFieldName 
) [inline, virtual, inherited]

Definition at line 451 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::beginFieldDecl().

Referenced by osg::VRMLFile::createStandardPrototypes().

00455 {
00456     beginFieldDecl(szFieldType, uiFieldTypeId, szFieldName);
00457 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::endExposedFieldDecl ( void   )  [inline, virtual, inherited]

Definition at line 460 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::endFieldDecl().

Referenced by osg::VRMLFile::createStandardPrototypes().

00461 {
00462     endFieldDecl();
00463 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::addFieldValue ( const Char8 szFieldVal  )  [inline, virtual, inherited]

Reimplemented in osg::VRMLFile.

Definition at line 491 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_bInFieldProto, osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), PINFO, and osg::VRMLNodeDesc::prototypeAddFieldValue().

Referenced by osg::VRMLFile::addFieldValue().

00492 {
00493     if(_bInFieldProto == true)
00494     {
00495 #ifdef OSG_DEBUG_VRML
00496         indentLog(VRMLNodeDesc::getIndent(), PINFO);
00497 
00498         PINFO << "Add proto field value : " << szFieldVal << std::endl;
00499 #endif
00500     }
00501 
00502     if(_pCurrentNodeDesc != NULL)
00503     {
00504         _pCurrentNodeDesc->prototypeAddFieldValue(szFieldVal);
00505     }
00506 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::dumpTable ( void   )  [inline, inherited]

Definition at line 512 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_mNodeDescHash.

00513 {
00514     NodeNameDescHash::iterator  mNodeDescIt = _mNodeDescHash.begin();
00515 
00516     while(mNodeDescIt != _mNodeDescHash.end())
00517     {
00518 //        fprintf(stderr, "NodeDesc : %s\n", mNodeDescIt->first);
00519 
00520         mNodeDescIt->second->dump(mNodeDescIt->first);
00521 
00522         mNodeDescIt++;
00523     }
00524 }

template<class BaseT>
VRMLNodeDesc * osg::VRMLNodeFactory< BaseT >::findNodeDesc ( const Char8 szNodeTypename  )  [inline, protected, inherited]

Definition at line 530 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_mNodeDescHash, osg::VRMLNodeDesc::getIndent(), osg::indentLog(), and PINFO.

Referenced by osg::VRMLFile::beginNode(), and osg::VRMLNodeFactory< BaseT >::postStandardProtos().

00531 {
00532     VRMLNodeDesc *returnValue = NULL;
00533 
00534     NodeNameDescHash::iterator mNodeDescIt =
00535         _mNodeDescHash.find(szNodeTypename);
00536 
00537     if(mNodeDescIt != _mNodeDescHash.end())
00538     {
00539 #ifdef OSG_DEBUG_VRML
00540         indentLog(VRMLNodeDesc::getIndent(), PINFO);
00541         PINFO << "Found Node "
00542               << mNodeDescIt->first << " ("
00543               << szNodeTypename     << ")" << std::endl;
00544 #endif
00545 
00546         returnValue = mNodeDescIt->second;
00547     }
00548 
00549     return returnValue;
00550 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::addNodeDesc ( const Char8 szNodeTypename,
VRMLNodeDesc pDesc 
) [inline, protected, inherited]

Definition at line 553 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::_mNodeDescHash, osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc, and osg::stringDup().

00555 {
00556     Char8 *szName = NULL;
00557 
00558     if(szNodeTypename == NULL || pDesc == NULL)
00559         return;
00560 
00561     stringDup(szNodeTypename, szName);
00562 
00563     _mNodeDescHash[szName] = pDesc;
00564 
00565     _pCurrentNodeDesc = pDesc;
00566 }

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::preStandardProtos ( void   )  [inline, protected, virtual, inherited]

template<class BaseT>
void osg::VRMLNodeFactory< BaseT >::postStandardProtos ( void   )  [inline, protected, virtual, inherited]

Definition at line 574 of file OSGVRMLNodeFactory.inl.

References osg::VRMLNodeFactory< BaseT >::findNodeDesc(), osg::VRMLAppearanceDesc::setMaterialDesc(), and osg::VRMLShapeDesc::setMaterialDesc().

Referenced by osg::VRMLFile::createStandardPrototypes(), and osg::VRMLFile::scanStandardPrototypes().

00575 {
00576     VRMLNodeDesc         *pNodeDesc         = NULL;
00577     VRMLShapeDesc        *pShapeDesc        = NULL;
00578     VRMLAppearanceDesc   *pAppearanceDesc   = NULL;
00579     VRMLMaterialDesc     *pMaterialDesc     = NULL;
00580 
00581     pNodeDesc = findNodeDesc("Shape");
00582 
00583     if(pNodeDesc != NULL)
00584     {
00585         pShapeDesc = dynamic_cast<VRMLShapeDesc *>(pNodeDesc);
00586     }
00587 
00588     pNodeDesc = findNodeDesc("Appearance");
00589 
00590     if(pNodeDesc != NULL)
00591     {
00592         pAppearanceDesc = dynamic_cast<VRMLAppearanceDesc *>(pNodeDesc);
00593     }
00594 
00595     pNodeDesc = findNodeDesc("Material");
00596 
00597     if(pNodeDesc != NULL)
00598     {
00599         pMaterialDesc = dynamic_cast<VRMLMaterialDesc *>(pNodeDesc);
00600     }
00601 
00602     if(pShapeDesc != NULL)
00603     {
00604         pShapeDesc->setMaterialDesc(pMaterialDesc);
00605     }
00606 
00607     if(pAppearanceDesc != NULL)
00608     {
00609         pAppearanceDesc->setMaterialDesc(pMaterialDesc);
00610     }
00611 }


Member Data Documentation

template<class BaseT>
VRMLNodeDesc* osg::VRMLNodeFactory< BaseT >::_pCurrentNodeDesc [protected, inherited]

template<class BaseT>
NodeNameDescHash osg::VRMLNodeFactory< BaseT >::_mNodeDescHash [protected, inherited]

template<class BaseT>
bool osg::VRMLNodeFactory< BaseT >::_bInFieldProto [protected, inherited]

template<class BaseT>
bool osg::VRMLNodeFactory< BaseT >::_bIgnoreProto [protected, inherited]


The documentation for this class was generated from the following files:

Generated on Mon Mar 17 12:03:42 2008 for OpenSG by  doxygen 1.5.5