Changeset 1130
- Timestamp:
- 04/06/08 23:01:40 (5 months ago)
- Files:
-
- trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrMFieldBase.h (modified) (7 diffs)
- trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrMFieldBase.inl (modified) (5 diffs)
- trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrParentMField.h (modified) (1 diff)
- trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrSFieldBase.h (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrSFieldBase.inl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrMFieldBase.h
r1120 r1130 57 57 public: 58 58 59 typedef MFieldVector<FieldContainerPtr> StorageType; 60 typedef StorageType::Inherited StorageTypeParent; 59 typedef Field Inherited; 60 typedef FieldContainerPtrMFieldBase Self; 61 62 typedef FieldContainerPtr StoredType; 63 typedef MFieldVector<StoredType> StorageType; 61 64 62 65 typedef StorageType::const_iterator const_iterator; 63 64 typedef const FieldContainerPtr const_reference; 66 typedef StorageType::const_reverse_iterator const_reverse_iterator; 67 68 typedef StorageType::const_iterator StorageConstIt; 69 70 typedef const FieldContainerPtr const_value; 65 71 66 72 typedef StorageType::size_type size_type; 73 typedef StorageType::difference_type difference_type; 74 67 75 68 76 typedef FieldTraits<FieldContainerPtr, 0> MFieldTraits; 69 77 70 typedef FieldContainerPtrMFieldBase Self;71 72 typedef FieldContainerPtr StoredType;73 typedef FieldContainerPtr ArgumentType;74 78 75 79 typedef EditMFieldHandle <Self > EditHandle; … … 111 115 /*! \{ */ 112 116 113 const_iterator begin (void) const;114 const_iterator end (void) const;117 const_iterator begin (void ) const; 118 const_iterator end (void ) const; 115 119 116 Int32 findIndex(ArgumentType value) const; 117 118 size_type size (void ) const; 119 size_type capacity (void ) const; 120 bool empty (void ) const; 120 const_reverse_iterator rbegin (void ) const; 121 const_reverse_iterator rend (void ) const; 122 123 const_value front (void ) const; 124 const_value back (void ) const; 125 126 bool empty (void ) const; 127 size_type size (void ) const; 128 size_type max_size (void ) const; 129 size_type capacity (void ) const; 130 131 Int32 findIndex(const_value value) const; 121 132 122 133 /*! \} */ … … 125 136 /*! \{ */ 126 137 127 const_reference operator [](UInt32 index) const; 138 const_value operator [](const UInt32 index) const; 139 const_value at (const UInt32 index) const; 128 140 129 141 /*! \} */ … … 166 178 167 179 typedef StorageType::iterator iterator; 180 typedef StorageType::iterator StorageIt; 168 181 169 182 /*---------------------------------------------------------------------*/ … … 171 184 /*! \{ */ 172 185 173 typedef Field Inherited;174 186 175 187 /*! \} */ … … 178 190 /*! \{ */ 179 191 180 FieldContainerPtrMFieldBase(void); 181 // explicit FieldContainerPtrMFieldBase(const UInt32 size); 182 192 FieldContainerPtrMFieldBase(void); 193 183 194 /*! \} */ 184 195 /*---------------------------------------------------------------------*/ … … 191 202 /*---------------------------------------------------------------------*/ 192 203 /*! \name STL Interface */ 193 /*! \{ */194 195 196 /*! \} */197 /*---------------------------------------------------------------------*/198 /*! \name Get */199 /*! \{ */200 201 /*! \} */202 /*---------------------------------------------------------------------*/203 /*! \name Set */204 /*! \{ */205 206 /*! \} */207 /*---------------------------------------------------------------------*/208 /*! \name Binary Interface */209 /*! \{ */210 211 /*! \} */212 /*---------------------------------------------------------------------*/213 /*! \name MT Sync */214 204 /*! \{ */ 215 205 trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrMFieldBase.inl
r1110 r1130 78 78 } 79 79 80 inline 81 Int32 FieldContainerPtrMFieldBase::findIndex(ArgumentType value) const 80 inline 81 FieldContainerPtrMFieldBase::const_reverse_iterator 82 FieldContainerPtrMFieldBase::rbegin(void) const 83 { 84 return _values.rbegin(); 85 } 86 87 inline 88 FieldContainerPtrMFieldBase::const_reverse_iterator 89 FieldContainerPtrMFieldBase::rend(void) const 90 { 91 return _values.rend(); 92 } 93 94 inline 95 FieldContainerPtrMFieldBase::const_value 96 FieldContainerPtrMFieldBase::front(void) const 97 { 98 return _values.front(); 99 } 100 101 inline 102 FieldContainerPtrMFieldBase::const_value 103 FieldContainerPtrMFieldBase::back(void) const 104 { 105 return _values.back(); 106 } 107 108 inline 109 bool FieldContainerPtrMFieldBase::empty(void) const 110 { 111 return _values.empty(); 112 } 113 114 inline 115 FieldContainerPtrMFieldBase::size_type 116 FieldContainerPtrMFieldBase::size(void) const 117 { 118 return _values.size(); 119 } 120 121 inline 122 FieldContainerPtrMFieldBase::size_type 123 FieldContainerPtrMFieldBase::max_size(void) const 124 { 125 return _values.max_size(); 126 } 127 128 inline 129 FieldContainerPtrMFieldBase::size_type 130 FieldContainerPtrMFieldBase::capacity(void) const 131 { 132 return _values.capacity(); 133 } 134 135 136 inline 137 Int32 FieldContainerPtrMFieldBase::findIndex(const_value value) const 82 138 { 83 139 const_iterator it = std::find(_values.begin(), _values.end(), value); … … 93 149 } 94 150 95 inline 96 FieldContainerPtrMFieldBase::size_type 97 FieldContainerPtrMFieldBase::size(void) const 98 { 99 return _values.size(); 100 } 101 102 inline 103 FieldContainerPtrMFieldBase::size_type 104 FieldContainerPtrMFieldBase::capacity(void) const 105 { 106 return _values.capacity(); 107 } 108 109 inline 110 bool FieldContainerPtrMFieldBase::empty(void) const 111 { 112 return _values.empty(); 151 152 inline 153 FieldContainerPtrMFieldBase::const_value 154 FieldContainerPtrMFieldBase::operator [](UInt32 index) const 155 { 156 return _values[index]; 157 } 158 159 inline 160 FieldContainerPtrMFieldBase::const_value 161 FieldContainerPtrMFieldBase::at(UInt32 const index) const 162 { 163 return _values.at(index); 113 164 } 114 165 … … 117 168 { 118 169 return _values == source._values; 119 }120 121 inline122 FieldContainerPtrMFieldBase::const_reference123 FieldContainerPtrMFieldBase::operator [](UInt32 index) const124 {125 return _values[index];126 170 } 127 171 … … 149 193 150 194 inline 151 bool FieldContainerPtrMFieldBase::isShared(void)195 bool FieldContainerPtrMFieldBase::isShared(void) 152 196 { 153 197 return false; 154 198 } 155 199 #endif 200 156 201 157 202 inline … … 162 207 } 163 208 164 #if 0165 inline166 FieldContainerPtrMFieldBase::FieldContainerPtrMFieldBase(const Self &obj) :167 Inherited(obj ),168 _values (obj._values)169 {170 }171 172 inline173 FieldContainerPtrMFieldBase::FieldContainerPtrMFieldBase(const UInt32 size) :174 Inherited(),175 _values ()176 {177 _values.resize(size, NULL);178 }179 #endif180 181 209 inline 182 210 FieldContainerPtrMFieldBase::~FieldContainerPtrMFieldBase(void) trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrParentMField.h
r1126 r1130 63 63 64 64 typedef typename StorageType::reference reference; 65 typedef typename StorageType::const_referenceconst_reference;65 typedef const ValueT const_reference; 66 66 67 67 typedef typename StorageType::size_type size_type; trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrSFieldBase.h
r1109 r1130 55 55 public: 56 56 57 typedef Field Inherited; 58 59 typedef FieldContainerPtrSFieldBase Self; 57 60 typedef FieldTraits <FieldContainerPtr, 0> SFieldTraits; 58 typedef FieldContainerPtrSFieldBase Self;59 61 60 62 typedef FieldContainerPtr StoredType; 61 typedef const FieldContainerPtr const_reference; 62 63 typedef const FieldContainerPtr ArgumentType; 63 typedef const FieldContainerPtr const_value; 64 64 65 65 typedef EditSFieldHandle <Self > EditHandle; … … 87 87 /*! \{ */ 88 88 89 const_ reference getValue(void) const;89 const_value getValue(void) const; 90 90 91 91 /*! \} */ … … 119 119 /*! \{ */ 120 120 121 typedef Field Inherited;122 123 121 /*! \} */ 124 122 /*---------------------------------------------------------------------*/ … … 126 124 /*! \{ */ 127 125 128 FieldContainerPtrSFieldBase( void);129 FieldContainerPtrSFieldBase(const Self &obj);130 explicit FieldContainerPtrSFieldBase( ArgumentType value);126 FieldContainerPtrSFieldBase( void ); 127 FieldContainerPtrSFieldBase(const Self &source); 128 explicit FieldContainerPtrSFieldBase( const_value value ); 131 129 132 130 /*! \} */ trunk/Source/System/FieldContainer/Fields/Base/OSGFieldContainerPtrSFieldBase.inl
r1109 r1130 47 47 48 48 inline 49 FieldContainerPtrSFieldBase::FieldContainerPtrSFieldBase(const Self & obj) :50 Inherited ( obj),51 _fieldValue( obj._fieldValue)49 FieldContainerPtrSFieldBase::FieldContainerPtrSFieldBase(const Self &source) : 50 Inherited (source ), 51 _fieldValue(source._fieldValue) 52 52 { 53 53 } 54 54 55 55 inline 56 FieldContainerPtrSFieldBase::FieldContainerPtrSFieldBase(ArgumentType value) : 56 FieldContainerPtrSFieldBase::FieldContainerPtrSFieldBase( 57 const_value value) : 58 57 59 Inherited ( ), 58 60 _fieldValue(value) … … 66 68 67 69 inline 70 FieldContainerPtrSFieldBase::const_value 71 FieldContainerPtrSFieldBase::getValue(void) const 72 { 73 return _fieldValue; 74 } 75 76 inline 68 77 UInt32 FieldContainerPtrSFieldBase::getBinSize(void) const 69 78 { … … 71 80 } 72 81 73 inline74 FieldContainerPtrSFieldBase::const_reference75 FieldContainerPtrSFieldBase::getValue(void) const76 {77 return _fieldValue;78 }79 82 80 83 inline
