IRC_SERVER
By @hyunjunk (hyunjun2372@gmail.com)
Loading...
Searching...
No Matches
IRCCore::WeakPtr< T > Class Template Reference

Weak pointer custom implementation for C++98 standard. More...

#include <WeakPtr.hpp>

Public Member Functions

 WeakPtr ()
 
 WeakPtr (const SharedPtr< T > &sharedPtr)
 
 WeakPtr (const WeakPtr< T > &rhs)
 
 ~WeakPtr ()
 
WeakPtr< T > & operator= (const WeakPtr< T > &rhs)
 
WeakPtr< T > & operator= (const SharedPtr< T > &sharedPtr)
 
bool operator== (const WeakPtr< T > &rhs) const
 
bool operator!= (const WeakPtr< T > &rhs) const
 
SharedPtr< T > Lock () const
 
bool Expired () const
 
void Reset ()
 
size_t UseCount () const
 
void Swap (WeakPtr< T > &rhs)
 

Private Attributes

detail::ControlBlock< T > * mControlBlock
 

Detailed Description

template<typename T>
class IRCCore::WeakPtr< T >

Weak pointer custom implementation for C++98 standard.

Template Parameters
TType of the object to be managed by the weak pointer.
Warning
Not thread-safe
See also
SharedPtr

Constructor & Destructor Documentation

◆ WeakPtr() [1/3]

template<typename T >
IRCCore::WeakPtr< T >::WeakPtr ( )
inline

◆ WeakPtr() [2/3]

template<typename T >
IRCCore::WeakPtr< T >::WeakPtr ( const SharedPtr< T > & sharedPtr)
inline

◆ WeakPtr() [3/3]

template<typename T >
IRCCore::WeakPtr< T >::WeakPtr ( const WeakPtr< T > & rhs)
inline

◆ ~WeakPtr()

template<typename T >
IRCCore::WeakPtr< T >::~WeakPtr ( )
inline

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
WeakPtr< T > & IRCCore::WeakPtr< T >::operator= ( const WeakPtr< T > & rhs)
inline

◆ operator=() [2/2]

template<typename T >
WeakPtr< T > & IRCCore::WeakPtr< T >::operator= ( const SharedPtr< T > & sharedPtr)
inline

◆ operator==()

template<typename T >
bool IRCCore::WeakPtr< T >::operator== ( const WeakPtr< T > & rhs) const
inline

◆ operator!=()

template<typename T >
bool IRCCore::WeakPtr< T >::operator!= ( const WeakPtr< T > & rhs) const
inline

◆ Lock()

template<typename T >
SharedPtr< T > IRCCore::WeakPtr< T >::Lock ( ) const
inline

◆ Expired()

template<typename T >
bool IRCCore::WeakPtr< T >::Expired ( ) const
inline

◆ Reset()

template<typename T >
void IRCCore::WeakPtr< T >::Reset ( )
inline

◆ UseCount()

template<typename T >
size_t IRCCore::WeakPtr< T >::UseCount ( ) const
inline

◆ Swap()

template<typename T >
void IRCCore::WeakPtr< T >::Swap ( WeakPtr< T > & rhs)
inline

Member Data Documentation

◆ mControlBlock

template<typename T >
detail::ControlBlock<T>* IRCCore::WeakPtr< T >::mControlBlock
private

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