#include <OSGAttachmentContainerImpl.h>
Inheritance diagram for osg::AttachmentContainer:

General Fieldcontainer Declaration | |
| *virtual osg::FieldContainerType & | getType (void) |
| virtual const osg::FieldContainerType & | getType (void) const |
| virtual osg::UInt32 | getContainerSize (void) const |
| static osg::FieldContainerType & | getClassType (void) |
| static osg::UInt32 | getClassTypeId (void) |
Public Types | |
| enum | { AttachmentsFieldId = Inherited::NextFieldId, NextFieldId = AttachmentsFieldId + 1 } |
Public Member Functions | |
Handle Attachments | |
| *void | addAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| void | subAttachment (const AttachmentPtr &fieldContainerP, UInt16 binding=0) |
| AttachmentPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
| Field Access *SFAttachmentMap * | getSFAttachments (void) |
Changed | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Dump | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Clone | |
| *virtual FieldContainerPtr | shallowCopy (void) const =0 |
Static Public Member Functions | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
| static const BitVector | MTInfluenceMask = 0x00 |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Types | |
| typedef FieldContainer | Inherited |
Protected Member Functions | |
Constructors | |
| * | AttachmentContainer (void) |
| AttachmentContainer (const AttachmentContainer &source) | |
Destructor | |
| *virtual | ~AttachmentContainer (void) |
Sync | |
| *virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
| void | executeSyncImpl (AttachmentContainer *pOther, const BitVector &whichField) |
Pointer | |
| *AttachmentContainerPtr | getPtr (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
Static Protected Member Functions | |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Fields | |
| *SFAttachmentMap | _attachmentMap |
Member | |
| *UInt32 | _shares |
Static Protected Attributes | |
Type information | |
| *static FieldDescription * | _desc [] |
| static FieldContainerType | _type |
Private Member Functions | |
| void | operator= (const AttachmentContainer &source) |
| prohibit default functions (move to 'public' if needed) | |
Friends | |
| class | FieldContainer |
| class | FieldContainerType |
Definition at line 66 of file OSGAttachmentContainerImpl.h.
|
|
|
Reimplemented from osg::FieldContainer. Definition at line 78 of file OSGAttachmentContainerImpl.h. 00079 { 00080 AttachmentsFieldId = Inherited::NextFieldId, 00081 NextFieldId = AttachmentsFieldId + 1 00082 };
|
|
|
Definition at line 256 of file OSGAttachmentContainer.cpp. 00256 : 00257 Inherited (), 00258 _attachmentMap() 00259 { 00260 }
|
|
|
Definition at line 262 of file OSGAttachmentContainer.cpp. References _attachmentMap, addAttachment(), and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00262 : 00263 Inherited (source), 00264 _attachmentMap() 00265 { 00266 AttachmentMap::const_iterator fcI = 00267 source._attachmentMap.getValue().begin(); 00268 00269 AttachmentMap::const_iterator fcEnd = 00270 source._attachmentMap.getValue().end (); 00271 00272 while(fcI != fcEnd) 00273 { 00274 addAttachment((*fcI).second); 00275 00276 fcI++; 00277 } 00278 }
|
|
|
Definition at line 283 of file OSGAttachmentContainer.cpp. References _attachmentMap, osg::beginEditCP(), osg::endEditCP(), getPtr(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::Attachment::ParentsFieldMask, and osg::subRefCP(). 00284 { 00285 AttachmentMap::iterator attIt = _attachmentMap.getValue().begin(); 00286 AttachmentMap::iterator attEnd = _attachmentMap.getValue().end(); 00287 00288 AttachmentContainerPtr thisP = getPtr(); 00289 00290 while(attIt != attEnd) 00291 { 00292 beginEditCP((*attIt).second, Attachment::ParentsFieldMask); 00293 { 00294 (*attIt).second->subParent(thisP); 00295 } 00296 endEditCP ((*attIt).second, Attachment::ParentsFieldMask); 00297 00298 subRefCP ((*attIt).second); 00299 00300 ++attIt; 00301 } 00302 00303 _attachmentMap.getValue().clear(); 00304 }
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 84 of file OSGAttachmentContainer.cpp. References osg::addRefCP(), osg::beginEditCP(), osg::endEditCP(), osg::NullFC, and osg::subRefCP(). Referenced by AttachmentContainer(), osg::Node::onCreate(), and osg::Image::setAttachmentField(). 00086 { 00087 UInt32 key; 00088 00089 if(fieldContainerP == NullFC) 00090 return; 00091 00092 key = (UInt32 (fieldContainerP->getGroupId()) << 16) | binding; 00093 00094 addRefCP(fieldContainerP); 00095 00096 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00097 { 00098 fieldContainerP->addParent(getPtr()); 00099 } 00100 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00101 00102 AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key); 00103 00104 if(fcI != _attachmentMap.getValue().end()) 00105 { 00106 beginEditCP((*fcI).second, Attachment::ParentsFieldMask); 00107 { 00108 (*fcI).second->subParent(getPtr()); 00109 } 00110 endEditCP ((*fcI).second, Attachment::ParentsFieldMask); 00111 00112 subRefCP((*fcI).second); 00113 00114 (*fcI).second = fieldContainerP; 00115 } 00116 else 00117 { 00118 _attachmentMap.getValue()[key] = fieldContainerP; 00119 } 00120 }
|
|
||||||||||||
|
Definition at line 122 of file OSGAttachmentContainer.cpp. References _attachmentMap, osg::beginEditCP(), osg::endEditCP(), getPtr(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, osg::Attachment::ParentsFieldMask, and osg::subRefCP(). 00124 { 00125 UInt32 key; 00126 00127 AttachmentMap::iterator fcI; 00128 00129 if(fieldContainerP == NullFC) 00130 return; 00131 00132 key = (UInt32(fieldContainerP->getGroupId()) << 16) | binding; 00133 00134 fcI = _attachmentMap.getValue().find(key); 00135 00136 if(fcI != _attachmentMap.getValue().end()) 00137 { 00138 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00139 { 00140 (*fcI).second->subParent(getPtr()); 00141 } 00142 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00143 00144 subRefCP((*fcI).second); 00145 00146 _attachmentMap.getValue().erase(fcI); 00147 } 00148 }
|
|
||||||||||||
|
Definition at line 150 of file OSGAttachmentContainer.cpp. References _attachmentMap, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), and osg::NullFC. Referenced by osg::Image::findAttachmentField(), and osg::Image::setAttachmentField(). 00152 { 00153 UInt32 key = (UInt32(groupId) << 16) | binding; 00154 00155 AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key); 00156 00157 if(fcI == _attachmentMap.getValue().end()) 00158 { 00159 return NullFC; 00160 } 00161 else 00162 { 00163 return (*fcI).second; 00164 } 00165 }
|
|
||||||||||||
|
Definition at line 57 of file OSGAttachmentContainerImpl.inl. 00060 { 00061 return findAttachment(type.getGroupId(), binding); |