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

changed: cleaned sfields

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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());