Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
counted_ptr< T > Class Template Reference

Reference counted pointer. More...

#include <smartptr.h>

Public Member Functions

 counted_ptr (T *p=0)
 
 counted_ptr (const T &r)
 
 counted_ptr (const counted_ptr< T > &rhs)
 
 ~counted_ptr ()
 
const Toperator* () const
 
Toperator* ()
 
const Toperator-> () const
 
Toperator-> ()
 
const Tget () const
 
Tget ()
 
void attach (const T &p)
 
counted_ptr< T > & operator= (const counted_ptr< T > &rhs)
 

Private Attributes

Tm_p
 

Detailed Description

template<class T>
class counted_ptr< T >

Reference counted pointer.

Template Parameters
Tclass or type

users should declare m_referenceCount as std::atomic<unsigned> (or similar) under C++ 11

Definition at line 134 of file smartptr.h.

Constructor & Destructor Documentation

template<class T >
counted_ptr< T >::counted_ptr ( T p = 0)
explicit

Definition at line 160 of file smartptr.h.

template<class T>
counted_ptr< T >::counted_ptr ( const T r)
inline

Definition at line 138 of file smartptr.h.

template<class T >
counted_ptr< T >::counted_ptr ( const counted_ptr< T > &  rhs)

Definition at line 167 of file smartptr.h.

template<class T >
counted_ptr< T >::~counted_ptr ( )

Definition at line 174 of file smartptr.h.

Member Function Documentation

template<class T >
void counted_ptr< T >::attach ( const T p)

Definition at line 180 of file smartptr.h.

template<class T>
const T* counted_ptr< T >::get ( ) const
inline

Definition at line 149 of file smartptr.h.

Here is the call graph for this function:

template<class T >
T * counted_ptr< T >::get ( )

Definition at line 196 of file smartptr.h.

template<class T>
const T& counted_ptr< T >::operator* ( ) const
inline

Definition at line 143 of file smartptr.h.

template<class T>
T& counted_ptr< T >::operator* ( )
inline

Definition at line 144 of file smartptr.h.

template<class T>
const T* counted_ptr< T >::operator-> ( ) const
inline

Definition at line 146 of file smartptr.h.

template<class T>
T* counted_ptr< T >::operator-> ( )
inline

Definition at line 147 of file smartptr.h.

template<class T >
counted_ptr< T > & counted_ptr< T >::operator= ( const counted_ptr< T > &  rhs)

Definition at line 208 of file smartptr.h.

Here is the caller graph for this function:

Member Data Documentation

template<class T>
T* counted_ptr< T >::m_p
private

Definition at line 157 of file smartptr.h.


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