TC::WeakPtrCount Class Reference
[Implementation Details]

Reference counter class for TCWeakPtr. More...

#include <TCSharedPtrImpl.h>

Collaboration diagram for TC::WeakPtrCount:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 WeakPtrCount ()
 WeakPtrCount (const WeakPtrCount &r)
 Copy constructor.
 WeakPtrCount (const SharedPtrCount &r)
 Construct a WeakPtrCount out of an SharedPtrCount.
 ~WeakPtrCount ()
 Destructor releases the internal weak counter.
WeakPtrCountoperator= (const SharedPtrCount &r)
 Assignment operator with an SharedPtrCount.
WeakPtrCountoperator= (const WeakPtrCount &r)
 Assignment operator with an other WeakPtrCount.
uint32 GetUseCount () const
 Get current use count.
void Swap (WeakPtrCount &a)
 Swapt two weak counters.

Private Attributes

Impl::SharedPtrCountBasem_count
 Pointer to the counting object.

Friends

class TC::SharedPtrCount
bool operator== (const WeakPtrCount &a, const WeakPtrCount &b)
 Compare two counters if equal.
bool operator< (const WeakPtrCount &a, const WeakPtrCount &b)
 Compare two counters if less.


Detailed Description

Reference counter class for TCWeakPtr.

Definition at line 256 of file TCSharedPtrImpl.h.


Constructor & Destructor Documentation

TC::WeakPtrCount::WeakPtrCount (  )  [inline]

Definition at line 259 of file TCSharedPtrImpl.h.

TC::WeakPtrCount::WeakPtrCount ( const WeakPtrCount r  )  [inline, explicit]

Copy constructor.

Definition at line 262 of file TCSharedPtrImpl.h.

References TC::Impl::SharedPtrCountBase::AddWeakReference(), and m_count.

Here is the call graph for this function:

TC::WeakPtrCount::WeakPtrCount ( const SharedPtrCount r  )  [inline, explicit]

Construct a WeakPtrCount out of an SharedPtrCount.

Definition at line 268 of file TCSharedPtrImpl.h.

References TC::Impl::SharedPtrCountBase::AddWeakReference(), and m_count.

Here is the call graph for this function:

TC::WeakPtrCount::~WeakPtrCount (  )  [inline]

Destructor releases the internal weak counter.

Definition at line 274 of file TCSharedPtrImpl.h.

References m_count, and TC::Impl::SharedPtrCountBase::ReleaseWeakReference().

Here is the call graph for this function:


Member Function Documentation

WeakPtrCount& TC::WeakPtrCount::operator= ( const SharedPtrCount r  )  [inline]

Assignment operator with an SharedPtrCount.

Definition at line 284 of file TCSharedPtrImpl.h.

References TC::Impl::SharedPtrCountBase::AddWeakReference(), m_count, TC::SharedPtrCount::m_count, and TC::Impl::SharedPtrCountBase::ReleaseWeakReference().

Here is the call graph for this function:

WeakPtrCount& TC::WeakPtrCount::operator= ( const WeakPtrCount r  )  [inline]

Assignment operator with an other WeakPtrCount.

Definition at line 294 of file TCSharedPtrImpl.h.

References TC::Impl::SharedPtrCountBase::AddWeakReference(), m_count, and TC::Impl::SharedPtrCountBase::ReleaseWeakReference().

Here is the call graph for this function:

uint32 TC::WeakPtrCount::GetUseCount (  )  const [inline]

Get current use count.

Definition at line 304 of file TCSharedPtrImpl.h.

References TC::Impl::SharedPtrCountBase::GetUseCount(), and m_count.

Referenced by TC::WeakPtr< T >::GetUseCount(), and TC::WeakPtr< T >::IsExpired().

Here is the call graph for this function:

Here is the caller graph for this function:

void TC::WeakPtrCount::Swap ( WeakPtrCount a  )  [inline]

Swapt two weak counters.

Definition at line 310 of file TCSharedPtrImpl.h.

References m_count.

Referenced by TC::WeakPtr< T >::Swap().

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class TC::SharedPtrCount [friend]

Definition at line 330 of file TCSharedPtrImpl.h.

bool operator== ( const WeakPtrCount a,
const WeakPtrCount b 
) [friend]

Compare two counters if equal.

Definition at line 316 of file TCSharedPtrImpl.h.

bool operator< ( const WeakPtrCount a,
const WeakPtrCount b 
) [friend]

Compare two counters if less.

Definition at line 322 of file TCSharedPtrImpl.h.


Member Data Documentation

Pointer to the counting object.

Definition at line 329 of file TCSharedPtrImpl.h.

Referenced by GetUseCount(), operator=(), Swap(), WeakPtrCount(), and ~WeakPtrCount().


The documentation for this class was generated from the following file:

Copyright (c) Thomas Goessler 2003 - 2008