Murl::SharedPointerPrivate::WeakCounter Class Reference

The weak pointer counter class. More...

#include "murl_shared_pointer_private.h"

Public Member Functions

 WeakCounter ()
 The default constructor.
 
 WeakCounter (const WeakCounter &counter)
 Copy constructor adding a weak counter reference. More...
 
 WeakCounter (const SharedCounter &counter)
 Copy constructor with a shared pointer counter adding a weak pointer reference. More...
 
 ~WeakCounter ()
 Destructor releasing a weak counter reference.
 
WeakCounteroperator= (const SharedCounter &counter)
 Assignment operator with a shared pointer counter releasing the old weak pointer reference and adding a weak pointer reference to the new counter. More...
 
WeakCounteroperator= (const WeakCounter &counter)
 Assignment operator releasing the old weak pointer reference and adding a weak pointer reference to the new counter. More...
 
UInt32 GetCount () const
 Get current usage count. More...
 
void Swap (WeakCounter &counter)
 Swap with anoter shared counter. More...
 
bool operator< (const WeakCounter &rhs) const
 Less than operator. More...
 

Detailed Description

The weak pointer counter class.

Constructor & Destructor Documentation

◆ WeakCounter() [1/2]

Murl::SharedPointerPrivate::WeakCounter::WeakCounter ( const WeakCounter counter)
inlineexplicit

Copy constructor adding a weak counter reference.

Parameters
counterThe weak counter to copy.

References Murl::SharedPointerPrivate::CounterBase::AddWeakReference().

◆ WeakCounter() [2/2]

Murl::SharedPointerPrivate::WeakCounter::WeakCounter ( const SharedCounter counter)
inlineexplicit

Copy constructor with a shared pointer counter adding a weak pointer reference.

Parameters
counterThe shared counter to copy.

References Murl::SharedPointerPrivate::CounterBase::AddWeakReference().

Member Function Documentation

◆ operator=() [1/2]

WeakCounter& Murl::SharedPointerPrivate::WeakCounter::operator= ( const SharedCounter counter)
inline

Assignment operator with a shared pointer counter releasing the old weak pointer reference and adding a weak pointer reference to the new counter.

Parameters
counterThe shared counter to assign.
Returns
The object itself.

References Murl::SharedPointerPrivate::CounterBase::AddWeakReference(), and Murl::SharedPointerPrivate::CounterBase::ReleaseWeakReference().

◆ operator=() [2/2]

WeakCounter& Murl::SharedPointerPrivate::WeakCounter::operator= ( const WeakCounter counter)
inline

Assignment operator releasing the old weak pointer reference and adding a weak pointer reference to the new counter.

Parameters
counterThe weak counter to assign.
Returns
The object itself.

References Murl::SharedPointerPrivate::CounterBase::AddWeakReference(), and Murl::SharedPointerPrivate::CounterBase::ReleaseWeakReference().

◆ GetCount()

UInt32 Murl::SharedPointerPrivate::WeakCounter::GetCount ( ) const
inline

Get current usage count.

Returns
The number of shared pointer references.

References Murl::SharedPointerPrivate::CounterBase::GetCount().

Referenced by Murl::WeakPointer< DataType >::GetCount(), and Murl::WeakPointer< DataType >::IsExpired().

◆ Swap()

void Murl::SharedPointerPrivate::WeakCounter::Swap ( WeakCounter counter)
inline

Swap with anoter shared counter.

Parameters
counterThe weak counter to swap with.

Referenced by Murl::WeakPointer< DataType >::Swap().

◆ operator<()

bool Murl::SharedPointerPrivate::WeakCounter::operator< ( const WeakCounter rhs) const
inline

Less than operator.

Parameters
rhsThe right hand side WeakCounter to compare.
Returns
true if the left hand side (this) is less than the right hand side.

The documentation for this class was generated from the following file:
  • murl_shared_pointer_private.h


Copyright © 2011-2024 Spraylight GmbH.