library of assembled shared sources |
http://lass.cocamware.com |
#include <smart_ptr_policies.h>
Public Types | |
typedef int | TCount |
Protected Member Functions | |
DefaultCounter () | |
template<typename TStorage > | |
void | init (TStorage &) |
template<typename TStorage > | |
void | dispose (TStorage &) |
template<typename TStorage > | |
void | increment (TStorage &) |
template<typename TStorage > | |
bool | decrement (TStorage &) |
template<typename TStorage > | |
TCount | count (TStorage &) const |
void | swap (DefaultCounter &other) |
Private Attributes | |
TCount * | count_ |
The default counter will use an self-owned integer as counter object. It will allocate this on the heap and share it between all smart pointers that own the same pointee (duh!). Of course it will be so nice to clean it up by itself too.
Definition at line 310 of file smart_ptr_policies.h.
typedef int lass::util::DefaultCounter::TCount |
Definition at line 314 of file smart_ptr_policies.h.
lass::util::DefaultCounter::DefaultCounter | ( | ) | [inline, protected] |
Definition at line 318 of file smart_ptr_policies.h.
void lass::util::DefaultCounter::init | ( | TStorage & | ) | [inline, protected] |
Definition at line 320 of file smart_ptr_policies.h.
References count_, lass::util::impl::initHeapCounter(), and LASS_ASSERT.
void lass::util::DefaultCounter::dispose | ( | TStorage & | ) | [inline, protected] |
Definition at line 326 of file smart_ptr_policies.h.
References count_, lass::util::impl::disposeHeapCounter(), and LASS_ASSERT.
void lass::util::DefaultCounter::increment | ( | TStorage & | ) | [inline, protected] |
Definition at line 332 of file smart_ptr_policies.h.
References lass::util::atomicCompareAndSwap(), count_, and LASS_ASSERT.
bool lass::util::DefaultCounter::decrement | ( | TStorage & | ) | [inline, protected] |
Definition at line 345 of file smart_ptr_policies.h.
References lass::util::atomicCompareAndSwap(), count_, and LASS_ASSERT.
TCount lass::util::DefaultCounter::count | ( | TStorage & | ) | const [inline, protected] |
void lass::util::DefaultCounter::swap | ( | DefaultCounter & | other | ) | [inline, protected] |
TCount* lass::util::DefaultCounter::count_ [private] |
Definition at line 369 of file smart_ptr_policies.h.
Referenced by count(), decrement(), dispose(), increment(), init(), and swap().
Generated on Mon Nov 10 14:22:17 2008 for Library of Assembled Shared Sources by 1.5.7.1 |