Changeset 990

Show
Ignore:
Timestamp:
10/26/07 16:47:58 (8 months ago)
Author:
cneumann
Message:

fixed: more compile errors
added: size() member function for {Edit|Get}Pointer{S|M}FieldHandle?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulator.cpp

    r852 r990  
    144144        { 
    145145            //std::cout << "parent size= " << parents.getSize() << std::endl; 
    146             parent = dynamic_cast<NodePtr>(getParents()[0].getCPtr()); // Dangerous! multiple parents? 
     146            parent = dynamic_cast<NodePtr>(getParents()[0].get()); // Dangerous! multiple parents? 
    147147        } 
    148148        else 
  • branches/Carsten_PtrWork/Source/Contrib/Manipulators/OSGManipulatorManager.cpp

    r784 r990  
    8383        if ( ! _maniC->getParents().empty() ) 
    8484        { 
    85             NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0].getCPtr()); 
     85            NodePtr maniN = dynamic_cast<NodePtr>(_maniC->getParents()[0].get()); 
    8686 
    8787            _maniC = NullFC; 
  • branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalAction.cpp

    r916 r990  
    471471    else if(! _useNewList) // new list is empty, but not used? 
    472472    { 
    473         std::vector<NodePtr>::const_iterator it; 
     473        Node::ChildrenFieldType::const_iterator it; 
    474474 
    475475        for(  it  = node->getMFChildren()->begin(); 
  • branches/Carsten_PtrWork/Source/System/Action/RenderTraversal/OSGRenderTraversalActionInit.cpp

    r936 r990  
    398398        pAction->pushState(); 
    399399 
    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; 
    403405 
    404406        while(chIt != chEnd) 
     
    11861188    MultiCorePtr pMultiCore = dynamic_cast<MultiCorePtr>(pCore); 
    11871189 
    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  (); 
    11901194 
    11911195    Action::ResultE returnValue = Action::Continue; 
     
    12181222    MultiCorePtr pMultiCore = dynamic_cast<MultiCorePtr>(pCore); 
    12191223 
    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  (); 
    12221228 
    12231229    Action::ResultE returnValue = Action::Continue; 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGAttachmentContainer.h

    r976 r990  
    7878    OSG_GEN_INTERNALPTR(AttachmentContainer); 
    7979 
     80    typedef SFAttachmentObjPtrMap AttachmentsFieldType; 
     81     
    8082    /*! \}                                                                 */ 
    8183    /*---------------------------------------------------------------------*/ 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldBundleAttachment.h

    r982 r990  
    227227}; 
    228228 
    229 OSG_GEN_BUNDLEP(FieldBundleAttachment); 
     229OSG_GEN_CONTAINERPTR(FieldBundleAttachment); 
     230     
     231typedef RefCountPtrBuilder        <FieldBundleAttachment, 
     232                                   FieldBundle           >::Ptr 
     233    FieldBundleAttachmentRefPtr; 
     234typedef MTRefCountPtrBuilder      <FieldBundleAttachment, 
     235                                   FieldBundle           >::Ptr 
     236    FieldBundleAttachmentMTRefPtr; 
     237typedef InternalRefCountPtrBuilder<FieldBundleAttachment, 
     238                                   FieldBundle           >::Ptr 
     239    FieldBundleAttachmentInternalRefPtr; 
    230240 
    231241OSG_END_NAMESPACE 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGFieldContainerAttachment.h

    r982 r990  
    238238 
    239239OSG_GEN_CONTAINERPTR(FieldContainerAttachment); 
    240  
    241 typedef InternalRefCountPtrBuilder<FieldContainerAttachment>::Ptr 
    242     FieldContainerAttachmentInternalRefPtr; 
    243      
     240    
    244241typedef RefCountPtrBuilder<FieldContainerAttachment>::Ptr 
    245242    FieldContainerAttachmentRefPtr; 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Base/OSGWeakPtrTest.cpp

    r967 r990  
    3838 
    3939#include <OpenSG/OSGFieldContainer.h> 
    40 #include <OpenSG/OSGWeakPtr.h> 
    4140#include <OpenSG/OSGNode.h> 
    4241#include <OpenSG/OSGNodeCore.h> 
     
    4948using namespace OSG; 
    5049 
    51 typedef WeakPtr<NodeCore>   NodeCoreWeakPtr; 
    52 typedef WeakPtr<Transform>  TransformWeakPtr; 
    53  
    5450SUITE(WeakPtrTests) 
    5551{ 
     
    5753TEST(create) 
    5854{     
    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); 
    6461 
    6562    { 
    66         NodeWeakPtr w2(np); 
     63        NodeWeakRefPtr wp2(np); 
    6764        CHECK(np->getWeakRefCount() == 1);    
    6865    } 
    6966    CHECK(np->getWeakRefCount() == 0);    
    7067     
    71     NodeWeakPtr w3(r); 
     68    NodeWeakRefPtr wp3(rp); 
    7269    CHECK(np->getWeakRefCount() == 1);    
    7370     
    7471    { 
    75         NodeWeakPtr w4(w3); 
     72        NodeWeakRefPtr wp4(wp3); 
    7673        CHECK(np->getWeakRefCount() == 2);    
    7774    } 
     
    8178TEST(convertAndAssign) 
    8279{ 
    83     NodePtr np = Node::create(); 
    84     NodeRefPtr r(np); 
     80    NodePtr    np = Node::create(); 
     81    NodeRefPtr rp(np); 
     82     
    8583    CHECK(np->getWeakRefCount()     == 0);  
    8684    CHECK(np->getExternalRefCount() == 1);  
    8785     
    88     NodeWeakPtr w
    89     w = np; 
     86    NodeWeakRefPtr wp
     87    wp = np; 
    9088    CHECK(np->getWeakRefCount() == 1);  
    9189     
    92     NodeWeakPtr w2;     
    93     w2 = w
     90    NodeWeakRefPtr wp2;     
     91    wp2 = wp
    9492    CHECK(np->getWeakRefCount() == 2);  
    9593     
    96     NodeWeakPtr w3;     
    97     w3 = r
     94    NodeWeakRefPtr wp3;     
     95    wp3 = rp
    9896    CHECK(np->getWeakRefCount() == 3);  
    9997     
    100     NodeRefPtr r2;     
    101     r2 = w
     98    NodeRefPtr rp2;     
     99    rp2 = wp
    102100    CHECK(np->getExternalRefCount() == 2);  
    103101    
    104     NodeRefPtr r3;     
    105     r3 = w.get(); 
     102    NodeRefPtr rp3;     
     103    rp3 = wp.get(); 
    106104    CHECK(np->getExternalRefCount() == 3);  
    107105} 
     
    112110    NodePtr np2 = Node::create(); 
    113111 
    114     NodeRefPtr r(np), r2(np2); 
     112    NodeRefPtr     rp(np), rp2(np2); 
     113    NodeWeakRefPtr wp(np), wp2(np), wp3(np2); 
    115114     
    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);  
    120117     
    121118//    CHECK(w == np); 
     
    123120     
    124121     
    125     CHECK(w); 
     122    CHECK(wp); 
    126123     
    127     NodeWeakPtr w4; 
     124    NodeWeakRefPtr wp4; 
    128125     
    129     CHECK(!w4); 
     126    CHECK(!wp4); 
    130127} 
    131128 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Base/testFCPtrs.cpp

    r791 r990  
    33#include <OSGNode.h> 
    44#include <OSGNodeCore.h> 
    5 #include <OSGRefPtr.h> 
    65 
    76 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGAttachmentMapFieldTraits.h

    r785 r990  
    5555 
    5656typedef std::map<UInt32,  
    57                  FieldBundleAttachmentP     > FieldBundleAttachmentMap; 
     57                 FieldBundleAttachmentInternalRefPtr   > FieldBundleAttachmentMap; 
    5858typedef std::map<UInt32,  
    59                  FieldContainerAttachmentPtr> FieldContainerAttachmentMap; 
     59                 FieldContainerAttachmentInternalRefPtr> FieldContainerAttachmentMap; 
    6060 
    6161#if !defined(OSG_DO_DOC) || (OSG_DOC_LEVEL >= 3) 
     
    242242            key = (static_cast<UInt32>(attPtr->getGroupId()) << 16) | binding; 
    243243             
    244             aMap.insert(FieldContainerAttachmentMap::value_type(key, attPtr)); 
     244            aMap.insert(FieldContainerAttachmentMap::value_type( 
     245                key, FieldContainerAttachmentInternalRefPtr(attPtr))); 
    245246        } 
    246247    } 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGEditPointerMFieldHandle.h

    r989 r990  
    131131    /*! \{                                                                 */ 
    132132            
     133    virtual UInt32        size   (void                           ) = 0; 
    133134    virtual RootObjectPtr get    (UInt32 const       uiIndex     ) = 0; 
    134135    virtual void          add    (RootObjectPtrConst pNewElement ) = 0; 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerMFieldHandle.h

    r989 r990  
    113113 
    114114    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        
    116124    /*! \}                                                                 */ 
    117125    /*=========================  PROTECTED  ===============================*/ 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGGetPointerSFieldHandle.h

    r989 r990  
    113113 
    114114    virtual bool equal(typename Inherited::Ptr rhs) = 0; 
    115              
     115     
     116    /*! \}                                                                 */ 
     117    /*---------------------------------------------------------------------*/ 
     118    /*! \name Operations                                                   */ 
     119    /*! \{                                                                 */ 
     120     
     121    virtual RootObjectPtr get(void) = 0; 
     122     
    116123    /*! \}                                                                 */ 
    117124    /*=========================  PROTECTED  ===============================*/ 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.h

    r989 r990  
    151151    void setAddMethod(AddMethod fMethod); 
    152152     
     153    virtual UInt32        size   (void                           ); 
    153154    virtual RootObjectPtr get    (UInt32 const       uiIndex     ); 
    154155    virtual void          add    (RootObjectPtrConst pNewElement ); 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditMFieldHandle.inl

    r989 r990  
    260260 
    261261template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
     262inline UInt32 
     263EditMFieldHandle< 
     264    MField<ReferenceCountPointer<ObjectT, 
     265                                 RefCountPolicyT, 
     266                                 RootObjectT     > > >::size(void) 
     267{ 
     268    return static_cast<HandledFieldType *>(this->_pField)->size(); 
     269} 
     270 
     271template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
    262272inline typename  
    263273    EditMFieldHandle< 
     
    271281    UInt32 const uiIndex) 
    272282{ 
    273     FWARNING(("EditMFieldHandle<MField<ReferenceCountPointer<ObjectT, " 
    274               "RefCountPolicyT, RootObjectT > > >::get()\n")); 
    275  
    276     return NULL; 
     283    return (*static_cast<HandledFieldType *>(this->_pField))[uiIndex]; 
    277284} 
    278285 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.h

    r989 r990  
    151151    void                  setSetMethod(SetMethod          fMethod  ); 
    152152    virtual void          setValue    (RootObjectPtrConst pNewValue); 
    153          
     153     
    154154    virtual RootObjectPtr get         (void                        ); 
    155155    virtual void          set         (RootObjectPtrConst pNewValue); 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerEditSFieldHandle.inl

    r989 r990  
    270270 
    271271template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
    272 inline typename 
     272inline typename  
    273273    EditSFieldHandle< 
    274274        SField<ReferenceCountPointer<ObjectT, 
     
    280280                                 RootObjectT     > > >::get(void) 
    281281{ 
    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(); 
    286283} 
    287284 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.h

    r989 r990  
    127127    /*! \}                                                                 */ 
    128128    /*---------------------------------------------------------------------*/ 
     129    /*! \name Operations                                                   */ 
     130    /*! \{                                                                 */ 
     131     
     132    virtual UInt32        size(void                ); 
     133    virtual RootObjectPtr get (UInt32 const uiIndex); 
     134     
     135    /*! \}                                                                 */ 
     136    /*---------------------------------------------------------------------*/ 
    129137    /*! \name Access                                                       */ 
    130138    /*! \{                                                                 */ 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetMFieldHandle.inl

    r989 r990  
    187187     
    188188/*-------------------------------------------------------------------------*/ 
     189/* Operations                                                              */ 
     190 
     191template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
     192inline UInt32 
     193GetMFieldHandle< 
     194    MField<ReferenceCountPointer<ObjectT, 
     195                                 RefCountPolicyT, 
     196                                 RootObjectT     > > >::size(void) 
     197{ 
     198    return static_cast<HandledFieldType const *>(this->_pField)->size(); 
     199} 
     200 
     201template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
     202inline typename  
     203    GetMFieldHandle< 
     204        MField<ReferenceCountPointer<ObjectT, 
     205                                     RefCountPolicyT, 
     206                                     RootObjectT     > > >::RootObjectPtr 
     207GetMFieldHandle< 
     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/*-------------------------------------------------------------------------*/ 
    189217/* Access                                                                  */ 
    190218 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.h

    r989 r990  
    124124 
    125125    virtual bool equal(GetFieldHandlePtr rhs); 
    126          
     126     
     127    /*! \}                                                                 */ 
     128    /*---------------------------------------------------------------------*/ 
     129    /*! \name Operations                                                   */ 
     130    /*! \{                                                                 */ 
     131     
     132    virtual RootObjectPtr get(void); 
     133     
    127134    /*! \}                                                                 */ 
    128135    /*---------------------------------------------------------------------*/ 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Fields/OSGReferenceCountPointerGetSFieldHandle.inl

    r989 r990  
    187187     
    188188/*-------------------------------------------------------------------------*/ 
     189/* Operations                                                              */ 
     190 
     191template <class ObjectT, class RefCountPolicyT, class RootObjectT> 
     192inline typename  
     193    GetSFieldHandle< 
     194        SField<ReferenceCountPointer<ObjectT, 
     195                                     RefCountPolicyT, 
     196                                     RootObjectT     > > >::RootObjectPtr 
     197GetSFieldHandle< 
     198    SField<ReferenceCountPointer<ObjectT, 
     199                                 RefCountPolicyT, 
     200                                 RootObjectT     > > >::get(void) 
     201{ 
     202    return static_cast<HandledFieldType const *>(this->_pField)->getValue(); 
     203} 
     204 
     205/*-------------------------------------------------------------------------*/ 
    189206/* Access                                                                  */ 
    190207 
  • branches/Carsten_PtrWork/Source/System/FieldContainer/Node/testNode.cpp

    r870 r990  
    7272    tp->getType().dump(); 
    7373 
    74     OSG::SFNodePtr::getClassType().dump(); 
    75     OSG::MFNodePtr::getClassType().dump(); 
     74    OSG::SFNodeInternalRefPtr::getClassType().dump(); 
     75    OSG::MFNodeInternalRefPtr::getClassType().dump(); 
    7676 
    77     OSG::SFFieldContainerPtr::getClassType().dump(); 
    78     OSG::MFFieldContainerPtr::getClassType().dump(); 
     77    OSG::SFFieldContainerInternalRefPtr::getClassType().dump(); 
     78    OSG::MFFieldContainerInternalRefPtr::getClassType().dump(); 
    7979 
    8080    return 0; 
  • branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.cpp

    r934 r990  
    741741               FieldTraits<FieldContainerPtr>::getType()) == true) 
    742742            { 
    743  
    744                 SFFieldContainerPtr::GetHandlePtr sfPtrHandle = 
     743                GetPointerSFieldHandlePtr sfPtrHandle = 
    745744                    boost::dynamic_pointer_cast< 
    746                         SFFieldContainerPtr::GetHandle>(fc->getField(i)); 
    747  
    748                 MFFieldContainerPtr::GetHandlePtr mfPtrHandle = 
     745                        GetPointerSFieldHandle>(fc->getField(i)); 
     746 
     747                GetPointerMFieldHandlePtr mfPtrHandle = 
    749748                    boost::dynamic_pointer_cast< 
    750                         MFFieldContainerPtr::GetHandle>(fc->getField(i)); 
     749                        GetPointerMFieldHandle>(fc->getField(i)); 
    751750  
    752751                //if(fieldPtr->getCardinality() == FieldType::SINGLE_FIELD) 
     
    762761                else if(mfPtrHandle != NULL && mfPtrHandle->isValid() == true) 
    763762                { 
    764                     if(!(*mfPtrHandle)->empty()
     763                    if(mfPtrHandle->size() > 0
    765764                    { 
    766765                        UInt32 size =  
    767766                            sizeof(UInt32) +  
    768                             sizeof(UInt32) * (*mfPtrHandle)->size(); 
     767                            sizeof(UInt32) * mfPtrHandle->size(); 
    769768 
    770769                        _out->putValue(fieldName); 
    771770                        _out->putValue(fieldType); 
    772771                        _out->putValue(size); 
    773  
    774772                        writeMFFieldContainerPtr(mfPtrHandle); 
    775773                    } 
     
    795793                        _out->putValue(fieldType); 
    796794                        _out->putValue(size); 
    797                          
    798795                        writeSFAttachmentMap(amap); 
    799796                    } 
     
    823820 
    824821/*! Write the information for a single field ptr. */ 
    825 void NFIOBase::writeSFFieldContainerPtr( 
    826     SFFieldContainerPtr::GetHandlePtr field) 
    827 
    828     writeFCId((*field)->getValue()); 
     822void NFIOBase::writeSFFieldContainerPtr(GetFCPointerSFieldHandlePtr field) 
     823
     824    writeFCId(field->get()); 
    829825} 
    830826 
    831827/*! Write the information for a mffield ptr. */ 
    832 void NFIOBase::writeMFFieldContainerPtr( 
    833     MFFieldContainerPtr::GetHandlePtr field) 
    834 
    835     UInt32 noe = (*field)->size(); 
     828void NFIOBase::writeMFFieldContainerPtr(GetFCPointerSFieldHandlePtr field) 
     829
     830    UInt32 noe = field->size(); 
    836831    _out->putValue(noe); 
    837832 
    838833    for(UInt32 i = 0; i < noe; ++i) 
    839834    { 
    840         writeFCId((*(*field))[i]); 
     835        writeFCId(field-get(i)); 
    841836    } 
    842837} 
  • branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGNFIOBase.h

    r862 r990  
    140140                                         bool endMarker = true); 
    141141    static  
    142     void writeSFFieldContainerPtr(SFFieldContainerPtr::GetHandlePtr field  ); 
     142    void writeSFFieldContainerPtr(GetFCPointerSFieldHandlePtr field  ); 
    143143 
    144144    static  
    145     void writeMFFieldContainerPtr(MFFieldContainerPtr::GetHandlePtr field  ); 
     145    void writeMFFieldContainerPtr(GetFCPointerMFieldHandlePtr field  ); 
    146146 
    147147    static  
  • branches/Carsten_PtrWork/Source/System/FileIO/OSB/OSGOSBCommonElement.cpp

    r862 r990  
    495495 
    496496    OSBRootElement *root  = editRoot(); 
    497     UInt32          ptrId; 
     497    UInt32          ptrId; 
    498498 
    499499    root->getReadHandler()->getValue(ptrId); 
  • branches/Carsten_PtrWork/Source/System/FileIO/build.info

    r264 r990  
    11#!python 
    22# 
     3 
    34if option_pass: 
    45   print "Processing option pass" 
  • branches/Carsten_PtrWork/Source/System/GraphOp/OSGMaterialMergeGraphOp.cpp

    r989 r990  
    170170//                         SFFieldContainerPtr::GetHandle>(fhandleb); 
    171171 
    172                 if(isEqual((*sfPtrHandleA)->getValue(), 
    173                            (*sfPtrHandleB)->getValue()) == false) 
     172                if(isEqual(sfPtrHandleA->get(), 
     173                           sfPtrHandleB->get() ) == false) 
    174174                { 
    175175                    return false; 
     
    180180                GetFCPointerMFieldHandlePtr mfPtrHandleB = 
    181181                    boost::dynamic_pointer_cast< 
    182                         GetFCPointerMFieldHandlePtr>(fhandleb); 
     182                        GetFCPointerMFieldHandle>(fhandleb); 
    183183             
    184184//                 MFFieldContainerPtr::GetHandlePtr mfPtrHandleB = 
     
    186186//                         MFFieldContainerPtr::GetHandle>(fhandleb); 
    187187 
    188                 if((*mfPtrHandleA)->size() != 
    189                    (*mfPtrHandleB)->size()) 
     188                if(mfPtrHandleA->size() != mfPtrHandleB->size()) 
    190189                { 
    191190                    return false; 
    192191                } 
    193192 
    194                 for(UInt32 j = 0; j < (*mfPtrHandleA)->size(); ++j) 
     193                for(UInt32 j = 0; j < mfPtrHandleA->size(); ++j) 
    195194                { 
    196                     if(isEqual((*(*mfPtrHandleA))[j]
    197                                (*(*mfPtrHandleB))[j]) == false) 
     195                    if(isEqual(mfPtrHandleA->get(j)
     196                               mfPtrHandleB->get(j) ) == false) 
    198197                    { 
    199198                        return false; 
    200199                    } 
     200                 
     201//                     if(isEqual((*(*mfPtrHandleA))[j], 
     202//                                (*(*mfPtrHandleB))[j]) == false) 
     203//                     { 
     204//                         return false; 
     205//                     } 
    201206                } 
    202207 
  • branches/Carsten_PtrWork/Source/System/GraphOp/OSGMergeGraphOp.cpp

    r784 r990  
    229229Action::ResultE MergeGraphOp::excludeListLeave(NodePtrConstArg node, Action::ResultE res) 
    230230{ 
    231     DirectionalLightPtr dlight = dynamic_cast<DirectionalLightPtr>(node->getCore()); 
     231    DirectionalLightPtr dlight =  
     232        dynamic_cast<DirectionalLightPtr>(node->getCore()); 
    232233    if (dlight!=NullFC) 
    233234        addToExcludeList(dlight->getBeacon()); 
     
    294295void MergeGraphOp::processGroups(NodePtrConst node) 
    295296{ 
    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  (); 
    298301    std::vector<NodePtr> toAdd; 
    299302    std::vector<NodePtr> toSub; 
    300303     
    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); 
    305308         
    306         if (isGroup(*it)) 
     309        if(isGroup(*childIt)) 
    307310        { 
    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  (); 
    312317                 
    313                 for ( ; it2 != en2; ++it2 ) 
     318                for ( ; childIt2 != childEnd2; ++childIt2 ) 
    314319                { 
    315                     toAdd.push_back(*it2); 
     320                    toAdd.push_back(*childIt2); 
    316321                }                 
    317322            }