Changeset 1145

Show
Ignore:
Timestamp:
04/10/08 21:19:34 (1 month ago)
Author:
vossg
Message:

removed: not needed base classes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/Base/Field/OSGFieldType.h

    r1144 r1145  
    7878 
    7979     
    80 #if 0 
    81     enum Class 
    82     { 
    83         ValueField      = OSG::ValueField, 
    84         PtrField        = OSG::PtrField, 
    85         ParentPtrField  = OSG::ParentPtrField, 
    86         ChildPtrField   = OSG::ChildPtrField 
    87 #ifndef OSG_DELETE_LATER 
    88         ,WeakPtrField   = OSG::WeakPtrField 
    89 #endif 
    90     }; 
    91 #else 
    9280    enum Class 
    9381    { 
     
    9684        ParentPtrField, 
    9785        ChildPtrField 
     86#ifndef OSG_DELETE_LATER 
     87        ,WeakPtrField  
     88#endif 
    9889    }; 
    99 #endif 
    10090 
    10191    /*---------------------------------------------------------------------*/ 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerMField.h

    r1144 r1145  
    350350                             NamespaceI                    >  MFieldTraits; 
    351351    typedef FieldDescription<MFieldTraits, 
    352                              MultiField, 
     352                             FieldType::MultiField, 
    353353                             UnrecordedRefCountPolicy, 
    354                              ChildPtrField>  Description; 
     354                             FieldType::ChildPtrField>  Description; 
    355355                                       
    356356    // handles 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerSField.h

    r1144 r1145  
    122122                             NamespaceI                    >  SFieldTraits; 
    123123    typedef FieldDescription<SFieldTraits, 
    124                              SingleField, 
     124                             FieldType::SingleField, 
    125125                             UnrecordedRefCountPolicy, 
    126                              ChildPtrField>  Description; 
     126                             FieldType::ChildPtrField>  Description; 
    127127     
    128128    // handles 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.h

    r1144 r1145  
    88 
    99#include "OSGConfig.h" 
    10 #include "OSGParentPointerMFieldBase.h" 
     10#include "OSGPointerMFieldCommon.h" 
     11#include "OSGPointerAccessHandler.h" 
    1112#include "OSGPointerFieldConfigs.h" 
    12 //#include "OSGEditParentPointerMFieldHandle.h" 
    13 //#include "OSGGetParentPointerMFieldHandle.h" 
    1413 
    1514#ifdef OSG_DOC_FILES_IN_MODULE 
     
    206205template <class ObjectTypeT, 
    207206          Int32 NamespaceI  = 0> 
    208 class ParentPointerMField : public ParentPointerMFieldBase<NamespaceI> 
     207class ParentPointerMField  
     208    : public PointerMFieldCommon<NoRefCountAccessHandler, NamespaceI> 
    209209{ 
    210210    /*==========================  PUBLIC  =================================*/ 
     
    216216    typedef          ObjectTypeT                           ObjectType; 
    217217         
    218     typedef          ParentPointerMFieldBase<NamespaceI  > Inherited; 
     218    typedef          PointerMFieldCommon<NoRefCountAccessHandler,  
     219                                         NamespaceI      > Inherited; 
    219220    typedef          ParentPointerMField    <ObjectTypeT, 
    220221                                             NamespaceI  > Self; 
     
    232233    typedef typename FieldConfig::ConstPtrType             const_pointer; 
    233234    typedef typename FieldConfig::MFieldConstRefType       const_reference; 
     235 
     236    typedef          UInt16                                  IdStoredType; 
     237    typedef          MFieldVector<IdStoredType>              IdStoreType; 
     238    typedef typename IdStoreType::iterator                   IdStoreItType; 
     239    typedef typename IdStoreType::const_iterator             IdStoreConstItType; 
     240     
     241    typedef          FieldTraits<IdStoredType >              IdBaseTraitsType; 
     242     
     243    typedef typename Inherited::size_type                    size_type; 
     244    typedef typename Inherited::difference_type              difference_type; 
    234245     
    235246    typedef FieldTraits     <ValueType, 
     
    237248 
    238249    typedef FieldDescription<MFieldTraits, 
    239                              MultiField, 
     250                             FieldType::MultiField, 
    240251                             NoRefCountPolicy, 
    241                              ParentPtrField>  Description; 
     252                             FieldType::ParentPtrField>  Description; 
    242253     
    243254    // handles 
     
    302313    /*! \}                                                                 */ 
    303314    /*---------------------------------------------------------------------*/ 
     315    /*! \name IdStore Interface                                            */ 
     316    /*! \{                                                                 */ 
     317     
     318    // reading values 
     319    UInt16 const idStoreGet(UInt32 const       index) const; 
     320    UInt16 const idStoreGet(IdStoreItType      pos  ) const; 
     321    UInt16 const idStoreGet(IdStoreConstItType pos  ) const; 
     322   
     323    // adding values 
     324    void  idStoreAppend (UInt16 const   newId     ); 
     325    void  idStoreInsert (UInt32 const   index, 
     326                         UInt16 const   newId     ); 
     327    void  idStoreInsert (IdStoreItType  pos, 
     328                         UInt16 const   newId     ); 
     329    template <class InputIteratorT> 
     330    void  idStoreInsert (IdStoreItType  pos, 
     331                         InputIteratorT first, 
     332                         InputIteratorT last      ); 
     333    // changing values 
     334    void  idStoreReplace(UInt32 const  index, 
     335                         UInt16 const  newId      ); 
     336    void  idStoreReplace(IdStoreItType pos, 
     337                         UInt16 const  newId      ); 
     338     
     339    // removing values 
     340    void  idStoreErase  (UInt32 const  index      ); 
     341    void  idStoreErase  (IdStoreItType pos        ); 
     342    void  idStoreErase  (UInt32 const  beginIndex, 
     343                         UInt32 const  endIndex   ); 
     344    void  idStoreErase  (IdStoreItType begin, 
     345                         IdStoreItType end        ); 
     346    void  idStoreClear  (void                     ); 
     347     
     348    // finding values 
     349    Int32              idStoreFindIndex(UInt16 const fieldId) const; 
     350    IdStoreItType      idStoreFind     (UInt16 const fieldId); 
     351    IdStoreConstItType idStoreFind     (UInt16 const fieldId) const; 
     352         
     353    /*! \}                                                                 */ 
     354    /*---------------------------------------------------------------------*/ 
     355    /*! \name Raw IdStore Access                                           */ 
     356    /*! \{                                                                 */ 
     357     
     358    IdStoreType       &editRawIdStore(void); 
     359    IdStoreType const &getRawIdStore (void) const; 
     360 
     361    /*! \}                                                                 */ 
     362    /*---------------------------------------------------------------------*/ 
     363    /*! \name Std library interface                                        */ 
     364    /*! \{                                                                 */ 
     365     
     366    void reserve(size_type size); 
     367     
     368    /*! \}                                                                 */ 
     369    /*---------------------------------------------------------------------*/ 
     370    /*! \name Binary IO                                                    */ 
     371    /*! \{                                                                 */ 
     372 
     373    UInt32 getBinSize (void                   ) const; 
     374    void   copyToBin  (BinaryDataHandler &pMem) const; 
     375    void   copyFromBin(BinaryDataHandler &pMem); 
     376     
     377    /*! \}                                                                 */ 
     378    /*---------------------------------------------------------------------*/ 
     379    /*! \name MT Sync                                                      */ 
     380    /*! \{                                                                 */ 
     381 
     382    void  syncWith      (Self               &source,  
     383                         ConstFieldMaskArg   syncMode, 
     384                         UInt32              uiSyncInfo, 
     385                         AspectOffsetStore  &oOffsets    ); 
     386    void  beginEdit     (UInt32              uiAspect, 
     387                         AspectOffsetStore  &oOffsets    ); 
     388    Self *resolveShare  (UInt32              uiAspect,  
     389                         AspectOffsetStore  &oOffsets    ); 
     390    void  terminateShare(UInt32              uiAspect,  
     391                         AspectOffsetStore  &oOffsets    ); 
     392    bool  isShared      (void                            ); 
     393     
     394    /*! \}                                                                 */ 
     395    /*---------------------------------------------------------------------*/ 
    304396    /*! \name Index Operator                                               */ 
    305397    /*! \{                                                                 */ 
     
    314406    /*! \{                                                                 */ 
    315407     
    316     static FieldType _fieldType; 
     408    static FieldType   _fieldType; 
     409           IdStoreType _childIdStore; 
    317410     
    318411    /*! \}                                                                 */ 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerMField.inl

    r1139 r1145  
    285285                        NamespaceI  >::ParentPointerMField(void) 
    286286     
    287     : Inherited() 
     287    : Inherited(), 
     288      _childIdStore() 
    288289{ 
    289290} 
     
    295296                        NamespaceI  >::ParentPointerMField(Self const &source) 
    296297     
    297     : Inherited(source) 
     298    : Inherited(source), 
     299      _childIdStore(source._childIdStore) 
    298300{ 
    299301} 
     
    305307                        NamespaceI  >::ParentPointerMField(UInt32 const size) 
    306308     
    307     : Inherited(size) 
     309    : Inherited(size), 
     310      _childIdStore(size) 
    308311{ 
    309312} 
     
    388391 
    389392/*-------------------------------------------------------------------------*/ 
     393/* IdStore Interface                                                       */ 
     394 
     395/*-------------------------------------------------------------------------*/ 
     396/* Reading Values                                                          */ 
     397     
     398template <class ObjectTypeT, Int32 NamespaceI> 
     399inline UInt16 const 
     400    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet(UInt32 const index) const 
     401{ 
     402    return _childIdStore[index]; 
     403} 
     404     
     405template <class ObjectTypeT, Int32 NamespaceI> 
     406inline UInt16 const 
     407    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet(IdStoreItType pos) const 
     408{ 
     409    return *pos; 
     410}     
     411     
     412template <class ObjectTypeT, Int32 NamespaceI> 
     413inline UInt16 const 
     414    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreGet( 
     415        IdStoreConstItType pos) const 
     416{ 
     417    return *pos; 
     418} 
     419     
     420/*-------------------------------------------------------------------------*/ 
     421/* Adding Values                                                           */ 
     422 
     423template <class ObjectTypeT, Int32 NamespaceI> 
     424inline void 
     425    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreAppend(UInt16 const newId) 
     426{ 
     427    _childIdStore.push_back(newId); 
     428} 
     429 
     430template <class ObjectTypeT, Int32 NamespaceI> 
     431inline void 
     432    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 
     433        UInt32 const index, UInt16 const newId) 
     434{ 
     435    _childIdStore.insert(_childIdStore.begin() + index, newId); 
     436} 
     437 
     438template <class ObjectTypeT, Int32 NamespaceI> 
     439inline void 
     440    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 
     441        IdStoreItType pos, UInt16 const newId) 
     442{ 
     443    _childIdStore.insert(pos, newId); 
     444} 
     445 
     446template <class ObjectTypeT, Int32 NamespaceI    > 
     447template <class InputIteratorT> 
     448inline void 
     449    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreInsert( 
     450        IdStoreItType pos, InputIteratorT first, InputIteratorT last) 
     451{ 
     452    _childIdStore.insert(pos, first, last); 
     453} 
     454 
     455/*-------------------------------------------------------------------------*/ 
     456/* Changing Values                                                         */ 
     457 
     458template <class ObjectTypeT, Int32 NamespaceI> 
     459inline void 
     460    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreReplace( 
     461        UInt32 const index, UInt16 const newId) 
     462{ 
     463    IdStoreItType sI = _childIdStore.begin() + index; 
     464     
     465    *sI = newId; 
     466} 
     467                          
     468template <class ObjectTypeT, Int32 NamespaceI> 
     469inline void 
     470    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreReplace( 
     471        IdStoreItType pos, UInt16 const newId) 
     472{ 
     473    *pos = newId; 
     474} 
     475 
     476/*-------------------------------------------------------------------------*/ 
     477/* Removing Values                                                         */ 
     478 
     479template <class ObjectTypeT, Int32 NamespaceI> 
     480inline void 
     481    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase(UInt32 const index) 
     482{ 
     483    idStoreErase(_childIdStore.begin() + index); 
     484} 
     485 
     486template <class ObjectTypeT, Int32 NamespaceI> 
     487inline void 
     488    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase(IdStoreItType pos) 
     489{ 
     490    _childIdStore.erase(pos); 
     491} 
     492 
     493template <class ObjectTypeT, Int32 NamespaceI> 
     494inline void 
     495    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase( 
     496        UInt32 const beginIndex, UInt32 const endIndex) 
     497{ 
     498    idStoreErase(_childIdStore.begin() + beginIndex, 
     499                 _childIdStore.begin() + endIndex   ); 
     500} 
     501 
     502template <class ObjectTypeT, Int32 NamespaceI> 
     503inline void 
     504    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreErase( 
     505        IdStoreItType begin, IdStoreItType end) 
     506{ 
     507    _childIdStore.erase(begin, end); 
     508} 
     509     
     510template <class ObjectTypeT, Int32 NamespaceI> 
     511inline void 
     512    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreClear(void) 
     513{ 
     514    _childIdStore.clear(); 
     515} 
     516 
     517/*-------------------------------------------------------------------------*/ 
     518/* Finding Values                                                          */ 
     519 
     520template <class ObjectTypeT, Int32 NamespaceI> 
     521inline Int32 
     522    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFindIndex( 
     523        UInt16 const fieldId) const 
     524{ 
     525    IdStoreConstItType sI = std::find(_childIdStore.begin(), 
     526                                      _childIdStore.end  (), fieldId); 
     527                                   
     528    if(sI != _childIdStore.end()) 
     529    { 
     530        return std::distance(_childIdStore.begin(), sI); 
     531    } 
     532    else 
     533    { 
     534        return -1; 
     535    } 
     536} 
     537 
     538template <class ObjectTypeT, Int32 NamespaceI> 
     539inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreItType 
     540    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFind(UInt16 const fieldId) 
     541{ 
     542    return std::find(_childIdStore.begin(), 
     543                     _childIdStore.end  (), fieldId); 
     544} 
     545 
     546template <class ObjectTypeT, Int32 NamespaceI> 
     547inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreConstItType 
     548    ParentPointerMField<ObjectTypeT, NamespaceI>::idStoreFind( 
     549        UInt16 const fieldId) const 
     550{ 
     551    return std::find(_childIdStore.begin(), 
     552                     _childIdStore.end  (), fieldId); 
     553} 
     554 
     555/*-------------------------------------------------------------------------*/ 
     556/* Raw IdStore Access                                                      */ 
     557 
     558template <class ObjectTypeT, Int32 NamespaceI> 
     559inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreType & 
     560    ParentPointerMField<ObjectTypeT, NamespaceI>::editRawIdStore(void) 
     561{ 
     562    return _childIdStore; 
     563} 
     564     
     565template <class ObjectTypeT, Int32 NamespaceI> 
     566inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::IdStoreType const & 
     567    ParentPointerMField<ObjectTypeT, NamespaceI>::getRawIdStore (void) const 
     568{ 
     569    return _childIdStore; 
     570} 
     571 
     572/*-------------------------------------------------------------------------*/ 
     573/* Std library interface                                                   */ 
     574 
     575template <class ObjectTypeT, Int32 NamespaceI> 
     576inline void 
     577    ParentPointerMField<ObjectTypeT, NamespaceI>::reserve(size_type size) 
     578{ 
     579    this->editRawStore  ().reserve(size); 
     580    this->editRawIdStore().reserve(size); 
     581} 
     582 
     583/*-------------------------------------------------------------------------*/ 
     584/* Binary IO                                                               */ 
     585 
     586template <class ObjectTypeT, Int32 NamespaceI> 
     587inline UInt32 
     588    ParentPointerMField<ObjectTypeT, NamespaceI>::getBinSize(void) const 
     589{ 
     590    return Inherited::getBinSize() + 
     591        IdBaseTraitsType::getBinSize(&(this->getRawIdStore().front()), 
     592                                       this->getRawIdStore().size ()  ); 
     593} 
     594 
     595template <class ObjectTypeT, Int32 NamespaceI> 
     596inline void 
     597    ParentPointerMField<ObjectTypeT, NamespaceI>::copyToBin( 
     598        BinaryDataHandler &pMem) const 
     599{ 
     600    UInt32 thisSize = this->getRawIdStore().size(); 
     601 
     602    Inherited::copyToBin(pMem); 
     603     
     604    if(thisSize > 0) 
     605    { 
     606        IdBaseTraitsType::copyToBin( 
     607            pMem, &(this->getRawIdStore().front()), thisSize); 
     608    } 
     609} 
     610 
     611template <class ObjectTypeT, Int32 NamespaceI> 
     612inline void 
     613    ParentPointerMField<ObjectTypeT, NamespaceI>::copyFromBin( 
     614        BinaryDataHandler &pMem) 
     615{ 
     616    Inherited::copyFromBin(pMem); 
     617 
     618    UInt32 newSize = this->ptrStoreSize(); 
     619     
     620    this->editRawIdStore().clear(); 
     621     
     622    if(newSize > 0) 
     623    { 
     624        this->editRawIdStore().resize(newSize); 
     625         
     626        IdBaseTraitsType::copyFromBin( 
     627            pMem, &(this->editRawIdStore().front()), newSize); 
     628    } 
     629} 
     630 
     631/*-------------------------------------------------------------------------*/ 
     632/* MT Sync                                                                 */ 
     633 
     634template <class ObjectTypeT, Int32 NamespaceI> 
     635inline void 
     636    ParentPointerMField<ObjectTypeT, NamespaceI>::syncWith( 
     637        Self   &source,     ConstFieldMaskArg   syncMode, 
     638        UInt32  uiSyncInfo, AspectOffsetStore  &oOffsets ) 
     639{ 
     640    Inherited::syncWith(source, syncMode, uiSyncInfo, oOffsets); 
     641     
     642    _childIdStore = source._childIdStore; 
     643} 
     644                          
     645template <class ObjectTypeT, Int32 NamespaceI> 
     646inline void 
     647    ParentPointerMField<ObjectTypeT, NamespaceI>::beginEdit( 
     648        UInt32, AspectOffsetStore &) 
     649{ 
     650    // nothing to do 
     651} 
     652                          
     653template <class ObjectTypeT, Int32 NamespaceI> 
     654inline typename ParentPointerMField<ObjectTypeT, NamespaceI>::Self * 
     655    ParentPointerMField<ObjectTypeT, NamespaceI>::resolveShare( 
     656        UInt32 uiAspect, AspectOffsetStore &oOffsets) 
     657{ 
     658    return Inherited::resolveShare(uiAspect, oOffsets); 
     659}         
     660         
     661template <class ObjectTypeT, Int32 NamespaceI> 
     662inline void 
     663    ParentPointerMField<ObjectTypeT, NamespaceI>::terminateShare( 
     664        UInt32, AspectOffsetStore &) 
     665{ 
     666    // nothing to do 
     667} 
     668                          
     669template <class ObjectTypeT, Int32 NamespaceI> 
     670inline bool 
     671    ParentPointerMField<ObjectTypeT, NamespaceI>::isShared(void) 
     672{ 
     673    return Inherited::isShared(); 
     674} 
     675 
     676/*-------------------------------------------------------------------------*/ 
    390677/* Index Operator                                                          */ 
    391678 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.h

    r1144 r1145  
    88 
    99#include "OSGConfig.h" 
    10 #include "OSGParentPointerSFieldBase.h" 
     10#include "OSGPointerSFieldCommon.h" 
     11#include "OSGPointerAccessHandler.h" 
    1112#include "OSGPointerFieldConfigs.h" 
    1213//#include "OSGEditParentPointerSFieldHandle.h" 
     
    9596template <class ObjectTypeT, 
    9697          Int32 NamespaceI  = 0> 
    97 class ParentPointerSField : public ParentPointerSFieldBase<NamespaceI> 
     98class ParentPointerSField 
     99    : public PointerSFieldCommon<NoRefCountAccessHandler, NamespaceI> 
    98100{ 
    99101    /*==========================  PUBLIC  =================================*/ 
     
    105107    typedef          ObjectTypeT                           ObjectType; 
    106108         
    107     typedef          ParentPointerSFieldBase<NamespaceI  > Inherited; 
     109    typedef          PointerSFieldCommon    <NoRefCountAccessHandler, 
     110                                             NamespaceI  > Inherited; 
    108111    typedef          ParentPointerSField    <ObjectTypeT, 
    109112                                             NamespaceI  > Self; 
     
    119122    typedef typename FieldConfig::SFieldConstRefType       const_reference; 
    120123     
    121     typedef typename Inherited::IdStoredType               IdStoredType; 
     124    typedef UInt16                                  IdStoredType; 
     125    typedef UInt16                                 &IdStoredTypeRef; 
     126    typedef UInt16 const                           &IdStoredTypeConstRef; 
     127     
     128    typedef FieldTraits<IdStoredType >              IdBaseTraitsType; 
    122129     
    123130    typedef FieldTraits     <ValueType, 
    124131                             NamespaceI                     >  SFieldTraits; 
    125132    typedef FieldDescription<SFieldTraits, 
    126                              SingleField, 
     133                             FieldType::SingleField, 
    127134                             NoRefCountPolicy, 
    128                              ParentPtrField  >  Description; 
     135                             FieldType::ParentPtrField  >  Description; 
    129136     
    130137    // handles 
     
    176183    /*! \}                                                                 */ 
    177184    /*---------------------------------------------------------------------*/ 
     185    /*! \name IdStore Interface                                            */ 
     186    /*! \{                                                                 */ 
     187     
     188    // reading values 
     189    UInt16 const idStoreGet(void) const; 
     190     
     191    // changing values 
     192    void idStoreSet  (UInt16 const newId); 
     193    void idStoreClear(void              ); 
     194 
     195     /*! \}                                                                 */ 
     196    /*---------------------------------------------------------------------*/ 
     197    /*! \name Raw IdStore Access                                           */ 
     198    /*! \{                                                                 */ 
     199     
     200    IdStoredTypeRef      editRawIdStore(void); 
     201    IdStoredTypeConstRef getRawIdStore (void) const; 
     202     
     203    /*! \}                                                                 */ 
     204    /*---------------------------------------------------------------------*/ 
     205    /*! \name Binary IO                                                    */ 
     206    /*! \{                                                                 */ 
     207 
     208    UInt32 getBinSize (void                   ) const; 
     209    void   copyToBin  (BinaryDataHandler &pMem) const; 
     210    void   copyFromBin(BinaryDataHandler &pMem); 
     211     
     212    /*! \}                                                                 */ 
     213    /*---------------------------------------------------------------------*/ 
     214    /*! \name MT Sync                                                      */ 
     215    /*! \{                                                                 */ 
     216 
     217    void  syncWith(Self &source); 
     218     
     219    /*! \}                                                                 */ 
     220    /*---------------------------------------------------------------------*/ 
    178221    /*! \name Access                                                       */ 
    179222    /*! \{                                                                 */ 
     
    183226    /*! \}                                                                 */ 
    184227    /*=========================  PROTECTED  ===============================*/ 
     228 
    185229  protected: 
     230 
    186231    /*---------------------------------------------------------------------*/ 
    187232    /*! \name Members                                                      */ 
    188233    /*! \{                                                                 */ 
    189234     
    190     static FieldType _fieldType; 
    191      
     235    static FieldType    _fieldType; 
     236           IdStoredType _childIdValue; 
     237 
    192238    /*! \}                                                                 */ 
    193239    /*==========================  PRIVATE  ================================*/ 
     240 
    194241  private: 
    195242}; 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.inl

    r1135 r1145  
    105105    ParentPointerSField<ObjectTypeT, 
    106106                        NamespaceI  >::ParentPointerSField(void) 
    107     : Inherited() 
     107    : Inherited(), 
     108      _childIdValue() 
    108109{ 
    109110    // nothing to do 
     
    114115    ParentPointerSField<ObjectTypeT, 
    115116                        NamespaceI  >::ParentPointerSField(Self const &source) 
    116     : Inherited(source) 
     117    : Inherited(source), 
     118      _childIdValue(source._childIdValue) 
    117119{ 
    118120    // nothing to do 
     
    125127        ValueType ptrValue, IdStoredType idValue) 
    126128     
    127     : Inherited(ptrValue, idValue) 
     129    : Inherited(ptrValue), 
     130      _childIdValue(idValue ) 
    128131{ 
    129132    // nothing to do 
     
    139142{ 
    140143    // nothing to do 
     144} 
     145 
     146/*-------------------------------------------------------------------------*/ 
     147/* IdStore Interface                                                       */ 
     148 
     149/*-------------------------------------------------------------------------*/ 
     150/* Reading Values                                                          */ 
     151 
     152template <class ObjectTypeT, Int32 NamespaceI> 
     153inline UInt16 const 
     154    ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreGet(void) const 
     155{ 
     156    return _childIdValue; 
     157} 
     158     
     159/*-------------------------------------------------------------------------*/ 
     160/* Changing Values                                                         */ 
     161 
     162template <class ObjectTypeT, Int32 NamespaceI> 
     163inline void 
     164    ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreSet(UInt16 const newId) 
     165{ 
     166    _childIdValue = newId; 
     167} 
     168 
     169template <class ObjectTypeT, Int32 NamespaceI> 
     170inline void 
     171    ParentPointerSField<ObjectTypeT, NamespaceI>::idStoreClear(void) 
     172{ 
     173    _childIdValue = 0; 
     174} 
     175 
     176/*-------------------------------------------------------------------------*/ 
     177/* Raw IdStore Access                                                      */ 
     178 
     179template <class ObjectTypeT, Int32 NamespaceI> 
     180inline typename ParentPointerSField<ObjectTypeT, NamespaceI>::IdStoredTypeRef 
     181    ParentPointerSField<ObjectTypeT, NamespaceI>::editRawIdStore(void) 
     182{ 
     183    return _childIdValue; 
     184} 
     185 
     186template <class ObjectTypeT, Int32 NamespaceI> 
     187inline typename ParentPointerSField<ObjectTypeT, NamespaceI>::IdStoredTypeConstRef 
     188    ParentPointerSField<ObjectTypeT, NamespaceI>::getRawIdStore (void) const 
     189{ 
     190    return _childIdValue; 
     191} 
     192 
     193/*-------------------------------------------------------------------------*/ 
     194/* Binary IO                                                               */ 
     195 
     196template <class ObjectTypeT, Int32 NamespaceI> 
     197inline UInt32 
     198    ParentPointerSField<ObjectTypeT, NamespaceI>::getBinSize(void) const 
     199{ 
     200    return 
     201        Inherited::getBinSize() + IdBaseTraitsType::getBinSize(_childIdValue); 
     202} 
     203 
     204template <class ObjectTypeT, Int32 NamespaceI> 
     205inline void 
     206    ParentPointerSField<ObjectTypeT, NamespaceI>::copyToBin( 
     207        BinaryDataHandler &pMem) const 
     208{ 
     209    Inherited::copyToBin(pMem); 
     210     
     211    IdBaseTraitsType::copyToBin(pMem, _childIdValue); 
     212} 
     213 
     214template <class ObjectTypeT, Int32 NamespaceI> 
     215inline void  
     216    ParentPointerSField<ObjectTypeT, NamespaceI>::copyFromBin( 
     217        BinaryDataHandler &pMem) 
     218{ 
     219    Inherited::copyFromBin(pMem); 
     220     
     221    IdBaseTraitsType::copyFromBin(pMem, _childIdValue); 
     222} 
     223 
     224/*-------------------------------------------------------------------------*/ 
     225/* MT Sync                                                                 */ 
     226 
     227template <class ObjectTypeT, Int32 NamespaceI> 
     228inline void  
     229    ParentPointerSField<ObjectTypeT, NamespaceI>::syncWith(Self &source) 
     230{ 
     231    Inherited::syncWith(source); 
     232     
     233    _childIdValue = source._childIdValue; 
    141234} 
    142235 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerMField.h

    r1144 r1145  
    99 
    1010#include "OSGConfig.h" 
    11 #include "OSGUnrecordedPointerMFieldBase.h" 
     11#include "OSGPointerMFieldCommon.h" 
     12#include "OSGPointerAccessHandler.h" 
    1213#include "OSGPointerFieldConfigs.h" 
    13 //#include "OSGEditPointerMFieldHandle.h" 
    14 //#include "OSGGetPointerMFieldHandle.h" 
    1514 
    1615#ifdef OSG_DOC_FILES_IN_MODULE 
     
    306305          Int32 NamespaceI  = 0> 
    307306class UnrecordedPointerMField :  
    308     public PointerMFieldCommon<UnrecordedAccessHandler, 0
     307    public PointerMFieldCommon<UnrecordedAccessHandler, NamespaceI
    309308{ 
    310309    /*==========================  PUBLIC  =================================*/ 
     
    346345                             NamespaceI                         >  MFieldTraits; 
    347346    typedef FieldDescription<MFieldTraits, 
    348                              MultiField, 
     347                             FieldType::MultiField, 
    349348                             UnrecordedRefCountPolicy, 
    350                              PtrField                >  Description; 
     349                             FieldType::PtrField                >  Description; 
    351350     
    352351    // handles 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGUnrecordedPointerSField.h

    r1144 r1145  
    88 
    99#include "OSGConfig.h" 
    10 #include "OSGUnrecordedPointerSFieldBase.h" 
     10#include "OSGPointerSFieldCommon.h" 
     11#include "OSGPointerAccessHandler.h" 
    1112#include "OSGPointerFieldConfigs.h" 
    12 //#include "OSGEditPointerSFieldHandle.h" 
    13 //#include "OSGGetPointerSFieldHandle.h" 
    1413 
    1514#ifdef OSG_DOC_FILES_IN_MODULE 
     
    8988template <class ObjectTypeT, 
    9089          Int32 NamespaceI  = 0> 
    91 class UnrecordedPointerSField : public UnrecordedPointerSFieldBase<NamespaceI> 
     90class UnrecordedPointerSField :