Changeset 990
- Timestamp:
- 10/26/07 16:47:58 (8 months ago)
- Files:
-
- branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulator.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulatorManager.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalAction.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalActionInit.cpp (modified) (3 diffs)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGAttachmentContainer.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldBundleAttachment.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGWeakPtrTest.cpp (modified) (6 diffs)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Base/testFCPtrs.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGAttachmentMapFieldTraits.h (modified) (2 diffs)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGEditPointerMFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerMFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerSFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.inl (modified) (2 diffs)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.inl (modified) (2 diffs)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.inl (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.inl (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FieldContainer/Node/testNode.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.cpp (modified) (4 diffs)
- branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.h (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGOSBCommonElement.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/FileIO/build.info (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/GraphOp/OSGMaterialMergeGraphOp.cpp (modified) (3 diffs)
- branches/Carsten_PtrWork/Source/System/GraphOp/OSGMergeGraphOp.cpp (modified) (16 diffs)
- branches/Carsten_PtrWork/Source/System/GraphOp/OSGSharePtrGraphOp.cpp (modified) (8 diffs)
- branches/Carsten_PtrWork/Source/System/GraphOp/OSGSplitGraphOp.cpp (modified) (1 diff)
- branches/Carsten_PtrWork/Source/System/Window/Utilities/OSGSimpleSceneManager.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulator.cpp
r852 r990 144 144 { 145 145 //std::cout << "parent size= " << parents.getSize() << std::endl; 146 parent = dynamic_cast<NodePtr>(getParents()[0].get CPtr()); // Dangerous! multiple parents?146 parent = dynamic_cast<NodePtr>(getParents()[0].get()); // Dangerous! multiple parents? 147 147 } 148 148 else branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulatorManager.cpp
r784 r990 83 83 if ( ! _maniC->getParents().empty() ) 84 84 { 85 NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0].get CPtr());85 NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0].get()); 86 86 87 87 _maniC = NullFC; branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalAction.cpp
r916 r990 471 471 else if(! _useNewList) // new list is empty, but not used? 472 472 { 473 std::vector<NodePtr>::const_iterator it;473 Node::ChildrenFieldType::const_iterator it; 474 474 475 475 for( it = node->getMFChildren()->begin(); branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalActionInit.cpp
r936 r990 398 398 pAction->pushState(); 399 399 400 MFStateChunkPtr::const_iterator chIt = pCOGroup->beginChunks(); 401 MFStateChunkPtr::const_iterator chEnd = pCOGroup->endChunks (); 402 UInt32 uiSlot = 0; 400 ChunkOverrideGroup::ChunksFieldType::const_iterator chIt = 401 pCOGroup->beginChunks(); 402 ChunkOverrideGroup::ChunksFieldType::const_iterator chEnd = 403 pCOGroup->endChunks (); 404 UInt32 uiSlot = 0; 403 405 404 406 while(chIt != chEnd) … … 1186 1188 MultiCorePtr pMultiCore = dynamic_cast<MultiCorePtr>(pCore); 1187 1189 1188 MFNodeCorePtr::const_iterator coreIt = pMultiCore->getCores().begin(); 1189 MFNodeCorePtr::const_iterator coreEnd = pMultiCore->getCores().end (); 1190 MultiCore::CoresFieldType::const_iterator coreIt = 1191 pMultiCore->getCores().begin(); 1192 MultiCore::CoresFieldType::const_iterator coreEnd = 1193 pMultiCore->getCores().end (); 1190 1194 1191 1195 Action::ResultE returnValue = Action::Continue; … … 1218 1222 MultiCorePtr pMultiCore = dynamic_cast<MultiCorePtr>(pCore); 1219 1223 1220 MFNodeCorePtr::const_iterator coreIt = pMultiCore->getCores().begin(); 1221 MFNodeCorePtr::const_iterator coreEnd = pMultiCore->getCores().end (); 1224 MultiCore::CoresFieldType::const_iterator coreIt = 1225 pMultiCore->getCores().begin(); 1226 MultiCore::CoresFieldType::const_iterator coreEnd = 1227 pMultiCore->getCores().end (); 1222 1228 1223 1229 Action::ResultE returnValue = Action::Continue; branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGAttachmentContainer.h
r976 r990 78 78 OSG_GEN_INTERNALPTR(AttachmentContainer); 79 79 80 typedef SFAttachmentObjPtrMap AttachmentsFieldType; 81 80 82 /*! \} */ 81 83 /*---------------------------------------------------------------------*/ branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldBundleAttachment.h
r982 r990 227 227 }; 228 228 229 OSG_GEN_BUNDLEP(FieldBundleAttachment); 229 OSG_GEN_CONTAINERPTR(FieldBundleAttachment); 230 231 typedef RefCountPtrBuilder <FieldBundleAttachment, 232 FieldBundle >::Ptr 233 FieldBundleAttachmentRefPtr; 234 typedef MTRefCountPtrBuilder <FieldBundleAttachment, 235 FieldBundle >::Ptr 236 FieldBundleAttachmentMTRefPtr; 237 typedef InternalRefCountPtrBuilder<FieldBundleAttachment, 238 FieldBundle >::Ptr 239 FieldBundleAttachmentInternalRefPtr; 230 240 231 241 OSG_END_NAMESPACE branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h
r982 r990 238 238 239 239 OSG_GEN_CONTAINERPTR(FieldContainerAttachment); 240 241 typedef InternalRefCountPtrBuilder<FieldContainerAttachment>::Ptr 242 FieldContainerAttachmentInternalRefPtr; 243 240 244 241 typedef RefCountPtrBuilder<FieldContainerAttachment>::Ptr 245 242 FieldContainerAttachmentRefPtr; branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGWeakPtrTest.cpp
r967 r990 38 38 39 39 #include <OpenSG/OSGFieldContainer.h> 40 #include <OpenSG/OSGWeakPtr.h>41 40 #include <OpenSG/OSGNode.h> 42 41 #include <OpenSG/OSGNodeCore.h> … … 49 48 using namespace OSG; 50 49 51 typedef WeakPtr<NodeCore> NodeCoreWeakPtr;52 typedef WeakPtr<Transform> TransformWeakPtr;53 54 50 SUITE(WeakPtrTests) 55 51 { … … 57 53 TEST(create) 58 54 { 59 NodePtr np = Node::create(); 60 NodeRefPtr r(np); 61 62 NodeWeakPtr w; 63 CHECK(w == NullFC); 55 NodePtr np = Node::create(); 56 NodeRefPtr rp(np); 57 NodeWeakRefPtr wp; 58 59 60 CHECK(wp == NullFC); 64 61 65 62 { 66 NodeWeak Ptr w2(np);63 NodeWeakRefPtr wp2(np); 67 64 CHECK(np->getWeakRefCount() == 1); 68 65 } 69 66 CHECK(np->getWeakRefCount() == 0); 70 67 71 NodeWeak Ptr w3(r);68 NodeWeakRefPtr wp3(rp); 72 69 CHECK(np->getWeakRefCount() == 1); 73 70 74 71 { 75 NodeWeak Ptr w4(w3);72 NodeWeakRefPtr wp4(wp3); 76 73 CHECK(np->getWeakRefCount() == 2); 77 74 } … … 81 78 TEST(convertAndAssign) 82 79 { 83 NodePtr np = Node::create(); 84 NodeRefPtr r(np); 80 NodePtr np = Node::create(); 81 NodeRefPtr rp(np); 82 85 83 CHECK(np->getWeakRefCount() == 0); 86 84 CHECK(np->getExternalRefCount() == 1); 87 85 88 NodeWeak Ptr w;89 w = np;86 NodeWeakRefPtr wp; 87 wp = np; 90 88 CHECK(np->getWeakRefCount() == 1); 91 89 92 NodeWeak Ptr w2;93 w 2 = w;90 NodeWeakRefPtr wp2; 91 wp2 = wp; 94 92 CHECK(np->getWeakRefCount() == 2); 95 93 96 NodeWeak Ptr w3;97 w 3 = r;94 NodeWeakRefPtr wp3; 95 wp3 = rp; 98 96 CHECK(np->getWeakRefCount() == 3); 99 97 100 NodeRefPtr r 2;101 r 2 = w;98 NodeRefPtr rp2; 99 rp2 = wp; 102 100 CHECK(np->getExternalRefCount() == 2); 103 101 104 NodeRefPtr r 3;105 r 3 = w.get();102 NodeRefPtr rp3; 103 rp3 = wp.get(); 106 104 CHECK(np->getExternalRefCount() == 3); 107 105 } … … 112 110 NodePtr np2 = Node::create(); 113 111 114 NodeRefPtr r(np), r2(np2); 112 NodeRefPtr rp(np), rp2(np2); 113 NodeWeakRefPtr wp(np), wp2(np), wp3(np2); 115 114 116 NodeWeakPtr w(np), w2(np), w3(np2); 117 118 CHECK(w == w2); 119 CHECK(w != w3); 115 CHECK(wp == wp2); 116 CHECK(wp != wp3); 120 117 121 118 // CHECK(w == np); … … 123 120 124 121 125 CHECK(w );122 CHECK(wp); 126 123 127 NodeWeak Ptr w4;124 NodeWeakRefPtr wp4; 128 125 129 CHECK(!w 4);126 CHECK(!wp4); 130 127 } 131 128 branches/Carsten_PtrWork/Source/System/FieldContainer/Base/testFCPtrs.cpp
r791 r990 3 3 #include <OSGNode.h> 4 4 #include <OSGNodeCore.h> 5 #include <OSGRefPtr.h>6 5 7 6 branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGAttachmentMapFieldTraits.h
r785 r990 55 55 56 56 typedef std::map<UInt32, 57 FieldBundleAttachment P >FieldBundleAttachmentMap;57 FieldBundleAttachmentInternalRefPtr > FieldBundleAttachmentMap; 58 58 typedef std::map<UInt32, 59 FieldContainerAttachment Ptr>FieldContainerAttachmentMap;59 FieldContainerAttachmentInternalRefPtr> FieldContainerAttachmentMap; 60 60 61 61 #if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) … … 242 242 key = (static_cast<UInt32>(attPtr->getGroupId()) << 16) | binding; 243 243 244 aMap.insert(FieldContainerAttachmentMap::value_type(key, attPtr)); 244 aMap.insert(FieldContainerAttachmentMap::value_type( 245 key, FieldContainerAttachmentInternalRefPtr(attPtr))); 245 246 } 246 247 } branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGEditPointerMFieldHandle.h
r989 r990 131 131 /*! \{ */ 132 132 133 virtual UInt32 size (void ) = 0; 133 134 virtual RootObjectPtr get (UInt32 const uiIndex ) = 0; 134 135 virtual void add (RootObjectPtrConst pNewElement ) = 0; branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerMFieldHandle.h
r989 r990 113 113 114 114 virtual bool equal(typename Inherited::Ptr rhs) = 0; 115 115 116 /*! \} */ 117 /*---------------------------------------------------------------------*/ 118 /*! \name Operations */ 119 /*! \{ */ 120 121 virtual UInt32 size(void ) = 0; 122 virtual RootObjectPtr get (UInt32 const uiIndex) = 0; 123 116 124 /*! \} */ 117 125 /*========================= PROTECTED ===============================*/ branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerSFieldHandle.h
r989 r990 113 113 114 114 virtual bool equal(typename Inherited::Ptr rhs) = 0; 115 115 116 /*! \} */ 117 /*---------------------------------------------------------------------*/ 118 /*! \name Operations */ 119 /*! \{ */ 120 121 virtual RootObjectPtr get(void) = 0; 122 116 123 /*! \} */ 117 124 /*========================= PROTECTED ===============================*/ branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.h
r989 r990 151 151 void setAddMethod(AddMethod fMethod); 152 152 153 virtual UInt32 size (void ); 153 154 virtual RootObjectPtr get (UInt32 const uiIndex ); 154 155 virtual void add (RootObjectPtrConst pNewElement ); branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.inl
r989 r990 260 260 261 261 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 262 inline UInt32 263 EditMFieldHandle< 264 MField<ReferenceCountPointer<ObjectT, 265 RefCountPolicyT, 266 RootObjectT > > >::size(void) 267 { 268 return static_cast<HandledFieldType *>(this->_pField)->size(); 269 } 270 271 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 262 272 inline typename 263 273 EditMFieldHandle< … … 271 281 UInt32 const uiIndex) 272 282 { 273 FWARNING(("EditMFieldHandle<MField<ReferenceCountPointer<ObjectT, " 274 "RefCountPolicyT, RootObjectT > > >::get()\n")); 275 276 return NULL; 283 return (*static_cast<HandledFieldType *>(this->_pField))[uiIndex]; 277 284 } 278 285 branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.h
r989 r990 151 151 void setSetMethod(SetMethod fMethod ); 152 152 virtual void setValue (RootObjectPtrConst pNewValue); 153 153 154 154 virtual RootObjectPtr get (void ); 155 155 virtual void set (RootObjectPtrConst pNewValue); branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.inl
r989 r990 270 270 271 271 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 272 inline typename 272 inline typename 273 273 EditSFieldHandle< 274 274 SField<ReferenceCountPointer<ObjectT, … … 280 280 RootObjectT > > >::get(void) 281 281 { 282 FWARNING(("EditSFieldHandle<SField<ReferenceCountPointer<ObjectT, " 283 "RefCountPolicyT, RootObjectT> > >::get(): NIY\n")); 284 285 return NULL; 282 return static_cast<HandledFieldType const *>(this->_pField)->getValue(); 286 283 } 287 284 branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.h
r989 r990 127 127 /*! \} */ 128 128 /*---------------------------------------------------------------------*/ 129 /*! \name Operations */ 130 /*! \{ */ 131 132 virtual UInt32 size(void ); 133 virtual RootObjectPtr get (UInt32 const uiIndex); 134 135 /*! \} */ 136 /*---------------------------------------------------------------------*/ 129 137 /*! \name Access */ 130 138 /*! \{ */ branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.inl
r989 r990 187 187 188 188 /*-------------------------------------------------------------------------*/ 189 /* Operations */ 190 191 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 192 inline UInt32 193 GetMFieldHandle< 194 MField<ReferenceCountPointer<ObjectT, 195 RefCountPolicyT, 196 RootObjectT > > >::size(void) 197 { 198 return static_cast<HandledFieldType const *>(this->_pField)->size(); 199 } 200 201 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 202 inline typename 203 GetMFieldHandle< 204 MField<ReferenceCountPointer<ObjectT, 205 RefCountPolicyT, 206 RootObjectT > > >::RootObjectPtr 207 GetMFieldHandle< 208 MField<ReferenceCountPointer<ObjectT, 209 RefCountPolicyT, 210 RootObjectT > > >::get( 211 UInt32 const uiIndex) 212 { 213 return (*static_cast<HandledFieldType const *>(this->_pField))[uiIndex]; 214 } 215 216 /*-------------------------------------------------------------------------*/ 189 217 /* Access */ 190 218 branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.h
r989 r990 124 124 125 125 virtual bool equal(GetFieldHandlePtr rhs); 126 126 127 /*! \} */ 128 /*---------------------------------------------------------------------*/ 129 /*! \name Operations */ 130 /*! \{ */ 131 132 virtual RootObjectPtr get(void); 133 127 134 /*! \} */ 128 135 /*---------------------------------------------------------------------*/ branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.inl
r989 r990 187 187 188 188 /*-------------------------------------------------------------------------*/ 189 /* Operations */ 190 191 template <class ObjectT, class RefCountPolicyT, class RootObjectT> 192 inline typename 193 GetSFieldHandle< 194 SField<ReferenceCountPointer<ObjectT, 195 RefCountPolicyT, 196 RootObjectT > > >::RootObjectPtr 197 GetSFieldHandle< 198 SField<ReferenceCountPointer<ObjectT, 199 RefCountPolicyT, 200 RootObjectT > > >::get(void) 201 { 202 return static_cast<HandledFieldType const *>(this->_pField)->getValue(); 203 } 204 205 /*-------------------------------------------------------------------------*/ 189 206 /* Access */ 190 207 branches/Carsten_PtrWork/Source/System/FieldContainer/Node/testNode.cpp
r870 r990 72 72 tp->getType().dump(); 73 73 74 OSG::SFNode Ptr::getClassType().dump();75 OSG::MFNode Ptr::getClassType().dump();74 OSG::SFNodeInternalRefPtr::getClassType().dump(); 75 OSG::MFNodeInternalRefPtr::getClassType().dump(); 76 76 77 OSG::SFFieldContainer Ptr::getClassType().dump();78 OSG::MFFieldContainer Ptr::getClassType().dump();77 OSG::SFFieldContainerInternalRefPtr::getClassType().dump(); 78 OSG::MFFieldContainerInternalRefPtr::getClassType().dump(); 79 79 80 80 return 0; branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.cpp
r934 r990 741 741 FieldTraits<FieldContainerPtr>::getType()) == true) 742 742 { 743 744 SFFieldContainerPtr::GetHandlePtr sfPtrHandle = 743 GetPointerSFieldHandlePtr sfPtrHandle = 745 744 boost::dynamic_pointer_cast< 746 SFFieldContainerPtr::GetHandle>(fc->getField(i));747 748 MFFieldContainerPtr::GetHandlePtr mfPtrHandle =745 GetPointerSFieldHandle>(fc->getField(i)); 746 747 GetPointerMFieldHandlePtr mfPtrHandle = 749 748 boost::dynamic_pointer_cast< 750 MFFieldContainerPtr::GetHandle>(fc->getField(i));749 GetPointerMFieldHandle>(fc->getField(i)); 751 750 752 751 //if(fieldPtr->getCardinality() == FieldType::SINGLE_FIELD) … … 762 761 else if(mfPtrHandle != NULL && mfPtrHandle->isValid() == true) 763 762 { 764 if( !(*mfPtrHandle)->empty())763 if(mfPtrHandle->size() > 0) 765 764 { 766 765 UInt32 size = 767 766 sizeof(UInt32) + 768 sizeof(UInt32) * (*mfPtrHandle)->size();767 sizeof(UInt32) * mfPtrHandle->size(); 769 768 770 769 _out->putValue(fieldName); 771 770 _out->putValue(fieldType); 772 771 _out->putValue(size); 773 774 772 writeMFFieldContainerPtr(mfPtrHandle); 775 773 } … … 795 793 _out->putValue(fieldType); 796 794 _out->putValue(size); 797 798 795 writeSFAttachmentMap(amap); 799 796 } … … 823 820 824 821 /*! Write the information for a single field ptr. */ 825 void NFIOBase::writeSFFieldContainerPtr( 826 SFFieldContainerPtr::GetHandlePtr field) 827 { 828 writeFCId((*field)->getValue()); 822 void NFIOBase::writeSFFieldContainerPtr(GetFCPointerSFieldHandlePtr field) 823 { 824 writeFCId(field->get()); 829 825 } 830 826 831 827 /*! Write the information for a mffield ptr. */ 832 void NFIOBase::writeMFFieldContainerPtr( 833 MFFieldContainerPtr::GetHandlePtr field) 834 { 835 UInt32 noe = (*field)->size(); 828 void NFIOBase::writeMFFieldContainerPtr(GetFCPointerSFieldHandlePtr field) 829 { 830 UInt32 noe = field->size(); 836 831 _out->putValue(noe); 837 832 838 833 for(UInt32 i = 0; i < noe; ++i) 839 834 { 840 writeFCId( (*(*field))[i]);835 writeFCId(field-get(i)); 841 836 } 842 837 } branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.h
r862 r990 140 140 bool endMarker = true); 141 141 static 142 void writeSFFieldContainerPtr( SFFieldContainerPtr::GetHandlePtr field );142 void writeSFFieldContainerPtr(GetFCPointerSFieldHandlePtr field ); 143 143 144 144 static 145 void writeMFFieldContainerPtr( MFFieldContainerPtr::GetHandlePtr field );145 void writeMFFieldContainerPtr(GetFCPointerMFieldHandlePtr field ); 146 146 147 147 static branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGOSBCommonElement.cpp
r862 r990 495 495 496 496 OSBRootElement *root = editRoot(); 497 UInt32 ptrId;497 UInt32 ptrId; 498 498 499 499 root->getReadHandler()->getValue(ptrId); branches/Carsten_PtrWork/Source/System/FileIO/build.info
r264 r990 1 1 #!python 2 2 # 3 3 4 if option_pass: 4 5 print "Processing option pass" branches/Carsten_PtrWork/Source/System/GraphOp/OSGMaterialMergeGraphOp.cpp
r989 r990 170 170 // SFFieldContainerPtr::GetHandle>(fhandleb); 171 171 172 if(isEqual( (*sfPtrHandleA)->getValue(),173 (*sfPtrHandleB)->getValue()) == false)172 if(isEqual(sfPtrHandleA->get(), 173 sfPtrHandleB->get() ) == false) 174 174 { 175 175 return false; … … 180 180 GetFCPointerMFieldHandlePtr mfPtrHandleB = 181 181 boost::dynamic_pointer_cast< 182 GetFCPointerMFieldHandle Ptr>(fhandleb);182 GetFCPointerMFieldHandle>(fhandleb); 183 183 184 184 // MFFieldContainerPtr::GetHandlePtr mfPtrHandleB = … … 186 186 // MFFieldContainerPtr::GetHandle>(fhandleb); 187 187 188 if((*mfPtrHandleA)->size() != 189 (*mfPtrHandleB)->size()) 188 if(mfPtrHandleA->size() != mfPtrHandleB->size()) 190 189 { 191 190 return false; 192 191 } 193 192 194 for(UInt32 j = 0; j < (*mfPtrHandleA)->size(); ++j)193 for(UInt32 j = 0; j < mfPtrHandleA->size(); ++j) 195 194 { 196 if(isEqual( (*(*mfPtrHandleA))[j],197 (*(*mfPtrHandleB))[j]) == false)195 if(isEqual(mfPtrHandleA->get(j), 196 mfPtrHandleB->get(j) ) == false) 198 197 { 199 198 return false; 200 199 } 200 201 // if(isEqual((*(*mfPtrHandleA))[j], 202 // (*(*mfPtrHandleB))[j]) == false) 203 // { 204 // return false; 205 // } 201 206 } 202 207 branches/Carsten_PtrWork/Source/System/GraphOp/OSGMergeGraphOp.cpp
r784 r990 229 229 Action::ResultE MergeGraphOp::excludeListLeave(NodePtrConstArg node, Action::ResultE res) 230 230 { 231 DirectionalLightPtr dlight = dynamic_cast<DirectionalLightPtr>(node->getCore()); 231 DirectionalLightPtr dlight = 232 dynamic_cast<DirectionalLightPtr>(node->getCore()); 232 233 if (dlight!=NullFC) 233 234 addToExcludeList(dlight->getBeacon()); … … 294 295 void MergeGraphOp::processGroups(NodePtrConst node) 295 296 { 296 std::vector<NodePtr>::const_iterator it = node->getMFChildren()->getValues().begin(); 297 std::vector<NodePtr>::const_iterator en = node->getMFChildren()->getValues().end (); 297 Node::ChildrenFieldType::const_iterator childIt = 298 node->getMFChildren()->begin(); 299 Node::ChildrenFieldType::const_iterator childEnd = 300 node->getMFChildren()->end (); 298 301 std::vector<NodePtr> toAdd; 299 302 std::vector<NodePtr> toSub; 300 303 301 for ( ; it != en; ++it)302 { 303 bool special=isInExcludeList(* it);304 bool leaf=isLeaf(* it);304 for(; childIt != childEnd; ++childIt) 305 { 306 bool special=isInExcludeList(*childIt); 307 bool leaf=isLeaf(*childIt); 305 308 306 if (isGroup(*it))309 if(isGroup(*childIt)) 307 310 { 308 if (!leaf && !special) 309 { 310 std::vector<NodePtr>::const_iterator it2 = (*it)->getMFChildren()->getValues().begin(); 311 std::vector<NodePtr>::const_iterator en2 = (*it)->getMFChildren()->getValues().end (); 311 if(!leaf && !special) 312 { 313 Node::ChildrenFieldType::const_iterator childIt2 = 314 (*childIt)->getMFChildren()->begin(); 315 Node::ChildrenFieldType::const_iterator childEnd2 = 316 (*childIt)->getMFChildren()->end (); 312 317 313 for ( ; it2 != en2; ++it2 )318 for ( ; childIt2 != childEnd2; ++childIt2 ) 314 319 { 315 toAdd.push_back(* it2);320 toAdd.push_back(*childIt2); 316 321 } 317 322 } … …
