Show
Ignore:
Timestamp:
04/02/08 14:18:07 (8 months ago)
Author:
cneumann
Message:

replaced pointer field implementation
split FieldContainer/Fields? directory into Base and Handle subdir

Status: - ref counting seems to work (mt, cluster)

  • new OSB loader works (well, the unittest does)
  • VRML loader is deactivated
  • get/edit handle for dynamic (pointer) fields missing
  • need to remove some more old files - they get moved in this commit
  • generated (i.e. base) code in following commit
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Carsten_PtrWork2/Source/System/FieldContainer/Base/OSGFieldContainer.cpp

    r1068 r1072  
    112112} 
    113113 
     114/*! Internal function to establish a link from this container to its parent. 
     115    \warning Do NOT call this function manually, it is reserved for use by the 
     116    system. 
     117     
     118    \param[in] pParent The parent. 
     119    \param[in] childFieldId Id of the field that holds the 
     120        pointer to \em this. 
     121    \param[in] parentFieldId Id of the field that should store the 
     122        pointer to \em pParent. 
     123     
     124    \return \c true if the linking succeeded, \c false otherwise. 
     125     
     126    \dev 
     127        This is normally overridden by generated code. 
     128    \enddev 
     129 */ 
     130bool 
     131    FieldContainer::linkParent( 
     132        FieldContainerPtrConst pParent, 
     133        UInt16 const           childFieldId, 
     134        UInt16 const           parentFieldId) 
     135{ 
     136    return true; 
     137} 
     138 
     139/*! Internal function to remove a link from this container to its parent. 
     140    \warning Do NOT call this function manually, it is reserved for use by the 
     141    system. 
     142     
     143    \param[in] pParent The parent. 
     144    \param[in] parentFieldId Id of the field (in \c this) that stores the 
     145        pointer to \a pParent. 
     146     
     147    \return \c true if the unlinking succeeded, \c false otherwise. 
     148     
     149    \dev 
     150        This is normally overridden by generated code. 
     151    \enddev 
     152 */ 
     153bool 
     154    FieldContainer::unlinkParent( 
     155        FieldContainerPtrConst pParent, 
     156        UInt16 const           parentFieldId) 
     157{ 
     158    return true; 
     159} 
     160 
     161/*! Internal function to remove a link from this container to a child. 
     162    \warning Do NOT call this function manually, it is reserved for use by the 
     163    system. 
     164     
     165    \param[in] pChild Child to unlink. 
     166    \param[in] childFieldId Id of the field (in \c this) that holds the 
     167        pointer to \a pChild. 
     168     
     169    \return \c true if the unlinking succeeded, \c false otherwise. 
     170     
     171    \dev 
     172        This is normally overridden by generated code. 
     173    \enddev 
     174 */ 
     175bool 
     176    FieldContainer::unlinkChild( 
     177        FieldContainerPtrConst pChild, 
     178        UInt16 const           childFieldId) 
     179{ 
     180    return true; 
     181} 
     182 
    114183void FieldContainer::invalidateVolume(void) 
    115184{ 
     
    178247        _pContainerChanges = Thread::getCurrentChangeList()->getNewEntry(); 
    179248 
    180         _pContainerChanges->uiEntryDesc   = ContainerChangeEntry::Change; 
    181249        _pContainerChanges->pFieldFlags   = _pFieldFlags; 
    182250        _pContainerChanges->uiContainerId = this->getId(); 
     
    184252    } 
    185253 
     254    _pContainerChanges->uiEntryDesc |= ContainerChangeEntry::Change; 
     255     
     256    Thread::getCurrentChangeList()->addUncommited(_pContainerChanges); 
     257} 
     258 
     259void 
     260    FieldContainer::registerResolveContainer(void) 
     261{ 
     262    if(_pContainerChanges == NULL) 
     263    { 
     264        _pContainerChanges = Thread::getCurrentChangeList()->getNewEntry(); 
     265         
     266        _pContainerChanges->pFieldFlags          = _pFieldFlags; 
     267        _pContainerChanges->uiContainerId        = this->getId(); 
     268        _pContainerChanges->bvUncommittedChanges = &_bvChanged; 
     269    } 
     270         
     271    _pContainerChanges->uiEntryDesc |= ContainerChangeEntry::ResolveCandidate; 
     272     
     273    Thread::getCurrentChangeList()->addUncommited(_pContainerChanges); 
     274} 
     275 
     276void 
     277    FieldContainer::registerDestroyContainer(void) 
     278{ 
     279    if(_pContainerChanges == NULL) 
     280    { 
     281        _pContainerChanges = Thread::getCurrentChangeList()->getNewEntry(); 
     282         
     283        _pContainerChanges->pFieldFlags          = _pFieldFlags; 
     284        _pContainerChanges->uiContainerId        = this->getId(); 
     285        _pContainerChanges->bvUncommittedChanges = &_bvChanged; 
     286    } 
     287         
     288    _pContainerChanges->uiEntryDesc |= ContainerChangeEntry::DestroyCandidate; 
     289     
    186290    Thread::getCurrentChangeList()->addUncommited(_pContainerChanges); 
    187291}