Changeset 1147

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

changed: cleaned sfields

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerSField.h

    r1146 r1147  
     1/*---------------------------------------------------------------------------*\ 
     2 *                                OpenSG                                     * 
     3 *                                                                           * 
     4 *                                                                           * 
     5 *                 Copyright (C) 2008 by the OpenSG Forum                    * 
     6 *                                                                           * 
     7 *                            www.opensg.org                                 * 
     8 *                                                                           * 
     9 *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          * 
     10 *                                                                           * 
     11\*---------------------------------------------------------------------------*/ 
     12/*---------------------------------------------------------------------------*\ 
     13 *                                License                                    * 
     14 *                                                                           * 
     15 * This library is free software; you can redistribute it and/or modify it   * 
     16 * under the terms of the GNU Library General Public License as published    * 
     17 * by the Free Software Foundation, version 2.                               * 
     18 *                                                                           * 
     19 * This library is distributed in the hope that it will be useful, but       * 
     20 * WITHOUT ANY WARRANTY; without even the implied warranty of                * 
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         * 
     22 * Library General Public License for more details.                          * 
     23 *                                                                           * 
     24 * You should have received a copy of the GNU Library General Public         * 
     25 * License along with this library; if not, write to the Free Software       * 
     26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 * 
     27 *                                                                           * 
     28\*---------------------------------------------------------------------------*/ 
     29/*---------------------------------------------------------------------------*\ 
     30 *                                Changes                                    * 
     31 *                                                                           * 
     32 *                                                                           * 
     33 *                                                                           * 
     34 *                                                                           * 
     35 *                                                                           * 
     36 *                                                                           * 
     37\*---------------------------------------------------------------------------*/ 
    138 
    239#ifndef _OSGCHILDPOINTERSFIELD_H_ 
     
    744#endif 
    845 
    9 #include "OSGConfig.h" 
    1046#include "OSGChildPointerSFieldBase.h" 
    1147 
     
    1854OSG_BEGIN_NAMESPACE 
    1955 
    20 // forward declarations 
    21 template <class ObjectTypeT, Int32 NamespaceI> 
    22 class ChildPointerSField; 
    23  
    24 /*-------------------------------------------------------------------------*/ 
    25 /* ChildSFieldReferenceProxy<ObjectTypeT>                                  */ 
    26 /*-------------------------------------------------------------------------*/ 
    27  
    28 template <class ObjectTypeT> 
    29 class ChildSFieldReferenceProxy 
    30 { 
    31     /*==========================  PUBLIC  =================================*/ 
    32   public: 
    33     /*---------------------------------------------------------------------*/ 
    34     /*! \name Public Types                                                 */ 
    35     /*! \{                                                                 */ 
    36      
    37     typedef          ObjectTypeT                         ObjectType; 
    38      
    39     typedef          ChildSFieldReferenceProxy           Self; 
    40              
    41     typedef          ChildPointerSField<ObjectTypeT, 0>  SFieldType; 
    42 //    typedef          ChildFieldConfig  <ObjectTypeT, 0>  FieldConfig; 
    43     typedef typename SFieldType::AccessHandler           AccessHandler; 
    44      
    45     // store types 
    46     typedef typename SFieldType::StoredType              StoredType; 
    47      
    48     // std library types 
    49 //    typedef typename FieldConfig::ValueType              value_type; 
    50     typedef ObjectTypeT * value_type; 
    51  
    52     /*! \}                                                                 */ 
    53     /*---------------------------------------------------------------------*/ 
    54     /*! \name Constructors                                                 */ 
    55     /*! \{                                                                 */ 
    56      
    57     ChildSFieldReferenceProxy(StoredType * const pValue, 
    58                               SFieldType *       pField ); 
    59     ChildSFieldReferenceProxy(Self const        &source ); 
    60      
    61     /*! \}                                                                 */ 
    62     /*---------------------------------------------------------------------*/ 
    63     /*! \name Destructor                                                   */ 
    64     /*! \{                                                                 */ 
    65      
    66     ~ChildSFieldReferenceProxy(void); 
    67      
    68     /*! \}                                                                 */ 
    69     /*---------------------------------------------------------------------*/ 
    70     /*! \name Operators                                                    */ 
    71     /*! \{                                                                 */ 
    72      
    73                operator value_type(void) const; 
    74     value_type operator->         (void) const; 
    75      
    76     void operator=(value_type newValue); 
    77      
    78     /*! \}                                                                 */ 
    79     /*==========================  PRIVATE  ================================*/ 
    80   private: 
    81     StoredType *_pValue; 
    82     SFieldType *_pField; 
    83 }; 
    84  
    8556/*---------------------------------------------------------------------------*/ 
    8657/* ChildPointerSField<FieldConfigT>                                          */ 
     
    9162class ChildPointerSField : public ChildPointerSFieldBase<NamespaceI> 
    9263{ 
     64 
    9365    /*==========================  PUBLIC  =================================*/ 
     66 
    9467  public: 
     68 
    9569    /*---------------------------------------------------------------------*/ 
    9670    /*! \name Public Types                                                 */ 
     
    10377                                   NamespaceI >      Self; 
    10478                                    
    105 //    typedef ChildFieldConfig      <ObjectTypeT, 
    106 //                                   NamespaceI  >     FieldConfig; 
    10779     
    10880    typedef ObjectTypeT * ValueType; 
     
    11082    typedef ObjectTypeT * value_type; 
    11183 
    112 //    typedef typename FieldConfig::ValueType          ValueType; 
    113 //    typedef typename FieldConfig::ArgumentType       ArgumentType; 
    114 //    typedef typename FieldConfig::ValueType          value_type; 
    11584        
    11685    typedef ValueType *pointer; 
    11786    typedef ArgumentType *const_pointer; 
    11887 
    119 //    typedef typename FieldConfig::PtrType            pointer; 
    120 //    typedef typename FieldConfig::ConstPtrType       const_pointer; 
    121  
    122 //    typedef typename FieldConfig::SFieldRefType      reference; 
    123 //    typedef typename FieldConfig::SFieldConstRefType const_reference; 
    124  
    125     typedef ChildSFieldReferenceProxy<ObjectType>   reference; 
    12688    typedef ValueType const                             &const_reference;  
    12789     
     
    13092    typedef FieldTraits     <ValueType, 
    13193                             NamespaceI                    >  SFieldTraits; 
     94 
    13295    typedef FieldDescription<SFieldTraits, 
    13396                             FieldType::SingleField, 
    13497                             UnrecordedRefCountPolicy, 
    13598                             FieldType::ChildPtrField>  Description; 
    136      
    137     // handles 
    138 //    typedef          EditPointerSFieldHandle<Self>      EditHandle; 
    139 //    typedef typename EditPointerSFieldHandle<Self>::Ptr EditHandlePtr; 
    140      
    141 //    typedef          GetPointerSFieldHandle <Self>      GetHandle; 
    142 //    typedef typename GetPointerSFieldHandle <Self>::Ptr GetHandlePtr; 
    143      
    144     // handles for dynamic fields -- XXX TODO 
    145 //    typedef          EditPointerSFieldHandle<Self>      DynamicEditHandle; 
    146 //    typedef typename EditPointerSFieldHandle<Self>::Ptr DynamicEditHandlePtr; 
    147      
    148 //    typedef          GetPointerSFieldHandle <Self>      DynamicGetHandle; 
    149 //    typedef typename GetPointerSFieldHandle <Self>::Ptr DynamicGetHandlePtr; 
    150      
     99  protected: 
     100 
    151101    /*! \}                                                                 */ 
    152102    /*---------------------------------------------------------------------*/ 
     
    185135    /*! \{                                                                 */ 
    186136     
    187     reference       editValue(void           ); 
    188137    const_reference getValue (void           ) const; 
    189138     
     
    200149    /*! \}                                                                 */ 
    201150    /*=========================  PROTECTED  ===============================*/ 
     151 
    202152  protected: 
     153 
    203154    /*---------------------------------------------------------------------*/ 
    204155    /*! \name Members                                                      */ 
     
    209160    /*! \}                                                                 */ 
    210161    /*==========================  PRIVATE  ================================*/ 
     162 
    211163  private: 
     164 
    212165}; 
    213166 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGChildPointerSField.inl

    r1135 r1147  
    1  
     1/*---------------------------------------------------------------------------*\ 
     2 *                                OpenSG                                     * 
     3 *                                                                           * 
     4 *                                                                           * 
     5 *                 Copyright (C) 2008 by the OpenSG Forum                    * 
     6 *                                                                           * 
     7 *                            www.opensg.org                                 * 
     8 *                                                                           * 
     9 *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          * 
     10 *                                                                           * 
     11\*---------------------------------------------------------------------------*/ 
     12/*---------------------------------------------------------------------------*\ 
     13 *                                License                                    * 
     14 *                                                                           * 
     15 * This library is free software; you can redistribute it and/or modify it   * 
     16 * under the terms of the GNU Library General Public License as published    * 
     17 * by the Free Software Foundation, version 2.                               * 
     18 *                                                                           * 
     19 * This library is distributed in the hope that it will be useful, but       * 
     20 * WITHOUT ANY WARRANTY; without even the implied warranty of                * 
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         * 
     22 * Library General Public License for more details.                          * 
     23 *                                                                           * 
     24 * You should have received a copy of the GNU Library General Public         * 
     25 * License along with this library; if not, write to the Free Software       * 
     26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 * 
     27 *                                                                           * 
     28\*---------------------------------------------------------------------------*/ 
     29/*---------------------------------------------------------------------------*\ 
     30 *                                Changes                                    * 
     31 *                                                                           * 
     32 *                                                                           * 
     33 *                                                                           * 
     34 *                                                                           * 
     35 *                                                                           * 
     36 *                                                                           * 
     37\*---------------------------------------------------------------------------*/ 
    238 
    339#ifdef OSG_DOC_FILES_IN_MODULE 
     
    1046 
    1147/*-------------------------------------------------------------------------*/ 
    12 /* ChildSFieldReferenceProxy<ObjectTypeT>                                  */ 
     48/* ChildPointerSField<ObjectTypeT,                                         */ 
     49/*                    NamespaceI  >                                        */ 
    1350/*-------------------------------------------------------------------------*/ 
     51 
     52/*-------------------------------------------------------------------------*/ 
     53/* Class Type                                                              */ 
     54 
     55template <class ObjectTypeT, Int32 NamespaceI> inline  
     56FieldType const &ChildPointerSField<ObjectTypeT, 
     57                                    NamespaceI >::getClassType(void) 
     58{ 
     59    return _fieldType; 
     60} 
    1461 
    1562/*-------------------------------------------------------------------------*/ 
    1663/* Constructors                                                            */ 
    1764 
    18 template <class ObjectTypeT> 
    19 inline 
    20     ChildSFieldReferenceProxy<ObjectTypeT>::ChildSFieldReferenceProxy( 
    21         StoredType * const value, SFieldType *pField) 
    22  
    23     : _pValue(value ), 
    24       _pField(pField) 
     65template <class ObjectTypeT, Int32 NamespaceI> inline 
     66ChildPointerSField<ObjectTypeT, 
     67                   NamespaceI >::ChildPointerSField(void) :  
     68    Inherited() 
    2569{ 
    2670    // nothing to do 
    2771} 
    2872 
    29 template <class ObjectTypeT> 
    30     ChildSFieldReferenceProxy<ObjectTypeT>::ChildSFieldReferenceProxy( 
    31         Self const &source) 
    32      
    33     : _pValue(source._pValue), 
    34       _pField(source._pField) 
     73template <class ObjectTypeT, Int32 NamespaceI> inline 
     74ChildPointerSField<ObjectTypeT, 
     75                   NamespaceI >::ChildPointerSField(Self const &source) : 
     76    Inherited(source) 
     77
     78    // nothing to do 
     79
     80 
     81template <class ObjectTypeT, Int32 NamespaceI> inline 
     82ChildPointerSField<ObjectTypeT, 
     83                   NamespaceI >::ChildPointerSField(ValueType value) : 
     84    Inherited(value) 
    3585{ 
    3686    // nothing to do 
     
    4090/* Destructor                                                              */ 
    4191 
    42 template <class ObjectTypeT> 
    43 inline 
    44     ChildSFieldReferenceProxy<ObjectTypeT>::~ChildSFieldReferenceProxy(void) 
    45 
    46     // nothing to do 
    47 
    48  
    49 /*-------------------------------------------------------------------------*/ 
    50 /* Operators                                                               */ 
    51  
    52 template <class ObjectTypeT> 
    53 inline 
    54     ChildSFieldReferenceProxy<ObjectTypeT>::operator value_type(void) const 
    55 
    56     return AccessHandler::validate(*_pValue); 
    57 
    58              
    59 template <class ObjectTypeT> 
    60 inline  typename ChildSFieldReferenceProxy<ObjectTypeT>::value_type 
    61      ChildSFieldReferenceProxy<ObjectTypeT>::operator->(void) const 
    62 
    63     return AccessHandler::validate(*_pValue); 
    64 
    65      
    66 template <class ObjectTypeT> 
    67 inline void 
    68      ChildSFieldReferenceProxy<ObjectTypeT>::operator=(value_type newValue) 
    69 
    70     AccessHandler::onReplace(_pField, *_pValue, newValue); 
    71      
    72     *_pValue = newValue; 
    73 
    74  
    75 /*-------------------------------------------------------------------------*/ 
    76 /* ChildPointerSField<ObjectTypeT,                                         */ 
    77 /*                    NamespaceI  >                                        */ 
    78 /*-------------------------------------------------------------------------*/ 
    79  
    80 /*-------------------------------------------------------------------------*/ 
    81 /* Class Type                                                              */ 
    82  
    83 template <class ObjectTypeT, Int32 NamespaceI> 
    84 inline FieldType const & 
    85     ChildPointerSField<ObjectTypeT, 
    86                        NamespaceI  >::getClassType(void) 
    87 
    88     return _fieldType; 
    89 
    90  
    91 /*-------------------------------------------------------------------------*/ 
    92 /* Constructors                                                            */ 
    93  
    94 template <class ObjectTypeT, Int32 NamespaceI> 
    95 inline 
    96     ChildPointerSField<ObjectTypeT, 
    97                        NamespaceI  >::ChildPointerSField(void) 
    98     : Inherited() 
    99 
    100     // nothing to do 
    101 
    102  
    103 template <class ObjectTypeT, Int32 NamespaceI> 
    104 inline 
    105     ChildPointerSField<ObjectTypeT, 
    106                        NamespaceI  >::ChildPointerSField(Self const &source) 
    107     : Inherited(source) 
    108 
    109     // nothing to do 
    110 
    111  
    112 template <class ObjectTypeT, Int32 NamespaceI> 
    113 inline 
    114     ChildPointerSField<ObjectTypeT, 
    115                        NamespaceI  >::ChildPointerSField(ValueType value) 
    116     : Inherited(value) 
    117 
    118     // nothing to do 
    119 
    120  
    121 /*-------------------------------------------------------------------------*/ 
    122 /* Destructor                                                              */ 
    123  
    124 template <class ObjectTypeT, Int32 NamespaceI> 
    125 inline 
    126     ChildPointerSField<ObjectTypeT, 
    127                        NamespaceI  >::~ChildPointerSField(void) 
     92template <class ObjectTypeT, Int32 NamespaceI> inline 
     93ChildPointerSField<ObjectTypeT, 
     94                   NamespaceI >::~ChildPointerSField(void) 
    12895{ 
    12996} 
     
    13299/* Access                                                                  */ 
    133100 
    134 template <class ObjectTypeT, Int32 NamespaceI> 
    135 inline typename ChildPointerSField<ObjectTypeT, 
    136                                    NamespaceI  >::reference 
     101template <class ObjectTypeT, Int32 NamespaceI> inline  
     102typename ChildPointerSField<ObjectTypeT, 
     103                            NamespaceI >::const_reference 
    137104    ChildPointerSField<ObjectTypeT, 
    138                        NamespaceI  >::editValue(void) 
    139 
    140     return reference(&this->editRawStore(), this); 
    141 
    142  
    143 template <class ObjectTypeT, Int32 NamespaceI> 
    144 inline typename ChildPointerSField<ObjectTypeT, 
    145                                    NamespaceI  >::const_reference 
    146     ChildPointerSField<ObjectTypeT, 
    147                        NamespaceI  >::getValue(void) const 
     105                       NamespaceI >::getValue(void) const 
    148106{ 
    149107    return reinterpret_cast<const_reference>(this->getRawStore()); 
    150108} 
    151109 
    152 template <class ObjectTypeT, Int32 NamespaceI> 
    153 inline void 
    154     ChildPointerSField<ObjectTypeT, 
    155                        NamespaceI  >::setValue(ValueType value) 
     110template <class ObjectTypeT, Int32 NamespaceI> inline  
     111void ChildPointerSField<ObjectTypeT, 
     112                        NamespaceI >::setValue(ValueType value) 
    156113{ 
    157114    this->ptrStoreSet(value); 
    158115} 
    159116 
    160 template <class ObjectTypeT, Int32 NamespaceI> 
    161 inline void 
    162     ChildPointerSField<ObjectTypeT, 
    163                        NamespaceI  >::setValue(Self const &source) 
     117template <class ObjectTypeT, Int32 NamespaceI> inline  
     118void ChildPointerSField<ObjectTypeT, 
     119                        NamespaceI >::setValue(Self const &source) 
    164120{ 
    165121    this->ptrStoreSet(source.ptrStoreGet()); 
     
    179135/* Assignment                                                              */ 
    180136 
    181 template <class ObjectTypeT, Int32 NamespaceI> 
    182 inline void 
    183     ChildPointerSField<ObjectTypeT, 
    184                        NamespaceI  >::operator =(Self const &other) 
     137template <class ObjectTypeT, Int32 NamespaceI> inline  
     138void ChildPointerSField<ObjectTypeT, 
     139                        NamespaceI >::operator =(Self const &other) 
    185140{    
    186141    this->ptrStoreSet(other.ptrStoreGet()); 
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.h

    r1146 r1147  
     1/*---------------------------------------------------------------------------*\ 
     2 *                                OpenSG                                     * 
     3 *                                                                           * 
     4 *                                                                           * 
     5 *                 Copyright (C) 2008 by the OpenSG Forum                    * 
     6 *                                                                           * 
     7 *                            www.opensg.org                                 * 
     8 *                                                                           * 
     9 *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          * 
     10 *                                                                           * 
     11\*---------------------------------------------------------------------------*/ 
     12/*---------------------------------------------------------------------------*\ 
     13 *                                License                                    * 
     14 *                                                                           * 
     15 * This library is free software; you can redistribute it and/or modify it   * 
     16 * under the terms of the GNU Library General Public License as published    * 
     17 * by the Free Software Foundation, version 2.                               * 
     18 *                                                                           * 
     19 * This library is distributed in the hope that it will be useful, but       * 
     20 * WITHOUT ANY WARRANTY; without even the implied warranty of                * 
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         * 
     22 * Library General Public License for more details.                          * 
     23 *                                                                           * 
     24 * You should have received a copy of the GNU Library General Public         * 
     25 * License along with this library; if not, write to the Free Software       * 
     26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 * 
     27 *                                                                           * 
     28\*---------------------------------------------------------------------------*/ 
     29/*---------------------------------------------------------------------------*\ 
     30 *                                Changes                                    * 
     31 *                                                                           * 
     32 *                                                                           * 
     33 *                                                                           * 
     34 *                                                                           * 
     35 *                                                                           * 
     36 *                                                                           * 
     37\*---------------------------------------------------------------------------*/ 
    138 
    239#ifndef _OSGPARENTPOINTERSFIELD_H_ 
     
    744#endif 
    845 
    9 #include "OSGConfig.h" 
    1046#include "OSGPointerSFieldCommon.h" 
    1147#include "OSGPointerAccessHandler.h" 
     
    1955OSG_BEGIN_NAMESPACE 
    2056 
    21 // forward declarations 
    22 template <class ObjectTypeT, Int32 NamespaceI> 
    23 class ParentPointerSField; 
    24  
    25 /*---------------------------------------------------------------------------*/ 
    26 /* ParentSFieldConstReferenceProxy<ObjectTypeT>                              */ 
    27 /*---------------------------------------------------------------------------*/ 
    28  
    29 template <class ObjectTypeT> 
    30 class ParentSFieldConstReferenceProxy 
    31 { 
    32     /*==========================  PUBLIC  =================================*/ 
    33   public: 
    34     /*---------------------------------------------------------------------*/ 
    35     /*! \name Public Types                                                 */ 
    36     /*! \{                                                                 */ 
    37      
    38     typedef          ObjectTypeT                          ObjectType; 
    39      
    40     typedef          ParentSFieldConstReferenceProxy      Self; 
    41      
    42     typedef          ParentPointerSField<ObjectTypeT, 0>  SFieldType; 
    43 //    typedef          ParentFieldConfig  <ObjectTypeT, 0>  FieldConfig; 
    44     typedef typename SFieldType::AccessHandler            AccessHandler; 
    45          
    46     typedef ObjectTypeT * ValueType; 
    47     typedef ObjectTypeT * value_type; 
    48 //    typedef typename FieldConfig::ValueType               ValueType; 
    49 //    typedef typename FieldConfig::ValueType               value_type; 
    50      
    51     // store types 
    52     typedef typename SFieldType::StoredType               StoredType; 
    53     typedef typename SFieldType::IdStoredType             IdStoredType; 
    54      
    55     /*! \}                                                                 */ 
    56     /*---------------------------------------------------------------------*/ 
    57     /*! \name Constructors                                                 */ 
    58     /*! \{                                                                 */ 
    59      
    60     ParentSFieldConstReferenceProxy( 
    61         StoredType   const * const pPtrValue, 
    62         IdStoredType const * const pIdValue  ); 
    63     ParentSFieldConstReferenceProxy(Self const &source); 
    64      
    65     /*! \}                                                                 */ 
    66     /*---------------------------------------------------------------------*/ 
    67     /*! \name Destructor                                                   */ 
    68     /*! \{                                                                 */ 
    69      
    70     ~ParentSFieldConstReferenceProxy(void); 
    71      
    72     /*! \}                                                                 */ 
    73     /*---------------------------------------------------------------------*/ 
    74     /*! \name Operators                                                    */ 
    75     /*! \{                                                                 */ 
    76      
    77                operator value_type(void) const; 
    78     value_type operator->         (void) const; 
    79      
    80     value_type   getPtr(void) const; 
    81     IdStoredType getId (void) const; 
    82      
    83     /*! \}                                                                 */ 
    84     /*==========================  PRIVATE  ================================*/ 
    85   private: 
    86     StoredType   const *_pPtrValue; 
    87     IdStoredType const *_pIdValue; 
    88 }; 
    89  
    9057/*---------------------------------------------------------------------------*/ 
    9158/* ParentPointerSField<ObjectTypeT,                                          */ 
     
    9562template <class ObjectTypeT, 
    9663          Int32 NamespaceI  = 0> 
    97 class ParentPointerSField 
    98     : public PointerSFieldCommon<NoRefCountAccessHandler, NamespaceI> 
     64class ParentPointerSField :  
     65    public PointerSFieldCommon<NoRefCountAccessHandler, NamespaceI> 
    9966{ 
    10067    /*==========================  PUBLIC  =================================*/ 
     68 
    10169  public: 
     70 
    10271    /*---------------------------------------------------------------------*/ 
    10372    /*! \name Public Types                                                 */ 
     
    11180                                             NamespaceI  > Self; 
    11281                                              
    113 //    typedef          ParentFieldConfig      <ObjectTypeT, 
    114 //                                             NamespaceI  > FieldConfig; 
    115      
    11682    typedef ObjectTypeT * ValueType; 
    11783    typedef ObjectTypeT * const ArgumentType; 
    11884    typedef ObjectTypeT * value_type; 
    11985 
    120 //    typedef typename FieldConfig::ValueType                ValueType; 
    121 //    typedef typename FieldConfig::ArgumentType             ArgumentType; 
    122 //    typedef typename FieldConfig::ValueType                value_type; 
    123          
    124 //    typedef typename FieldConfig::ConstPtrType             const_pointer; 
    125 //    typedef typename FieldConfig::SFieldConstRefType       const_reference; 
    126  
    12786    typedef ArgumentType *const_pointer; 
    128     typedef ParentSFieldConstReferenceProxy<ObjectType>   const_reference;  
     87    typedef ValueType const                             &const_reference;  
    12988     
    13089    typedef UInt16                                  IdStoredType; 
     
    14099                             NoRefCountPolicy, 
    141100                             FieldType::ParentPtrField  >  Description; 
     101  protected: 
    142102     
    143103    // handles 
     
    160120    /*! \{                                                                 */ 
    161121         
    162     static FieldType::Cardinality const fieldCard  = FieldType  ::SingleField; 
     122    static FieldType::Cardinality const fieldCard  = FieldType::SingleField; 
    163123    static FieldType::Class       const Class      = FieldType::ParentPtrField; 
    164124     
  • trunk/Source/System/FieldContainer/Fields/PointerFields/OSGParentPointerSField.inl

    r1145 r1147  
    1  
     1/*---------------------------------------------------------------------------*\ 
     2 *                                OpenSG                                     * 
     3 *                                                                           * 
     4 *                                                                           * 
     5 *                 Copyright (C) 2008 by the OpenSG Forum                    * 
     6 *                                                                           * 
     7 *                            www.opensg.org                                 * 
     8 *                                                                           * 
     9 *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          * 
     10 *                                                                           * 
     11\*---------------------------------------------------------------------------*/ 
     12/*---------------------------------------------------------------------------*\ 
     13 *                                License                                    * 
     14 *                                                                           * 
     15 * This library is free software; you can redistribute it and/or modify it   * 
     16 * under the terms of the GNU Library General Public License as published    * 
     17 * by the Free Software Foundation, version 2.                               * 
     18 *                                                                           * 
     19 * This library is distributed in the hope that it will be useful, but       * 
     20 * WITHOUT ANY WARRANTY; without even the implied warranty of                * 
     21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         * 
     22 * Library General Public License for more details.                          * 
     23 *                                                                           * 
     24 * You should have received a copy of the GNU Library General Public         * 
     25 * License along with this library; if not, write to the Free Software       * 
     26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 * 
     27 *                                                                           * 
     28\*---------------------------------------------------------------------------*/ 
     29/*---------------------------------------------------------------------------*\ 
     30 *                                Changes                                    * 
     31 *                                                                           * 
     32 *                                                                           * 
     33 *                                                                           * 
     34 *                                                                           * 
     35 *                                                                           * 
     36 *                                                                           * 
     37\*---------------------------------------------------------------------------*/ 
    238 
    339#ifdef OSG_DOC_FILES_IN_MODULE 
     
    1046 
    1147/*-------------------------------------------------------------------------*/ 
    12 /* ParentSFieldConstReferenceProxy<ObjectTypeT>                            */ 
    13 /*-------------------------------------------------------------------------*/ 
    14  
    15 /*-------------------------------------------------------------------------*/ 
    16 /* Constructors                                                            */ 
    17  
    18 template <class ObjectTypeT> 
    19 inline 
    20     ParentSFieldConstReferenceProxy<ObjectTypeT>::ParentSFieldConstReferenceProxy( 
    21         StoredType   const * const pPtrValue, 
    22         IdStoredType const * const pIdValue  ) 
    23  
    24     : _pPtrValue(pPtrValue), 
    25       _pIdValue (pIdValue ) 
    26 { 
    27     // nothing to do 
    28 } 
    29  
    30 template <class ObjectTypeT> 
    31 inline 
    32     ParentSFieldConstReferenceProxy<ObjectTypeT>::ParentSFieldConstReferenceProxy( 
    33         Self const &source) 
    34      
    35     : _pPtrValue(source._pPtrValue), 
    36       _pIdValue (source._pIdValue ) 
    37 { 
    38     // nothing to do 
    39 } 
    40  
    41 /*-------------------------------------------------------------------------*/ 
    42 /* Destructor                                                              */ 
    43  
    44 template <class ObjectTypeT> 
    45 inline 
    46     ParentSFieldConstReferenceProxy<ObjectTypeT>::~ParentSFieldConstReferenceProxy( 
    47         void) 
    48 { 
    49     // nothing to do 
    50 } 
    51  
    52 /*-------------------------------------------------------------------------*/ 
    53 /* Operators                                                               */ 
    54  
    55 template <class ObjectTypeT> 
    56 inline 
    57     ParentSFieldConstReferenceProxy<ObjectTypeT>::operator value_type( 
    58         void) const 
    59 { 
    60     return AccessHandler::validate(*_pPtrValue); 
    61 } 
    62  
    63 template <class ObjectTypeT> 
    64 inline t