#include <OSGAttachmentImpl.h>
General Fieldcontainer Declaration | |
| *virtual osg::FieldContainerType & | getType (void) |
| virtual const osg::FieldContainerType & | getType (void) const |
| virtual osg::FieldContainerPtr | shallowCopy (void) const |
| virtual osg::UInt32 | getContainerSize (void) const |
| static osg::FieldContainerType & | getClassType (void) |
| static osg::UInt32 | getClassTypeId (void) |
| static PtrType | create (void) |
| static PtrType | createEmpty (void) |
Public Types | |
| typedef DynFieldAttachment< AttachmentDescT > | Self |
| typedef AttachmentDescT::ParentPtr | ParentPtrType |
| typedef FCPtr< ParentPtrType, Self > | PtrType |
Public Member Functions | |
Dynamic Field Access | |
| *UInt32 | addField (const FieldDescription &fieldDesc) |
| void | subField (UInt32 fieldId) |
| Field * | getDynamicField (UInt32 index) |
Clone | |
| *FieldContainerPtr | emptyCopy (void) |
| FieldContainerPtr | clone (void) |
Dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Protected Types | |
| typedef AttachmentDescT::Parent | Inherited |
Protected Member Functions | |
Constructors | |
| * | DynFieldAttachment (void) |
| DynFieldAttachment (const DynFieldAttachment &source) | |
Destructors | |
| *virtual | ~DynFieldAttachment (void) |
Protected Attributes | |
Member | |
| *FieldContainerType | _localType |
| std::vector< Field * > | _dynFieldsV |
Static Protected Attributes | |
Type information | |
| *static FieldContainerType | _type |
Private Member Functions | |
| void | operator= (const DynFieldAttachment &source) |
| prohibit default functions (move to 'public' if needed) | |
Friends | |
| class | FieldContainer |
Definition at line 382 of file OSGAttachmentImpl.h.
|
|||||
|
Definition at line 388 of file OSGAttachmentImpl.h. |
|
|||||
|
Definition at line 390 of file OSGAttachmentImpl.h. |
|
|||||
|
Definition at line 392 of file OSGAttachmentImpl.h. |
|
|||||
|
Definition at line 431 of file OSGAttachmentImpl.h. |
|
||||||||||
|
Definition at line 471 of file OSGAttachmentImpl.inl. 00471 : 00472 Inherited ( ), 00473 _localType (_type), 00474 _dynFieldsV( ) 00475 { 00476 }
|
|
||||||||||
|
Definition at line 479 of file OSGAttachmentImpl.inl. 00480 : 00481 00482 Inherited ( source ), 00483 _localType (_type ), 00484 _dynFieldsV( source._dynFieldsV) // Do a real copy soon ;-) 00485 { 00486 }
|
|
||||||||||
|
Definition at line 492 of file OSGAttachmentImpl.inl.
|
|
||||||||||
|
Referenced by osg::DynFieldAttachment< AttachmentDescT >::dump(). |
|
||||||||||
|
Definition at line 318 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_localType. 00319 { 00320 return _localType; 00321 }
|
|
||||||||||
|
Referenced by osg::Image::attachmentCount(), osg::Image::findAttachmentField(), osg::VRMLNodeDesc::getFieldAndDesc(), osg::Image::hasAttachment(), and osg::Image::setAttachmentField(). |
|
||||||||||
|
|
|
||||||||||
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Definition at line 327 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_dynFieldsV, osg::DynFieldAttachment< AttachmentDescT >::_localType, osg::FieldContainerType::addDescription(), osg::FieldFactory::createField(), osg::FieldContainerType::getFieldDescription(), osg::FieldDescription::getTypeId(), osg::FieldDescription::setFieldId(), osg::FieldDescription::setFieldMask(), and osg::FieldFactory::the(). 00329 { 00330 UInt32 returnValue = 0; 00331 Field *fieldP = NULL; 00332 FieldDescription *descP = NULL; 00333 00334 returnValue = _localType.addDescription(fieldDesc); 00335 00336 if(returnValue != 0) 00337 { 00338 descP = _localType.getFieldDescription(returnValue); 00339 00340 if(descP != NULL) 00341 { 00342 descP->setFieldId (returnValue); 00343 descP->setFieldMask( 00344 TypeTraits<BitVector>::One << returnValue); 00345 00346 fieldP = FieldFactory::the().createField(fieldDesc.getTypeId()); 00347 00348 if(_dynFieldsV.size() <= 00349 returnValue - Inherited::NextFieldId) 00350 { 00351 _dynFieldsV.resize((returnValue - 00352 Inherited::NextFieldId) + 1); 00353 } 00354 00355 _dynFieldsV[returnValue - Inherited::NextFieldId] = fieldP; 00356 } 00357 } 00358 00359 return returnValue; 00360 }
|
|
||||||||||
|
Definition at line 363 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_dynFieldsV, osg::DynFieldAttachment< AttachmentDescT >::_localType, and osg::FieldContainerType::subDescription(). 00364 { 00365 if(_localType.subDescription(fieldId) == true) 00366 { 00367 std::vector<Field *>::iterator vIt = _dynFieldsV.begin(); 00368 00369 vIt += fieldId - Inherited::NextFieldId; 00370 00371 if(vIt != _dynFieldsV.end()) 00372 { 00373 delete (*vIt); 00374 00375 (*vIt) = NULL; 00376 } 00377 } 00378 }
|
|
||||||||||
|
Definition at line 381 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_dynFieldsV. Referenced by osg::VRMLViewpointDesc::init(), osg::VRMLNodeDesc::prototypeAddField(), and osg::Image::setAttachmentField(). 00383 { 00384 return _dynFieldsV[index - Inherited::NextFieldId]; 00385 }
|
|
||||||||||
|
Definition at line 391 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_localType, osg::FieldContainerType::getFieldDescription(), and osg::FieldContainerType::getNumFieldDescs(). 00392 { 00393 PtrType returnValue = DynFieldAttachment<AttachmentDescT>::createEmpty(); 00394 00395 for(UInt32 i = Inherited::NextFieldId; 00396 i <= _localType.getNumFieldDescs(); 00397 i++) 00398 { 00399 returnValue->addField(*(_localType.getFieldDescription(i))); 00400 } 00401 00402 return returnValue; 00403 }
|
|
||||||||||
|
Definition at line 406 of file OSGAttachmentImpl.inl. References osg::DynFieldAttachment< AttachmentDescT >::_dynFieldsV, osg::DynFieldAttachment< AttachmentDescT >::_localType, osg::FieldContainerType::getFieldDescription(), and osg::FieldContainerType::getNumFieldDescs(). 00407 { 00408 PtrType returnValue = DynFieldAttachment<AttachmentDescT>::createEmpty(); 00409 UInt32 i; 00410 00411 for(i = Inherited::NextFieldId; 00412 i <= _localType.getNumFieldDescs(); 00413 i++) 00414 { 00415 returnValue->addField(*(_localType.getFieldDescription(i))); 00416 } 00417 00418 for(i = Inherited::NextFieldId; 00419 i <= _localType.getNumFieldDescs(); 00420 i++) 00421 { 00422 returnValue->getDynamicField(i)->setAbstrValue( 00423 *(_dynFieldsV[i - Inherited::NextFieldId])); 00424 } 00425 00426 return returnValue; 00427 }
|
|
||||||||||||||||
|
Definition at line 433 of file OSGAttachmentImpl.inl. References osg::FieldDescription::getCName(), osg::FieldContainerType::getFieldDescription(), osg::FieldContainerType::getNumFieldDescs(), osg::DynFieldAttachment< AttachmentDescT >::getType(), osg::indentLog(), and PLOG. 00435 { 00436 PtrType thisP(*this); 00437 00438 indentLog(uiIndent, PLOG); 00439 PLOG << "DynFieldAttachment" 00440 << "(" 00441 << thisP.getFieldContainerId() 00442 << ")" 00443 << std::endl; 00444 00445 indentLog(uiIndent, PLOG); 00446 PLOG << "{" << std::endl; 00447 00448 uiIndent += 4; 00449 00450 for(UInt32 i = 1; i <= getType().getNumFieldDescs(); i++) 00451 { 00452 indentLog(uiIndent, PLOG); 00453 PLOG << getType().getFieldDescription(i)->getCName () 00454 << " (" 00455 << const_cast<Self *>(this)->getField( 00456 getType().getFieldDescription(i)->getFieldId()) 00457 << ")" 00458 << std::endl; 00459 } 00460 00461 uiIndent -= 4; 00462 00463 indentLog(uiIndent, PLOG); 00464 PLOG << "}" << std::endl; 00465 }
|
|
||||||||||
|
|
|
|||||
|
Definition at line 468 of file OSGAttachmentImpl.h. |
|
|||||
|
Definition at line 437 of file OSGAttachmentImpl.h. |
|
|||||
|
|||||
1.4.3