Show
Ignore:
Timestamp:
02/12/08 09:51:59 (9 months ago)
Author:
cneumann
Message:

fixed: - pointer fields: sync/copyFromBin order of inc/dec refcount

(always inc new pointer first, then dec old pointer)

  • cluster server: commented out writing of .osg file on each frame
  • multi display window: merged fix from trunk (r1058)
  • tutorial 12: empty address check

added: - pointer field handles: implemented equal and share

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/OSGEditMParentFCPointerFieldHandle.inl

    r1039 r1060  
    8080} 
    8181 
    82 /*-------------------------------------------------------------------------*/ 
    83 /* Type Query                                                              */ 
    84  
    85 inline bool 
    86 EditMParentFCPointerFieldBaseHandle::isParentPointerField(void) const 
    87 { 
    88     return true; 
    89 } 
    90  
    9182/*! \class EditMParentFCPointerFieldHandle<FieldT> 
    9283 
     
    198189EditMParentFCPointerFieldHandle<FieldT>::equal(EditFieldHandlePtr rhs) 
    199190{ 
    200     FWARNING(("EditMParentFCPointerFieldHandle<FieldT>::equal(): NIY\n")); 
    201      
    202     return false; 
     191    bool retVal = true; 
     192     
     193    EditMParentFCPointerFieldBaseHandlePtr castRHS = 
     194        boost::dynamic_pointer_cast<EditMParentFCPointerFieldBaseHandle>(rhs); 
     195     
     196    if(castRHS == NULL) 
     197    { 
     198        retVal = false; 
     199    } 
     200    else 
     201    { 
     202        UInt32 thisSize = this   ->size(); 
     203        UInt32 rhsSize  = castRHS->size(); 
     204     
     205        if(thisSize != rhsSize) 
     206        { 
     207            retVal = false; 
     208        } 
     209        else 
     210        { 
     211            for(UInt32 i = 0; i < thisSize; ++i) 
     212            { 
     213                if(this->get(i) != castRHS->get(i)) 
     214                { 
     215                    retVal = false; 
     216                    break; 
     217                } 
     218            } 
     219        } 
     220    } 
     221     
     222    return retVal; 
    203223} 
    204224