#include <OSGOSGWriter.h>
Public Member Functions | |
| void | setName (const FieldContainerPtr pFC) |
| FCInfoHelper (void) | |
Public Attributes | |
| bool | written |
| bool | hasName |
| std::string | containerName |
Definition at line 98 of file OSGOSGWriter.h.
|
|
Constructor. Set members to initial values. Definition at line 66 of file OSGOSGWriter.cpp. 00066 : 00067 written (false), 00068 hasName (false), 00069 containerName( ) 00070 { 00071 }
|
|
|
Set the name by which this FieldContainer is referenced. If available a NameAttachment is used, otherwise the name is constructed from the type name and the container id. Definition at line 138 of file OSGOSGWriter.cpp. References containerName, osg::FCPtr< BasePtrTypeT, FieldContainerTypeT >::dcast(), osg::AttachmentContainerPtr::dcast(), osg::SimpleAttachment< NameAttachmentDesc >::getClassType(), osg::AttachmentContainer::getClassType(), osg::FieldContainerPtrBase::getFieldContainerId(), osg::FieldContainerType::getGroupId(), osg::FieldContainerType::isDerivedFrom(), and osg::NullFC. 00139 { 00140 const FieldContainerType& fcType = pFC->getType(); 00141 AttachmentContainerPtr pAttCon; 00142 NamePtr pNameAtt; 00143 00144 if(fcType.isDerivedFrom(AttachmentContainer::getClassType())) 00145 { 00146 pAttCon = AttachmentContainerPtr::dcast(pFC); 00147 if(pAttCon != NullFC) 00148 { 00149 pNameAtt = NamePtr::dcast(pAttCon->findAttachment( 00150 Name::getClassType().getGroupId())); 00151 00152 if(pNameAtt != NullFC) 00153 { 00154 containerName = pNameAtt->getFieldPtr()->getValue().c_str(); 00155 return; 00156 } 00157 } 00158 } 00159 00160 //no NameAttachment. Build name from Type and Id 00161 containerName = pFC->getTypeName() + 00162 TypeTraits<UInt32>::putToString(pFC.getFieldContainerId()); 00163 }
|
|
|
Definition at line 100 of file OSGOSGWriter.h. |
|
|
Definition at line 101 of file OSGOSGWriter.h. |
|
|
Definition at line 102 of file OSGOSGWriter.h. Referenced by setName(). |
1.4.3