changed: gcc8 base update
[opensg.git] / Source / Base / FieldContainer / Fields / MemObjPointerFields / OSGMemObjPointerMField.inl
blob327854d383bc2b99d9a94898a2118a435191cfbf
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 \*---------------------------------------------------------------------------*/
39 OSG_BEGIN_NAMESPACE
41 /*-------------------------------------------------------------------------*/
42 /* MemObjPointerMFieldIterator<PtrTypeT>                                   */
43 /*-------------------------------------------------------------------------*/
45 /*-------------------------------------------------------------------------*/
46 /* Constructors                                                            */
48 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
49 MemObjPointerMFieldIterator<PtrTypeT,
50                             RefCountPolicy,
51                             NamespaceI    >::MemObjPointerMFieldIterator(void) :
52      Inherited(    ),
53     _pField   (NULL)
57 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
58 MemObjPointerMFieldIterator<PtrTypeT,
59                             RefCountPolicy,
60                             NamespaceI    >::MemObjPointerMFieldIterator(
61                                 const Self &source) :
62      Inherited(source        ),
63     _pField   (source._pField)
67 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
68 MemObjPointerMFieldIterator<PtrTypeT,
69                             RefCountPolicy,
70                             NamespaceI    >::MemObjPointerMFieldIterator(
71                                 const PtrStoreItType &storeIter,
72                                       MFieldType     *pField) :
73      Inherited(storeIter),
74     _pField   (pField   )
78 /*-------------------------------------------------------------------------*/
79 /* Destructor                                                              */
81 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
82 MemObjPointerMFieldIterator<PtrTypeT,
83                             RefCountPolicy,
84                             NamespaceI    >::~MemObjPointerMFieldIterator(void)
88 /*-------------------------------------------------------------------------*/
89 /* Operators                                                               */
91 #ifndef OSG_CLEAN_FCFIELDS
92 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
93 typename MemObjPointerMFieldIterator<PtrTypeT,
94                                      RefCountPolicy,
95                                      NamespaceI    >::reference
96     MemObjPointerMFieldIterator<PtrTypeT,
97                                 RefCountPolicy,
98                                 NamespaceI    >::operator *(void) const
100     return reference(*this, _pField);
104 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
105 typename MemObjPointerMFieldIterator<PtrTypeT,
106                                      RefCountPolicy,
107                                      NamespaceI    >::reference
108     MemObjPointerMFieldIterator<PtrTypeT,
109                                 RefCountPolicy,
110                                 NamespaceI>::operator [](
111                                     const difference_type offset) const
113     return reference(*this + offset, _pField);
115 #else
116 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
117 typename MemObjPointerMFieldIterator<PtrTypeT,
118                                      RefCountPolicy,
119                                      NamespaceI    >::const_value
120     MemObjPointerMFieldIterator<PtrTypeT,
121                                 RefCountPolicy,
122                                 NamespaceI    >::operator *(void) const
124     return static_cast<const_value>(
125         AccessHandler::validate(this->Inherited::operator*()));
129 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
130 typename MemObjPointerMFieldIterator<PtrTypeT,
131                                      RefCountPolicy,
132                                      NamespaceI    >::const_value
133     MemObjPointerMFieldIterator<PtrTypeT,
134                                 RefCountPolicy,
135                                 NamespaceI>::operator [](
136                                     const difference_type offset) const
138     return *(*this + offset);
140 #endif
142 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
143 typename MemObjPointerMFieldIterator<PtrTypeT,
144                                      RefCountPolicy,
145                                      NamespaceI    >::Self &
146     MemObjPointerMFieldIterator<PtrTypeT,
147                                 RefCountPolicy,
148                                 NamespaceI    >::operator ++(void)
150     this->Inherited::operator++();
152     return *this;
155 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
156 typename MemObjPointerMFieldIterator<PtrTypeT,
157                                      RefCountPolicy,
158                                      NamespaceI    >::Self
159     MemObjPointerMFieldIterator<PtrTypeT,
160                                 RefCountPolicy,
161                                 NamespaceI    >::operator ++(int)
163     Self retVal = *this;
165     this->Inherited::operator++();
167     return retVal;
170 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
171 typename MemObjPointerMFieldIterator<PtrTypeT,
172                                      RefCountPolicy,
173                                      NamespaceI    >::Self &
174     MemObjPointerMFieldIterator<PtrTypeT,
175                                 RefCountPolicy,
176                                 NamespaceI    >::operator --(void)
178     this->Inherited::operator--();
180     return *this;
183 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
184 typename MemObjPointerMFieldIterator<PtrTypeT,
185                                      RefCountPolicy,
186                                      NamespaceI    >::Self
187     MemObjPointerMFieldIterator<PtrTypeT,
188                                 RefCountPolicy,
189                                 NamespaceI    >::operator --(int)
191     Self retVal = *this;
193     this->Inherited::operator--();
195     return retVal;
198 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
199 typename MemObjPointerMFieldIterator<PtrTypeT,
200                                      RefCountPolicy,
201                                      NamespaceI    >::Self &
202     MemObjPointerMFieldIterator<PtrTypeT,
203                                 RefCountPolicy,
204                                 NamespaceI    >::operator +=(
205                                     const difference_type offset)
207     this->Inherited::operator+=(offset);
209     return *this;
212 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
213 typename MemObjPointerMFieldIterator<PtrTypeT,
214                                      RefCountPolicy,
215                                      NamespaceI    >::Self
216     MemObjPointerMFieldIterator<PtrTypeT,
217                                 RefCountPolicy,
218                                 NamespaceI    >::operator +(
219                                     const difference_type offset) const
221     Self retVal = *this;
223     return retVal += offset;
226 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
227 typename MemObjPointerMFieldIterator<PtrTypeT,
228                                      RefCountPolicy,
229                                      NamespaceI    >::Self &
230     MemObjPointerMFieldIterator<PtrTypeT,
231                                 RefCountPolicy,
232                                 NamespaceI    >::operator -=(
233                                     const difference_type offset)
235     this->Inherited::operator-=(offset);
237     return *this;
240 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
241 typename MemObjPointerMFieldIterator<PtrTypeT,
242                                      RefCountPolicy,
243                                      NamespaceI    >::Self
244     MemObjPointerMFieldIterator<PtrTypeT,
245                                 RefCountPolicy,
246                                 NamespaceI    >::operator - (
247                                     const difference_type offset) const
249     Self retVal = *this;
251     return retVal -= offset;
254 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
255 bool MemObjPointerMFieldIterator<PtrTypeT,
256                                  RefCountPolicy,
257                                  NamespaceI    >::operator ==(
258                                      const Self &rhs) const
260     return *(static_cast<const Inherited *>(this)) == rhs;
263 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
264 bool MemObjPointerMFieldIterator<PtrTypeT,
265                                  RefCountPolicy,
266                                  NamespaceI    >::operator !=(
267                                      const Self &rhs) const
269     return ! (*this == rhs);
272 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
273 bool MemObjPointerMFieldIterator<PtrTypeT,
274                                  RefCountPolicy,
275                                  NamespaceI    >::operator ==(
276                                      const const_iterator &rhs) const
278     return *(static_cast<const Inherited *>(this)) == rhs;
281 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
282 bool MemObjPointerMFieldIterator<PtrTypeT,
283                                  RefCountPolicy,
284                                  NamespaceI    >::operator !=(
285                                      const const_iterator &rhs) const
287     return ! (*this == rhs);
290 /*-------------------------------------------------------------------------*/
291 /* Base                                                                    */
293 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
294 const typename MemObjPointerMFieldIterator<PtrTypeT,
295                                            RefCountPolicy,
296                                            NamespaceI    >::PtrStoreItType &
297     MemObjPointerMFieldIterator<PtrTypeT,
298                                 RefCountPolicy,
299                                 NamespaceI    >::base(void) const
301     return *this;
304 /*-------------------------------------------------------------------------*/
305 /* Free Functions                                                          */
307 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
308 typename MemObjPointerMFieldIterator<PtrTypeT,
309                                      RefCountPolicyT,
310                                      NamespaceI      >::difference_type
311     operator-(MemObjPointerMFieldIterator<PtrTypeT,
312                                           RefCountPolicyT,
313                                           NamespaceI      > const &lhs,
314               MemObjPointerMFieldIterator<PtrTypeT,
315                                           RefCountPolicyT,
316                                           NamespaceI      > const &rhs )
318     return (lhs.base() - rhs.base());
321 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
322 MemObjPointerMFieldIterator<PtrTypeT,
323                             RefCountPolicyT,
324                             NamespaceI      >
325     operator+(typename MemObjPointerMFieldIterator<PtrTypeT,
326                                                    RefCountPolicyT,
327                                                    NamespaceI      >::differece_type const offset,
328               MemObjPointerMFieldIterator<PtrTypeT,
329                                           RefCountPolicyT,
330                                           NamespaceI      >                          const &rhs   )
332     return MemObjPointerMFieldIterator<PtrTypeT,
333                                        RefCountPolicyT,
334                                        NamespaceI      >(rhs) += offset;
338 /*-------------------------------------------------------------------------*/
339 /* MemObjPointerMFieldConstIterator<PtrTypeT>                              */
340 /*-------------------------------------------------------------------------*/
342 /*-------------------------------------------------------------------------*/
343 /* Constructors                                                            */
345 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
346 MemObjPointerMFieldConstIterator<
347           PtrTypeT,
348           RefCountPolicy,
349           NamespaceI    >::MemObjPointerMFieldConstIterator(void) :
351     Inherited()
355 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
356 MemObjPointerMFieldConstIterator<
357           PtrTypeT,
358           RefCountPolicy,
359           NamespaceI    >::MemObjPointerMFieldConstIterator(
360               const Self &source) :
362     Inherited(source)
366 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
367 MemObjPointerMFieldConstIterator<
368           PtrTypeT,
369           RefCountPolicy,
370           NamespaceI    >::MemObjPointerMFieldConstIterator(
371               const iterator &fieldIter) :
373     Inherited(fieldIter.base())
377 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
378 MemObjPointerMFieldConstIterator<
379           PtrTypeT,
380           RefCountPolicy,
381           NamespaceI    >::MemObjPointerMFieldConstIterator(
382               const PtrStoreConstItType &storeIter) :
384     Inherited(storeIter)
388 /*-------------------------------------------------------------------------*/
389 /* Destructor                                                              */
391 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
392 MemObjPointerMFieldConstIterator<
393           PtrTypeT,
394           RefCountPolicy,
395           NamespaceI    >::~MemObjPointerMFieldConstIterator(void)
399 /*-------------------------------------------------------------------------*/
400 /* Operators                                                               */
402 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
403 typename MemObjPointerMFieldConstIterator<PtrTypeT,
404                                           RefCountPolicy,
405                                           NamespaceI    >::const_value
406     MemObjPointerMFieldConstIterator<PtrTypeT,
407                                      RefCountPolicy,
408                                      NamespaceI    >::operator *(void) const
410     return static_cast<const_value>(
411         AccessHandler::validate(this->Inherited::operator*()));
415 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
416 typename MemObjPointerMFieldConstIterator<PtrTypeT,
417                                           RefCountPolicy,
418                                           NamespaceI   >::const_value
419     MemObjPointerMFieldConstIterator<PtrTypeT,
420                                      RefCountPolicy,
421                                      NamespaceI    >::operator [](
422         const difference_type offset) const
424     return *(*this + offset);
427 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
428 typename MemObjPointerMFieldConstIterator<PtrTypeT,
429                                           RefCountPolicy,
430                                           NamespaceI    >::Self &
431     MemObjPointerMFieldConstIterator<PtrTypeT,
432                                      RefCountPolicy,
433                                      NamespaceI    >::operator ++(void)
435     this->Inherited::operator++();
437     return *this;
440 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
441 typename MemObjPointerMFieldConstIterator<PtrTypeT,
442                                           RefCountPolicy,
443                                           NamespaceI    >::Self
444     MemObjPointerMFieldConstIterator<PtrTypeT,
445                                      RefCountPolicy,
446                                      NamespaceI    >::operator ++(int)
448     Self retVal = *this;
450     this->Inherited::operator++();
452     return retVal;
455 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
456 typename MemObjPointerMFieldConstIterator<PtrTypeT,
457                                           RefCountPolicy,
458                                           NamespaceI    >::Self &
459     MemObjPointerMFieldConstIterator<PtrTypeT,
460                                      RefCountPolicy,
461                                      NamespaceI    >::operator --(void)
463     this->Inherited::operator--();
465     return *this;
468 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
469 typename MemObjPointerMFieldConstIterator<PtrTypeT,
470                                           RefCountPolicy,
471                                           NamespaceI    >::Self
472     MemObjPointerMFieldConstIterator<PtrTypeT,
473                                      RefCountPolicy,
474                                      NamespaceI    >::operator --(int)
476     Self retVal = *this;
478     this->Inherited::oprator--();
480     return retVal;
483 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
484 typename MemObjPointerMFieldConstIterator<PtrTypeT,
485                                           RefCountPolicy,
486                                           NamespaceI    >::Self &
487     MemObjPointerMFieldConstIterator<PtrTypeT,
488                                      RefCountPolicy,
489                                      NamespaceI    >::operator +=(
490                                          const difference_type offset)
492     this->Inherited::operator+=(offset);
494     return *this;
497 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
498 typename MemObjPointerMFieldConstIterator<PtrTypeT,
499                                           RefCountPolicy,
500                                           NamespaceI    >::Self
501     MemObjPointerMFieldConstIterator<PtrTypeT,
502                                      RefCountPolicy,
503                                      NamespaceI    >::operator +(
504                                          const difference_type offset) const
506     Self retVal = *this;
508     return retVal += offset;
511 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
512 typename MemObjPointerMFieldConstIterator<PtrTypeT,
513                                           RefCountPolicy,
514                                           NamespaceI    >::Self &
515     MemObjPointerMFieldConstIterator<PtrTypeT,
516                                      RefCountPolicy,
517                                      NamespaceI    >::operator -=(
518                                          const difference_type offset)
520     this->Inherited::operator-=(offset);
522     return *this;
525 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
526 typename MemObjPointerMFieldConstIterator<PtrTypeT,
527                                           RefCountPolicy,
528                                           NamespaceI    >::Self
529     MemObjPointerMFieldConstIterator<PtrTypeT,
530                                      RefCountPolicy,
531                                      NamespaceI    >::operator -(
532                                          const difference_type offset) const
534     Self retVal = *this;
536     return retVal -= offset;
539 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
540 bool MemObjPointerMFieldConstIterator<PtrTypeT,
541                                       RefCountPolicy,
542                                       NamespaceI    >::operator ==(
543                                           const Self &rhs) const
545     return *(static_cast<const Inherited *>(this)) == rhs;
548 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
549 bool MemObjPointerMFieldConstIterator<PtrTypeT,
550                                       RefCountPolicy,
551                                       NamespaceI    >::operator !=(
552                                           const Self &rhs) const
554     return ! (*this == rhs);
557 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
558 bool MemObjPointerMFieldConstIterator<PtrTypeT,
559                                       RefCountPolicy,
560                                       NamespaceI    >::operator ==(
561                                           const iterator &rhs) const
563     return *(static_cast<const Inherited *>(this)) == rhs;
566 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
567 bool MemObjPointerMFieldConstIterator<PtrTypeT,
568                                       RefCountPolicy,
569                                       NamespaceI    >::operator !=(
570                                           const iterator &rhs) const
572     return ! (*this == rhs);
575 /*-------------------------------------------------------------------------*/
576 /* Base                                                                    */
578 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
579 const typename MemObjPointerMFieldConstIterator<
580           PtrTypeT,
581           RefCountPolicy,
582           NamespaceI    >::PtrStoreConstItType &
584     MemObjPointerMFieldConstIterator<PtrTypeT,
585                                      RefCountPolicy,
586                                      NamespaceI    >::base(void) const
588     return *this;
592 /*-------------------------------------------------------------------------*/
593 /* Free Functions                                                          */
595 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
596 typename MemObjPointerMFieldConstIterator<PtrTypeT,
597                                           RefCountPolicyT,
598                                           NamespaceI      >::difference_type
599     operator-(MemObjPointerMFieldConstIterator<PtrTypeT,
600                                                RefCountPolicyT,
601                                                NamespaceI      > const &lhs,
602               MemObjPointerMFieldConstIterator<PtrTypeT,
603                                                RefCountPolicyT,
604                                                NamespaceI      > const &rhs )
606     return (lhs.base() - rhs.base());
609 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
610 typename MemObjPointerMFieldConstIterator<PtrTypeT,
611                                           RefCountPolicyT,
612                                           NamespaceI      >::difference_type
613     operator-(MemObjPointerMFieldIterator     <PtrTypeT,
614                                                RefCountPolicyT,
615                                                NamespaceI      > const &lhs,
616               MemObjPointerMFieldConstIterator<PtrTypeT,
617                                                RefCountPolicyT,
618                                                NamespaceI      > const &rhs )
620     return (lhs.base() - rhs.base());
623 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
624 typename MemObjPointerMFieldConstIterator<PtrTypeT,
625                                           RefCountPolicyT,
626                                           NamespaceI      >::difference_type
627     operator-(MemObjPointerMFieldConstIterator<PtrTypeT,
628                                                RefCountPolicyT,
629                                                NamespaceI      > const &lhs,
630               MemObjPointerMFieldIterator     <PtrTypeT,
631                                                RefCountPolicyT,
632                                                NamespaceI      > const &rhs )
634     return (lhs.base() - rhs.base());
637 template <class PtrTypeT, typename RefCountPolicyT, Int32 NamespaceI>
638 MemObjPointerMFieldConstIterator<PtrTypeT,
639                                  RefCountPolicyT,
640                                  NamespaceI      >
641     operator+(typename MemObjPointerMFieldConstIterator<PtrTypeT,
642                                                         RefCountPolicyT,
643                                                         NamespaceI       >::difference_type const offset,
644               MemObjPointerMFieldConstIterator         <PtrTypeT,
645                                                         RefCountPolicyT,
646                                                         NamespaceI       >                  const &rhs   )
648     return MemObjPointerMFieldConstIterator<PtrTypeT,
649                                             RefCountPolicyT,
650                                             NamespaceI      >(rhs) += offset;
654 /*-------------------------------------------------------------------------*/
655 /* MemObjPointerMFieldReferenceProxy<PtrTypeT>                             */
656 /*-------------------------------------------------------------------------*/
658 #ifndef OSG_CLEAN_FCFIELDS
659 /*-------------------------------------------------------------------------*/
660 /* Constructors                                                            */
662 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
663 MemObjPointerMFieldReferenceProxy<
664           PtrTypeT,
665           RefCountPolicy,
666           NamespaceI    >::MemObjPointerMFieldReferenceProxy(
667               const PtrStoreItType &storeIter,
668               MFieldType     *pField   ) :
670     _storeIter(storeIter),
671     _pField   (pField   )
675 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
676 MemObjPointerMFieldReferenceProxy<
677           PtrTypeT,
678           RefCountPolicy,
679           NamespaceI    >::MemObjPointerMFieldReferenceProxy(
680               const Self &source) :
682     _storeIter(source._storeIter),
683     _pField   (source._pField   )
687 /*-------------------------------------------------------------------------*/
688 /* Destructor                                                              */
690 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
691 MemObjPointerMFieldReferenceProxy<
692           PtrTypeT,
693           RefCountPolicy,
694           NamespaceI    >::~MemObjPointerMFieldReferenceProxy(void)
698 /*-------------------------------------------------------------------------*/
699 /* Operators                                                               */
701 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
702 MemObjPointerMFieldReferenceProxy<PtrTypeT,
703                                   RefCountPolicy,
704                                   NamespaceI    >::operator
705 #if defined(_MSC_VER) && _MSC_VER < 1400
706 typename MemObjPointerMFieldReferenceProxy<PtrTypeT,
707                                            RefCountPolicy,
708                                            NamespaceI    >::
709 #endif
710                                                       value_type(void) const
712     return static_cast<value_type>(AccessHandler::validate(*_storeIter));
715 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
716 typename MemObjPointerMFieldReferenceProxy<PtrTypeT,
717                                            RefCountPolicy,
718                                            NamespaceI    >::value_type
719      MemObjPointerMFieldReferenceProxy<PtrTypeT,
720                                        RefCountPolicy,
721                                        NamespaceI    >::operator->(void) const
723     return static_cast<value_type>(AccessHandler::validate(*_storeIter));
726 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
727 void MemObjPointerMFieldReferenceProxy<PtrTypeT,
728                                        RefCountPolicy,
729                                        NamespaceI    >::operator=(
730                                            value_type newValue)
732     AccessHandler::onReplace(_pField, *_storeIter, newValue);
734     *_storeIter = newValue;
737 #endif
739 /*-------------------------------------------------------------------------*/
740 /* MemObjPointerPointerMField<PtrTypeT,                                    */
741 /*                            NamespaceI  >                                */
742 /*-------------------------------------------------------------------------*/
744 /*-------------------------------------------------------------------------*/
745 /* Class Type                                                              */
747 /*-------------------------------------------------------------------------*/
748 /* Constructors                                                            */
750 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
751 MemObjPointerMField<PtrTypeT,
752                     RefCountPolicy,
753                     NamespaceI    >::MemObjPointerMField(void) :
754     Inherited()
758 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
759 MemObjPointerMField<PtrTypeT,
760                     RefCountPolicy,
761                     NamespaceI    >::MemObjPointerMField(Self const &other) :
762     Inherited(other)
766 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
767 MemObjPointerMField<PtrTypeT,
768                     RefCountPolicy,
769                     NamespaceI    >::MemObjPointerMField(UInt32 const size) :
770     Inherited(size)
774 /*-------------------------------------------------------------------------*/
775 /* Destructor                                                              */
777 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
778 MemObjPointerMField<PtrTypeT,
779                     RefCountPolicy,
780                     NamespaceI    >::~MemObjPointerMField(void)
784 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
785 void MemObjPointerMField<PtrTypeT,
786                          RefCountPolicy,
787                          NamespaceI    >::copyFromBin(BinaryDataHandler &pMem)
789     Inherited::copyFromBin(pMem);
794 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
795 typename MemObjPointerMField<PtrTypeT,
796                              RefCountPolicy,
797                              NamespaceI    >::iterator
798     MemObjPointerMField<PtrTypeT,
799                         RefCountPolicy,
800                         NamespaceI    >::begin_nc(void)
802     return iterator(this->_ptrStore.begin(), this);
805 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
806 typename MemObjPointerMField<PtrTypeT,
807                              RefCountPolicy,
808                              NamespaceI    >::iterator
809     MemObjPointerMField<PtrTypeT,
810                         RefCountPolicy,
811                         NamespaceI    >::end_nc(void)
813     return iterator(this->_ptrStore.end(), this);
816 #ifndef OSG_CLEAN_FCFIELDS
817 #if 0
818 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
819 typename MemObjPointerMField<PtrTypeT,
820                              RefCountPolicy,
821                              NamespaceI    >::reference
822     MemObjPointerMField<PtrTypeT,
823                         RefCountPolicy,
824                         NamespaceI    >::front_nc(void)
828 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
829 typename MemObjPointerMField<PtrTypeT,
830                              RefCountPolicy,
831                              NamespaceI    >::reference back_nc (void);
832 #endif
833 #endif
835 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
836 typename MemObjPointerMField<PtrTypeT,
837                              RefCountPolicy,
838                              NamespaceI    >::iterator
839     MemObjPointerMField<PtrTypeT,
840                         RefCountPolicy,
841                         NamespaceI    >::find_nc(const_value value)
843     return iterator(this->ptrStoreFind(value),
844                     this                     );
847 /*-------------------------------------------------------------------------*/
848 /* Std Library Interface                                                   */
850 #ifndef OSG_CLEAN_FCFIELDS
851 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
852 typename MemObjPointerMField<PtrTypeT,
853                              RefCountPolicy,
854                              NamespaceI    >::iterator
855     MemObjPointerMField<PtrTypeT,
856                         RefCountPolicy,
857                         NamespaceI    >::begin(void)
859 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
860     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
861 #endif
863     return iterator(this->_ptrStore.begin(), this);
866 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
867 typename MemObjPointerMField<PtrTypeT,
868                              RefCountPolicy,
869                              NamespaceI    >::iterator
870     MemObjPointerMField<PtrTypeT,
871                         RefCountPolicy,
872                         NamespaceI    >::end(void)
874 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
875     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
876 #endif
878     return iterator(this->_ptrStore.end(), this);
881 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
882 typename MemObjPointerMField<PtrTypeT,
883                              RefCountPolicy,
884                              NamespaceI    >::reverse_iterator
885     MemObjPointerMField<PtrTypeT,
886                         RefCountPolicy,
887                         NamespaceI    >::rbegin(void)
889 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
890     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
891 #endif
893     return reverse_iterator(this->end());
896 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
897 typename MemObjPointerMField<PtrTypeT,
898                              RefCountPolicy,
899                              NamespaceI    >::reverse_iterator
900     MemObjPointerMField<PtrTypeT,
901                         RefCountPolicy,
902                         NamespaceI    >::rend(void)
904 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
905     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
906 #endif
908     return reverse_iterator(this->begin());
910 #endif
912 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
913 typename MemObjPointerMField<PtrTypeT,
914                              RefCountPolicy,
915                              NamespaceI    >::const_iterator
916     MemObjPointerMField<PtrTypeT,
917                         RefCountPolicy,
918                         NamespaceI    >::begin(void) const
920     return const_iterator(this->_ptrStore.begin());
923 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
924 typename MemObjPointerMField<PtrTypeT,
925                              RefCountPolicy,
926                              NamespaceI    >::const_iterator
927     MemObjPointerMField<PtrTypeT,
928                         RefCountPolicy,
929                         NamespaceI    >::end(void) const
931     return const_iterator(this->_ptrStore.end());
934 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
935 typename MemObjPointerMField<PtrTypeT,
936                              RefCountPolicy,
937                              NamespaceI    >::const_reverse_iterator
938     MemObjPointerMField<PtrTypeT,
939                         RefCountPolicy,
940                         NamespaceI    >::rbegin(void) const
942     return const_reverse_iterator(this->end());
945 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
946 typename MemObjPointerMField<PtrTypeT,
947                              RefCountPolicy,
948                              NamespaceI    >::const_reverse_iterator
949     MemObjPointerMField<PtrTypeT,
950                         RefCountPolicy,
951                         NamespaceI    >::rend(void) const
953     return const_reverse_iterator(this->begin());
956 #ifndef OSG_CLEAN_FCFIELDS
957 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
958 typename MemObjPointerMField<PtrTypeT,
959                              RefCountPolicy,
960                              NamespaceI    >::reference
961     MemObjPointerMField<PtrTypeT,
962                         RefCountPolicy,
963                         NamespaceI    >::front(void)
965 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
966     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
967 #endif
969     return reference(this->_ptrStore.begin(), this);
971 #endif
973 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
974 typename MemObjPointerMField<PtrTypeT,
975                              RefCountPolicy,
976                              NamespaceI    >::const_value
977     MemObjPointerMField<PtrTypeT,
978                         RefCountPolicy,
979                         NamespaceI    >::front(void) const
981     return static_cast<const_value>(this->ptrStoreGet(this->_ptrStore.begin()));
984 #ifndef OSG_CLEAN_FCFIELDS
985 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
986 typename MemObjPointerMField<PtrTypeT,
987                              RefCountPolicy,
988                              NamespaceI    >::reference
989     MemObjPointerMField<PtrTypeT,
990                         RefCountPolicy,
991                         NamespaceI    >::back(void)
993 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
994     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
995 #endif
997     return reference(this->_ptrStore.end() - 1, this);
999 #endif
1001 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1002 typename MemObjPointerMField<PtrTypeT,
1003                              RefCountPolicy,
1004                              NamespaceI    >::const_value
1005     MemObjPointerMField<PtrTypeT,
1006                         RefCountPolicy,
1007                         NamespaceI    >::back(void) const
1009     return static_cast<const_value>(
1010         this->ptrStoreGet(this->_ptrStore.end() - 1));
1014 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1015 typename MemObjPointerMField<PtrTypeT,
1016                              RefCountPolicy,
1017                              NamespaceI    >::iterator
1018     MemObjPointerMField<PtrTypeT,
1019                         RefCountPolicy,
1020                         NamespaceI  >::insert(iterator pos, const_value value)
1022     return iterator(this->ptrStoreInsert(pos.base(), value), this);
1025 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI>
1026 void MemObjPointerMField<PtrTypeT,
1027                          RefCountPolicy,
1028                          NamespaceI     >::insert(iterator    pos,
1029                                                   size_type   n,
1030                                                   const_value value)
1032     this->ptrStoreInsert(pos, n, value);
1035 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI>
1036 template <class InputIteratorT                                        > inline
1037 void MemObjPointerMField<PtrTypeT,
1038                          RefCountPolicy,
1039                          NamespaceI    >::insert(iterator       pos,
1040                                                  InputIteratorT first,
1041                                                  InputIteratorT last)
1043     this->ptrStoreInsert(pos, first, last);
1046 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1047 void MemObjPointerMField<PtrTypeT,
1048                          RefCountPolicy,
1049                          NamespaceI    >::erase(size_type index)
1051     return this->ptrStoreErase(index);
1054 #ifndef OSG_CLEAN_FCFIELDS
1055 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1056 typename MemObjPointerMField<PtrTypeT,
1057                              RefCountPolicy,
1058                              NamespaceI    >::iterator
1059     MemObjPointerMField<PtrTypeT,
1060                   RefCountPolicy,
1061                   NamespaceI    >::erase(iterator pos)
1063     return iterator(this->ptrStoreErase(pos.base()), this);
1066 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1067 typename MemObjPointerMField<PtrTypeT,
1068                              RefCountPolicy,
1069                              NamespaceI    >::iterator
1070     MemObjPointerMField<PtrTypeT,
1071                         RefCountPolicy,
1072                         NamespaceI    >::erase(iterator first, iterator last)
1074     return iterator(this->ptrStoreErase(first.base(), last.base()), this);
1076 #endif
1078 #ifndef OSG_CLEAN_FCFIELDS
1079 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1080 typename MemObjPointerMField<PtrTypeT,
1081                              RefCountPolicy,
1082                              NamespaceI    >::iterator
1083     MemObjPointerMField<PtrTypeT,
1084                         RefCountPolicy,
1085                         NamespaceI    >::find(const_value value)
1087 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
1088     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
1089 #endif
1091     return iterator(this->ptrStoreFind(value),
1092                     this                     );
1094 #endif
1096 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1097 typename MemObjPointerMField<PtrTypeT,
1098                              RefCountPolicy,
1099                              NamespaceI    >::const_iterator
1100     MemObjPointerMField<PtrTypeT,
1101                         RefCountPolicy,
1102                         NamespaceI    >::find(const_value value) const
1104     return const_iterator(this->ptrStoreFind(value),
1105                           this                     );
1108 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1109 void MemObjPointerMField<PtrTypeT,
1110                          RefCountPolicy,
1111                          NamespaceI    >::push_back(const_value value)
1113     this->ptrStoreAppend(value);
1116 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1117 void MemObjPointerMField<PtrTypeT,
1118                          RefCountPolicy,
1119                          NamespaceI    >::resize(size_t      newSize, 
1120                                                  const_value value  )
1122     this->ptrStoreResize(newSize, value);
1125 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1126 void MemObjPointerMField<PtrTypeT,
1127                          RefCountPolicy,
1128                          NamespaceI    >::reserve(size_type size)
1130     this->_ptrStore.reserve(size);
1133 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1134 void MemObjPointerMField<PtrTypeT,
1135                          RefCountPolicy,
1136                          NamespaceI    >::clear(void)
1138     this->ptrStoreClear();
1141 #ifdef OSG_1_COMPAT
1142 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1143 void MemObjPointerMField<PtrTypeT,
1144                          RefCountPolicy,
1145                          NamespaceI    >::addValue(const_value value)
1147     this->push_back(value);
1149 #endif
1151 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1152 void MemObjPointerMField<PtrTypeT,
1153                          RefCountPolicy,
1154                          NamespaceI    >::assign(size_type   newSize,
1155                                                  const_value value  )
1157     this->ptrStoreClear();
1159     for(size_type i = 0; i < newSize; ++i)
1160         this->ptrStoreAppend(value);
1163 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI>
1164 template <class InputIteratorT                                        > inline
1165 void MemObjPointerMField<PtrTypeT,
1166                          RefCountPolicy,
1167                          NamespaceI    >::assign(InputIteratorT first,
1168                                                  InputIteratorT last)
1170     this->ptrStoreAssign(first, last);
1173 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1174 void MemObjPointerMField<PtrTypeT,
1175                          RefCountPolicy,
1176                          NamespaceI    >::replace(UInt32      uiIdx,
1177                                                   const_value value)
1179     this->ptrStoreReplace(uiIdx, value);
1182 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1183 void MemObjPointerMField<PtrTypeT,
1184                          RefCountPolicy,
1185                          NamespaceI    >::replace(iterator    pos,
1186                                                   const_value value)
1188     this->ptrStoreReplace(pos.base(), value);
1191 /*-------------------------------------------------------------------------*/
1192 /* Index Operator                                                          */
1194 #ifndef OSG_CLEAN_FCFIELDS
1195 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1196 typename MemObjPointerMField<PtrTypeT,
1197                              RefCountPolicy,
1198                              NamespaceI    >::reference
1199     MemObjPointerMField<PtrTypeT,
1200                         RefCountPolicy,
1201                         NamespaceI    >::operator [](const UInt32 index)
1203 #ifdef OSG_CHECK_CONST_CORRECT_FIELD_USAGE
1204     BOOST_STATIC_ASSERT(sizeof(PtrTypeT) == 0);
1205 #endif
1207     return reference(this->_ptrStore.begin() + index, this);
1209 #endif
1211 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1212 typename MemObjPointerMField<PtrTypeT,
1213                              RefCountPolicy,
1214                              NamespaceI    >::const_value
1215     MemObjPointerMField<PtrTypeT,
1216                         RefCountPolicy,
1217                         NamespaceI    >::operator [](const UInt32 index) const
1219     return static_cast<const_value>(this->ptrStoreGet(index));
1222 /*-------------------------------------------------------------------------*/
1223 /* Assignment                                                              */
1225 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1226 typename MemObjPointerMField<PtrTypeT,
1227                              RefCountPolicy,
1228                              NamespaceI    >::Self &
1229     MemObjPointerMField<PtrTypeT,
1230                         RefCountPolicy,
1231                         NamespaceI    >::operator=(const Self &source)
1233 //    this->setValues(source);
1235     OSG_ASSERT(false);
1237     return *this;
1241 #ifdef OSG_MT_CPTR_ASPECT
1242 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1243 void MemObjPointerMField<PtrTypeT,
1244                          RefCountPolicy,
1245                          NamespaceI    >::syncWith(
1246                              Self               &source,
1247                              ConstFieldMaskArg   syncMode,
1248                              UInt32              uiSyncInfo,
1249                              AspectOffsetStore  &oOffsets    )
1251     Inherited::syncWith(source,
1252                         syncMode,
1253                         uiSyncInfo,
1254                         oOffsets  );
1256 #endif
1258 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1259 FieldDescriptionBase *
1260     MemObjPointerMField<PtrTypeT,
1261                          RefCountPolicy,
1262                          NamespaceI    >::createFieldDescription   (
1263                              const Char8                *szFieldname,
1264                                    UInt32                uiFieldFlags,
1265                                    FieldEditMethod       fEditMethod,
1266                                    FieldGetMethod        fGetMethod  )
1268     return NULL;
1271 template <class PtrTypeT, typename RefCountPolicy, Int32 NamespaceI> inline
1272 FieldDescriptionBase *
1273     MemObjPointerMField<PtrTypeT,
1274                          RefCountPolicy,
1275                          NamespaceI    >::createIdxFieldDescription(
1276                              const Char8                *szFieldname,
1277                                    UInt32                uiFieldFlags,
1278                                    FieldIndexEditMethod  fEditMethod,
1279                                    FieldIndexGetMethod   fGetMethod  )
1281     return NULL;
1283     
1285 OSG_END_NAMESPACE