#include <MboRefCntPtr.h>
Public Types | |
typedef RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > | BaseRefCntPtr |
Public Member Functions | |
operator unspecified_bool_type () const | |
const RepType * | __getRep () const |
RefCntConstPtr () | |
RefCntConstPtr (const _Ty *p) | |
RefCntConstPtr (const BaseRefCntPtr &oth) | |
RefCntConstPtr (const RefCntConstPtr &oth) | |
RefCntConstPtr & | operator= (const _Ty *p) |
RefCntConstPtr & | operator= (const BaseRefCntPtr &oth) |
const _Ty & | operator * () const |
const _Ty * | operator-> () const |
The class RefCntConstPtr<_Ty> describes an object that stores a const pointer to an allocated instance of type _Ty, and keeps that object's reference count. Basically this is the const version of RefCntPtr. The type is compatible with it's non const counterpart and the counterpart has a shortcut named ConstPtr for thist const version.
For this type const means that instances of this type do not allow to modify the inner pointer, however it can free the inner pointer.
Definition at line 629 of file MboRefCntPtr.h.
typedef RefCntPtr<_Ty, _THREAD_MODEL, _THREAD_MODEL_PTR> mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::BaseRefCntPtr |
Definition at line 633 of file MboRefCntPtr.h.
mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntConstPtr | ( | ) | [inline] |
Default constructor
The default constructor initializes the inner poitnter to 0.
Definition at line 685 of file MboRefCntPtr.h.
00689 : BaseRefCntPtr()
mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntConstPtr | ( | const _Ty * | p | ) | [inline] |
Default constructor
The default constructor takes a pointer of the member pointer type.
p | target pointer to be stored in the RefCntPtr. |
Definition at line 697 of file MboRefCntPtr.h.
00701 : BaseRefCntPtr()
mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntConstPtr | ( | const BaseRefCntPtr & | oth | ) | [inline] |
Copy constructor that takes a reference
oth | RefCntPtr to copy from |
Definition at line 707 of file MboRefCntPtr.h.
00711 : BaseRefCntPtr(/*oth*/)
mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::RefCntConstPtr | ( | const RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR > & | oth | ) | [inline] |
Copy constructor that takes a reference
oth | RefCntPtr to copy from |
Definition at line 717 of file MboRefCntPtr.h.
00721 : BaseRefCntPtr(/*oth*/)
mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator unspecified_bool_type | ( | ) | const [inline] |
Check if assigned/set
Reimplemented from mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >.
Definition at line 667 of file MboRefCntPtr.h.
References mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::mx, mbo::RefCntRep< _Ty, _THREAD_MODEL >::pData, and mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::pRep.
const RepType* mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::__getRep | ( | ) | const [inline] |
Reimplemented from mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >.
Definition at line 676 of file MboRefCntPtr.h.
References mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::pRep.
RefCntConstPtr& mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator= | ( | const _Ty * | p | ) | [inline] |
Assignment operator
p | new target pointer |
Definition at line 728 of file MboRefCntPtr.h.
00732 { 00733 FastLock lock(&mx); 00734 00735 if (!pRep || pRep->pData != p) 00736 { 00737 __release(); 00738 pRep = p ? RepType::Alloc(const_cast<_Ty*>(p)) : 0;
RefCntConstPtr& mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator= | ( | const BaseRefCntPtr & | oth | ) | [inline] |
Assignment operator
oth | RefCntPtr to copy from |
Definition at line 745 of file MboRefCntPtr.h.
00749 { 00750 FastLock lock(&mx); 00751 00752 if (pRep != oth.__getRep()) 00753 { 00754 __release(); 00755 pRep = const_cast<BaseRefCntPtr&>(oth).__getRep(); 00756 if (pRep) 00757 { 00758 pRep->AddRef(); 00759 }
const _Ty& mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator * | ( | ) | const [inline] |
Dereference operator (const)
Reimplemented from mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >.
Definition at line 768 of file MboRefCntPtr.h.
const _Ty* mbo::RefCntConstPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >::operator-> | ( | ) | const [inline] |
Dereference operator (const)
Reimplemented from mbo::RefCntPtr< _Ty, _THREAD_MODEL, _THREAD_MODEL_PTR >.
Definition at line 779 of file MboRefCntPtr.h.
Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:12 2008 for MBO-lib by ![]() |