00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSGFIELDCONTAINERPTRIMPL_INL_
00040 #define _OSGFIELDCONTAINERPTRIMPL_INL_
00041
00042 #ifdef OSG_DOC_FILES_IN_MODULE
00043
00046 #endif
00047
00048 #include <stdlib.h>
00049 #include <stdio.h>
00050
00051 #include "OSGConfig.h"
00052
00053 #include <iostream>
00054
00055 OSG_BEGIN_NAMESPACE
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 inline
00066 Int32 *FieldContainerPtrBase::getRefCountP(void)
00067 {
00068 return (Int32 *) (_storeP - sizeof(Int32) - sizeof(UInt32));
00069 }
00070
00071 inline
00072 Int32 *FieldContainerPtrBase::getRefCountP(void) const
00073 {
00074 return (Int32 *) (_storeP - sizeof(Int32) - sizeof(UInt32));
00075 }
00076
00077 inline
00078 UInt32 *FieldContainerPtrBase::getIdP(void)
00079 {
00080 return (UInt32 *) (_storeP - sizeof(UInt32));
00081 }
00082
00083 inline
00084 UInt32 *FieldContainerPtrBase::getIdP(void) const
00085 {
00086 return (UInt32 *) (_storeP - sizeof(UInt32));
00087 }
00088
00089 inline
00090 UInt8 *FieldContainerPtrBase::getElemP(UInt32 uiElemNum)
00091 {
00092 return (_storeP + (_containerSize * uiElemNum));
00093 }
00094
00095 inline
00096 UInt8 *FieldContainerPtrBase::getElemP(UInt32 uiElemNum) const
00097 {
00098 return (_storeP + (_containerSize * uiElemNum));
00099 }
00100
00101 inline
00102 UInt8 *FieldContainerPtrBase::getFirstElemP(void)
00103 {
00104 return _storeP;
00105 }
00106
00107 inline
00108 UInt8 *FieldContainerPtrBase::getFirstElemP(void) const
00109 {
00110 return _storeP;
00111 }
00112
00113
00114
00115
00116 inline
00117 Int32 FieldContainerPtrBase::getRefCountOff(void) const
00118 {
00119 return -Int32((sizeof(Int32) + sizeof(UInt32)));
00120 }
00121
00122 inline
00123 Int32 FieldContainerPtrBase::getIdOff(void) const
00124 {
00125 return -Int32(sizeof(UInt32));
00126 }
00127
00128 inline
00129 Int32 FieldContainerPtrBase::getFirstElemOff(void) const
00130 {
00131 return 0;
00132 }
00133
00134 inline
00135 Int32 FieldContainerPtrBase::getElemOff(UInt32 uiElemNum) const
00136 {
00137 return (_containerSize * uiElemNum);
00138 }
00139
00140
00141
00142
00143
00144 inline
00145 FieldContainerPtrBase::FieldContainerPtrBase(void) :
00146 _containerSize(0 ),
00147 _uiParentEPos(InvalidParentEPos),
00148 _storeP (NULL )
00149 {
00150 #ifdef OSG_DEBUG_FCPTR
00151 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00152 #endif
00153 }
00154
00155 inline
00156 FieldContainerPtrBase::FieldContainerPtrBase(
00157 const NullFieldContainerPtr &) :
00158
00159 _containerSize(0 ),
00160 _uiParentEPos (InvalidParentEPos),
00161 _storeP (NULL )
00162 {
00163 #ifdef OSG_DEBUG_FCPTR
00164 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00165 #endif
00166 }
00167
00168 inline
00169 FieldContainerPtrBase::FieldContainerPtrBase(
00170 const FieldContainerPtrBase &source) :
00171
00172 _containerSize(source._containerSize),
00173 _uiParentEPos (source._uiParentEPos ),
00174 _storeP (source._storeP )
00175 {
00176 #ifdef OSG_DEBUG_FCPTR
00177 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00178 #endif
00179 }
00180
00181
00182
00183
00184 inline
00185 FieldContainerPtrBase::~FieldContainerPtrBase(void)
00186 {
00187 #ifdef OSG_DEBUG
00188 _storeP = NULL;
00189 _containerSize = 65535;
00190 _uiParentEPos = 65535;
00191 #ifdef OSG_DEBUG_FCPTR
00192 _typedStoreP = NULL;
00193 #endif
00194 #endif
00195 }
00196
00197
00198
00199
00200 inline
00201 void FieldContainerPtrBase::setParentFieldPos(UInt16 uiParentEPos)
00202 {
00203 _uiParentEPos = uiParentEPos;
00204 }
00205
00206 inline
00207 UInt16 FieldContainerPtrBase::getParentFieldPos(void) const
00208 {
00209 return _uiParentEPos;
00210 }
00211
00212
00213
00214
00215 inline
00216 Int32 FieldContainerPtrBase::getRefCount(void) const
00217 {
00218 if(_storeP == NULL)
00219 return 0;
00220
00221 return (*getRefCountP());
00222 }
00223
00224 inline
00225 UInt32 FieldContainerPtrBase::getFieldContainerId(void) const
00226 {
00227 return (*getIdP());
00228 }
00229
00230 inline
00231 UInt16 FieldContainerPtrBase::getContainerSize(void) const
00232 {
00233 return _containerSize;
00234 }
00235
00236 inline
00237 FieldContainer *FieldContainerPtrBase::getBaseCPtr(void) const
00238 {
00239 return reinterpret_cast<FieldContainer *>(getFirstElemP());
00240 }
00241
00242 inline
00243 FieldContainer *FieldContainerPtrBase::getAspectCPtr(UInt32 uiAspectId) const
00244 {
00245 return reinterpret_cast<FieldContainer *>(getElemP(uiAspectId));
00246 }
00247
00248
00249
00250 inline
00251 void FieldContainerPtrBase::operator =(const NullFieldContainerPtr &)
00252 {
00253 _containerSize = 0;
00254 _uiParentEPos = InvalidParentEPos;
00255 _storeP = NULL;
00256
00257 #ifdef OSG_DEBUG_FCPTR
00258 _typedStoreP = NULL;
00259 #endif
00260 }
00261
00262 inline
00263 void FieldContainerPtrBase::operator =(const FieldContainerPtrBase &source)
00264 {
00265 if (this == &source)
00266 return;
00267
00268 _containerSize = source._containerSize;
00269 _uiParentEPos = source._uiParentEPos;
00270 _storeP = source._storeP;
00271
00272 #ifdef OSG_DEBUG_FCPTR
00273 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00274 #endif
00275 }
00276
00277
00278
00279
00280 inline
00281 bool FieldContainerPtrBase::operator < (
00282 const NullFieldContainerPtr &) const
00283 {
00284 return false;
00285 }
00286
00287 inline
00288 bool FieldContainerPtrBase::operator ==(
00289 const NullFieldContainerPtr &) const
00290 {
00291 return _storeP == NULL;
00292 }
00293
00294 inline
00295 bool FieldContainerPtrBase::operator !=(
00296 const NullFieldContainerPtr &) const
00297 {
00298 return _storeP != NULL;
00299 }
00300
00301
00302 inline
00303 bool FieldContainerPtrBase::operator < (
00304 const FieldContainerPtrBase &other)const
00305 {
00306 return _storeP < other._storeP;
00307 }
00308
00309 inline
00310 bool FieldContainerPtrBase::operator ==(
00311 const FieldContainerPtrBase &other) const
00312 {
00313 return _storeP == other._storeP;
00314 }
00315
00316 inline
00317 bool FieldContainerPtrBase::operator !=(
00318 const FieldContainerPtrBase &other) const
00319 {
00320 return ! (*this == other);
00321 }
00322
00323 inline
00324 bool FieldContainerPtrBase::operator ! (void) const
00325 {
00326 return _storeP == NULL;
00327 }
00328
00329 inline
00330 FieldContainerPtrBase::operator FieldContainerPtrBase::unspecified_bool_type() const
00331 {
00332 return !*this ? 0 : &FieldContainerPtrBase::_storeP;
00333 }
00334
00335
00336
00337
00338 inline
00339 FieldContainerPtrBase::FieldContainerPtrBase(const FieldContainer *source,
00340 const UInt16 uiSize,
00341 const UInt16 uiParentEPos)
00342 {
00343 _uiParentEPos = uiParentEPos;
00344 _containerSize = uiSize;
00345
00346 if(source != NULL)
00347 {
00348 _storeP = (UInt8 *) (const_cast<FieldContainer *>(source));
00349 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00350 _storeP -= getElemOff(Thread::getAspect());
00351 #endif
00352 }
00353 else
00354 {
00355 _storeP = NULL;
00356 }
00357
00358 #ifdef OSG_DEBUG_FCPTR
00359 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00360 #endif
00361 }
00362
00363
00364
00365
00366
00367
00368
00369
00370 inline
00371 FieldContainerPtrBase::FieldContainerPtrBase(const FieldContainer &source)
00372 {
00373 _containerSize = source.getContainerSize();
00374 _uiParentEPos = InvalidParentEPos;
00375 _storeP = (UInt8 *) (const_cast<FieldContainer *>(&source));
00376 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00377 _storeP -= getElemOff(Thread::getAspect());
00378 #endif
00379
00380 #ifdef OSG_DEBUG_FCPTR
00381 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00382 #endif
00383 }
00384
00385 inline
00386 FieldContainerPtrBase::FieldContainerPtrBase(const FieldContainer *source)
00387 {
00388 _uiParentEPos = InvalidParentEPos;
00389
00390 if(source != NULL)
00391 {
00392 _containerSize = source->getContainerSize();
00393 _storeP = (UInt8 *) (const_cast<FieldContainer *>(source));
00394 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00395 _storeP -= getElemOff(Thread::getAspect());
00396 #endif
00397 }
00398 else
00399 {
00400 _containerSize = 0;
00401 _storeP = NULL;
00402 }
00403
00404 #ifdef OSG_DEBUG_FCPTR
00405 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00406 #endif
00407 }
00408
00409
00410
00411
00412 inline
00413 void FieldContainerPtrBase::addRef(void) const
00414 {
00415 _pRefCountLock->aquire(_storeP);
00416
00417 (*getRefCountP())++;
00418
00419 _pRefCountLock->release(_storeP);
00420
00421 Thread::getCurrentChangeList()->addAddRefd(
00422 *(static_cast<const FieldContainerPtr *>(this)));
00423 }
00424
00425 inline
00426 void FieldContainerPtrBase::setNull(void)
00427 {
00428 _containerSize = 0;
00429 _uiParentEPos = InvalidParentEPos;
00430 _storeP = NULL;
00431
00432 #ifdef OSG_DEBUG_FCPTR
00433 _typedStoreP = reinterpret_cast<FieldContainer *>(getFirstElemP());
00434 #endif
00435 }
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446 inline
00447 FieldContainerPtr::FieldContainerPtr(void) :
00448 Inherited()
00449 {
00450 }
00451
00452 inline
00453 FieldContainerPtr::FieldContainerPtr(const NullFieldContainerPtr &) :
00454 Inherited()
00455 {
00456 }
00457
00458 inline
00459 FieldContainerPtr::FieldContainerPtr(const FieldContainerPtr &source) :
00460 Inherited(source)
00461 {
00462 }
00463
00464
00465
00466
00467 inline
00468 FieldContainerPtr::~FieldContainerPtr(void)
00469 {
00470 }
00471
00472
00473
00474
00475 inline
00476 FieldContainer *FieldContainerPtr::operator->(void)
00477 {
00478 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00479 return (FieldContainer *) (getElemP(Thread::getAspect()));
00480 #else
00481 return (FieldContainer *) (getFirstElemP());
00482 #endif
00483 }
00484
00485 inline
00486 FieldContainer *FieldContainerPtr::operator->(void) const
00487 {
00488 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00489 return (FieldContainer *) (getElemP(Thread::getAspect()));
00490 #else
00491 return (FieldContainer *) (getFirstElemP());
00492 #endif
00493 }
00494
00495 inline
00496 FieldContainer &FieldContainerPtr::operator *(void)
00497 {
00498 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00499 return *((FieldContainer *) (getElemP(Thread::getAspect())));
00500 #else
00501 return *((FieldContainer *) (getFirstElemP()));
00502 #endif
00503 }
00504
00505 inline
00506 FieldContainer &FieldContainerPtr::operator *(void) const
00507 {
00508 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00509 return *((FieldContainer *) (getElemP(Thread::getAspect())));
00510 #else
00511 return *((FieldContainer *) (getFirstElemP()));
00512 #endif
00513 }
00514
00515 inline
00516 FieldContainer *FieldContainerPtr::getCPtr(void)
00517 {
00518 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00519 return (FieldContainer *) (getElemP(Thread::getAspect()));
00520 #else
00521 return (FieldContainer *) (getFirstElemP());
00522 #endif
00523 }
00524
00525 inline
00526 FieldContainer *FieldContainerPtr::getCPtr(void) const
00527 {
00528 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00529 return (FieldContainer *) (getElemP(Thread::getAspect()));
00530 #else
00531 return (FieldContainer *) (getFirstElemP());
00532 #endif
00533 }
00534
00535
00536
00537
00538 inline
00539 void FieldContainerPtr::operator =(const NullFieldContainerPtr &)
00540 {
00541 setNull();
00542 }
00543
00544 inline
00545 void FieldContainerPtr::operator =(const FieldContainerPtr &source)
00546 {
00547 *(static_cast<Inherited *>(this)) = source;
00548 }
00549
00550
00551
00552
00553 inline
00554 void FieldContainerPtr::beginEdit(BitVector whichField,
00555 UInt32 OSG_CHECK_ARG(origin)) const
00556 {
00557 #ifdef OSG_FIXED_MFIELDSYNC
00558 (*this)->execBeginEdit(whichField,
00559 Thread::getAspect(),
00560 getContainerSize());
00561 #endif
00562 }
00563
00564 inline
00565 void FieldContainerPtr::endEditNotChanged(BitVector whichField,
00566 UInt32 ) const
00567 {
00568 Thread::getCurrentChangeList()->addChanged(*this, whichField);
00569 }
00570
00571 inline
00572 void FieldContainerPtr::changed(BitVector whichField, UInt32 origin) const
00573 {
00574 (*this)->changed(whichField, origin);
00575 }
00576
00577 inline
00578 void FieldContainerPtr::endEdit(BitVector whichField, UInt32 origin) const
00579 {
00580 endEditNotChanged(whichField, origin);
00581 changed(whichField, origin);
00582 }
00583
00584
00585
00586
00587
00588 inline
00589 FieldContainerPtr::FieldContainerPtr(const FieldContainer &source) :
00590 Inherited(source)
00591 {
00592 }
00593
00594 inline
00595 FieldContainerPtr::FieldContainerPtr(const FieldContainer *source) :
00596 Inherited(source)
00597 {
00598 }
00599
00600 inline
00601 FieldContainerPtr::FieldContainerPtr(const FieldContainer *source,
00602 const UInt16 uiSize,
00603 const UInt16 uiParentEPos) :
00604 Inherited(source, uiSize, uiParentEPos)
00605 {
00606 }
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617 inline
00618 ConstFieldContainerPtr::ConstFieldContainerPtr(void) :
00619 Inherited()
00620 {
00621 }
00622
00623 inline
00624 ConstFieldContainerPtr::ConstFieldContainerPtr(
00625 const NullFieldContainerPtr &) :
00626 Inherited()
00627 {
00628 }
00629
00630 inline
00631 ConstFieldContainerPtr::ConstFieldContainerPtr(
00632 const FieldContainerPtr &source) :
00633 Inherited(source)
00634 {
00635 }
00636
00637 inline
00638 ConstFieldContainerPtr::ConstFieldContainerPtr(
00639 const ConstFieldContainerPtr &source):
00640 Inherited(source)
00641 {
00642 }
00643
00644
00645
00646
00647 inline
00648 ConstFieldContainerPtr::~ConstFieldContainerPtr(void)
00649 {
00650 }
00651
00652
00653
00654
00655 inline
00656 const FieldContainer *ConstFieldContainerPtr::operator->(void)
00657 {
00658 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00659 return (const FieldContainer *) (getElemP(Thread::getAspect()));
00660 #else
00661 return (const FieldContainer *) (getFirstElemP());
00662 #endif
00663 }
00664
00665 inline
00666 const FieldContainer *ConstFieldContainerPtr::operator->(void) const
00667 {
00668 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00669 return (const FieldContainer *) (getElemP(Thread::getAspect()));
00670 #else
00671 return (const FieldContainer *) (getFirstElemP());
00672 #endif
00673 }
00674
00675 inline
00676 const FieldContainer &ConstFieldContainerPtr::operator *(void)
00677 {
00678 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00679 return *((const FieldContainer *) (getElemP(Thread::getAspect())));
00680 #else
00681 return *((const FieldContainer *) (getFirstElemP()));
00682 #endif
00683 }
00684
00685 inline
00686 const FieldContainer &ConstFieldContainerPtr::operator *(void) const
00687 {
00688 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00689 return *((const FieldContainer *) (getElemP(Thread::getAspect())));
00690 #else
00691 return *((const FieldContainer *) (getFirstElemP()));
00692 #endif
00693 }
00694
00695 inline
00696 const FieldContainer *ConstFieldContainerPtr::getCPtr(void)
00697 {
00698 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00699 return (const FieldContainer *) (getElemP(Thread::getAspect()));
00700 #else
00701 return (const FieldContainer *) (getFirstElemP());
00702 #endif
00703 }
00704
00705 inline
00706 const FieldContainer *ConstFieldContainerPtr::getCPtr(void) const
00707 {
00708 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00709 return (const FieldContainer *) (getElemP(Thread::getAspect()));
00710 #else
00711 return (const FieldContainer *) (getFirstElemP());
00712 #endif
00713 }
00714
00715
00716
00717
00718 inline
00719 void ConstFieldContainerPtr::operator =(const NullFieldContainerPtr &)
00720 {
00721 setNull();
00722 }
00723
00724 inline
00725 void ConstFieldContainerPtr::operator =(const FieldContainerPtr &source)
00726 {
00727 *(static_cast<Inherited *>(this)) = source;
00728 }
00729
00730 inline
00731 void ConstFieldContainerPtr::operator =(const ConstFieldContainerPtr &source)
00732 {
00733 *(static_cast<Inherited *>(this)) = source;
00734 }
00735
00736
00737
00738
00739 inline
00740 ConstFieldContainerPtr::ConstFieldContainerPtr(const FieldContainer &source) :
00741 Inherited(source)
00742 {
00743 }
00744
00745 inline
00746 ConstFieldContainerPtr::ConstFieldContainerPtr(const FieldContainer *source) :
00747 Inherited(source)
00748 {
00749 }
00750
00751 inline
00752 ConstFieldContainerPtr::ConstFieldContainerPtr(
00753 const FieldContainer *source,
00754 const UInt16 uiSize,
00755 const UInt16 uiParentEPos) :
00756
00757 Inherited(source, uiSize, uiParentEPos)
00758 {
00759 }
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769 inline
00770 NullFieldContainerPtr::NullFieldContainerPtr(void) :
00771 Inherited()
00772 {
00773 }
00774
00775
00776
00777
00778 inline
00779 NullFieldContainerPtr::~NullFieldContainerPtr(void)
00780 {
00781 }
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00793 FCPtr<BasePtrTypeT, FieldContainerTypeT>::FCPtr(void) :
00794 Inherited()
00795 {
00796 }
00797
00798 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00799 FCPtr<BasePtrTypeT, FieldContainerTypeT>::FCPtr(const FCPtr &source):
00800 Inherited(source)
00801 {
00802 }
00803
00804 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00805 FCPtr<BasePtrTypeT,
00806 FieldContainerTypeT>::FCPtr(const NullFieldContainerPtr &) :
00807
00808 Inherited()
00809 {
00810 }
00811
00812
00813
00814
00815 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00816 FCPtr<BasePtrTypeT, FieldContainerTypeT>::~FCPtr(void)
00817 {
00818 }
00819
00820
00821
00822
00823 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00824 FieldContainerTypeT *FCPtr<BasePtrTypeT,
00825 FieldContainerTypeT>::operator ->(void)
00826 {
00827 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00828 return (FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
00829 #else
00830 return (FieldContainerTypeT *) Self::getFirstElemP();
00831 #endif
00832 }
00833
00834 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00835 FieldContainerTypeT *FCPtr<BasePtrTypeT,
00836 FieldContainerTypeT>::operator ->(void) const
00837 {
00838 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00839 return (FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
00840 #else
00841 return (FieldContainerTypeT *) Self::getFirstElemP();
00842 #endif
00843 }
00844
00845 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00846 FieldContainerTypeT &FCPtr<BasePtrTypeT,
00847 FieldContainerTypeT>::operator *(void)
00848 {
00849 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00850 return *((FieldContainerTypeT *) Self::getElemP(Thread::getAspect()));
00851 #else
00852 return *((FieldContainerTypeT *) Self::getFirstElemP());
00853 #endif
00854 }
00855
00856 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00857 FieldContainerTypeT &FCPtr<BasePtrTypeT,
00858 FieldContainerTypeT>::operator *(void) const
00859 {
00860 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00861 return *((FieldContainerTypeT *) Self::getElemP(Thread::getAspect()));
00862 #else
00863 return *((FieldContainerTypeT *) Self::getFirstElemP());
00864 #endif
00865 }
00866
00867
00868 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00869 FieldContainerTypeT *FCPtr<BasePtrTypeT, FieldContainerTypeT>::getCPtr(void)
00870
00871 {
00872 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00873 return (FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
00874 #else
00875 return (FieldContainerTypeT *) Self::getFirstElemP();
00876 #endif
00877 }
00878
00879 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00880 FieldContainerTypeT *
00881 FCPtr<BasePtrTypeT, FieldContainerTypeT>::getCPtr(void) const
00882 {
00883 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00884 return (FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
00885 #else
00886 return (FieldContainerTypeT *) Self::getFirstElemP();
00887 #endif
00888 }
00889
00890
00891
00892
00893 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00894 void FCPtr<BasePtrTypeT,
00895 FieldContainerTypeT>::operator = (const FCPtr &source)
00896 {
00897
00898 *(static_cast<Inherited *>(this)) = source;
00899 }
00900
00901 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00902 void FCPtr<BasePtrTypeT, FieldContainerTypeT>::operator = (
00903 const NullFieldContainerPtr &)
00904 {
00905 Self::setNull();
00906 }
00907
00908
00909
00910
00911 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00912 FCPtr<BasePtrTypeT,
00913 FieldContainerTypeT>::FCPtr(const FieldContainerTypeT &source) :
00914
00915 Inherited(source)
00916 {
00917 }
00918
00919 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00920 FCPtr<BasePtrTypeT,
00921 FieldContainerTypeT>::FCPtr(const FieldContainerTypeT *source) :
00922
00923 Inherited(source)
00924 {
00925 }
00926
00927 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00928 FCPtr<BasePtrTypeT,
00929 FieldContainerTypeT>::FCPtr(const FieldContainerTypeT *source,
00930 const UInt16 uiSize,
00931 const UInt16 uiParentEPos) :
00932
00933 Inherited(source, uiSize, uiParentEPos)
00934 {
00935 }
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00948 ConstFCPtr<BasePtrTypeT, FieldContainerTypeT>::ConstFCPtr(void) :
00949 Inherited()
00950 {
00951 }
00952
00953 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00954 ConstFCPtr<BasePtrTypeT,
00955 FieldContainerTypeT>::ConstFCPtr(
00956 const NullFieldContainerPtr &) :
00957
00958 Inherited()
00959 {
00960 }
00961
00962 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00963 ConstFCPtr<BasePtrTypeT,
00964 FieldContainerTypeT>::ConstFCPtr(const NCFCPtr &source) :
00965
00966 Inherited(source)
00967 {
00968 }
00969
00970 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00971 ConstFCPtr<BasePtrTypeT,
00972 FieldContainerTypeT>::ConstFCPtr(const ConstFCPtr &source) :
00973
00974 Inherited(source)
00975 {
00976 }
00977
00978
00979
00980
00981 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00982 ConstFCPtr<BasePtrTypeT, FieldContainerTypeT>::~ConstFCPtr(void)
00983 {
00984 }
00985
00986
00987
00988
00989 template <class BasePtrTypeT, class FieldContainerTypeT> inline
00990 const FieldContainerTypeT *ConstFCPtr<BasePtrTypeT,
00991 FieldContainerTypeT>::operator ->(void)
00992 {
00993 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
00994 return (const FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
00995 #else
00996 return (const FieldContainerTypeT *) Self::getFirstElemP();
00997 #endif
00998 }
00999
01000 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01001 const FieldContainerTypeT *ConstFCPtr<BasePtrTypeT,
01002 FieldContainerTypeT>::operator ->(
01003 void) const
01004 {
01005 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
01006 return (const FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
01007 #else
01008 return (const FieldContainerTypeT *) Self::getFirstElemP();
01009 #endif
01010 }
01011
01012 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01013 const FieldContainerTypeT &ConstFCPtr<BasePtrTypeT,
01014 FieldContainerTypeT>::operator *(void)
01015 {
01016 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
01017 return *((const FieldContainerTypeT *) Self::getElemP(Thread::getAspect()));
01018 #else
01019 return *((const FieldContainerTypeT *) Self::getFirstElemP());
01020 #endif
01021 }
01022
01023 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01024 const FieldContainerTypeT &ConstFCPtr<BasePtrTypeT,
01025 FieldContainerTypeT>::operator *(
01026 void) const
01027 {
01028 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
01029 return *((const FieldContainerTypeT *) Self::getElemP(Thread::getAspect()));
01030 #else
01031 return *((const FieldContainerTypeT *) Self::getFirstElemP());
01032 #endif
01033 }
01034
01035
01036 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01037 const FieldContainerTypeT *ConstFCPtr<BasePtrTypeT,
01038 FieldContainerTypeT>::getCPtr(void)
01039
01040 {
01041 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
01042 return (const FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
01043 #else
01044 return (const FieldContainerTypeT *) Self::getFirstElemP();
01045 #endif
01046 }
01047
01048 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01049 const FieldContainerTypeT *
01050 ConstFCPtr<BasePtrTypeT, FieldContainerTypeT>::getCPtr(void) const
01051 {
01052 #if !defined(OSG_DEBUG_NO_FCPTR_ARITHM)
01053 return (const FieldContainerTypeT *) Self::getElemP(Thread::getAspect());
01054 #else
01055 return (const FieldContainerTypeT *) Self::getFirstElemP();
01056 #endif
01057 }
01058
01059
01060
01061
01062 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01063 void ConstFCPtr<BasePtrTypeT,
01064 FieldContainerTypeT>::operator = (const NCFCPtr &source)
01065 {
01066
01067 *(static_cast<Inherited *>(this)) = source;
01068 }
01069
01070 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01071 void ConstFCPtr<BasePtrTypeT,
01072 FieldContainerTypeT>::operator = (const ConstFCPtr &source)
01073 {
01074
01075 *(static_cast<Inherited *>(this)) = source;
01076 }
01077
01078 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01079 void ConstFCPtr<BasePtrTypeT, FieldContainerTypeT>::operator = (
01080 const NullFieldContainerPtr &)
01081 {
01082 Self::setNull();
01083 }
01084
01085
01086
01087
01088 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01089 ConstFCPtr<BasePtrTypeT,
01090 FieldContainerTypeT>::ConstFCPtr(const FieldContainerTypeT &source):
01091
01092 Inherited(source)
01093 {
01094 }
01095
01096 template <class BasePtrTypeT, class FieldContainerTypeT> inline
01097 ConstFCPtr<BasePtrTypeT,
01098 FieldContainerTypeT>::ConstFCPtr(