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

Pointer that overloads operator -> More...

#include <smartptr.h>

Inheritance diagram for member_ptr< T >:
[legend]
Collaboration diagram for member_ptr< T >:
[legend]

Public Member Functions

 member_ptr (T *p=NULL)
 
 ~member_ptr ()
 
const Toperator* () const
 
Toperator* ()
 
const Toperator-> () const
 
Toperator-> ()
 
const Tget () const
 
Tget ()
 
Trelease ()
 
void reset (T *p=0)
 

Protected Member Functions

 member_ptr (const member_ptr< T > &rhs)
 
void operator= (const member_ptr< T > &rhs)
 

Protected Attributes

Tm_p
 

Detailed Description

template<class T>
class member_ptr< T >

Pointer that overloads operator ->

Template Parameters
Tclass or type

member_ptr is used frequently in the library to avoid the issues related to std::auto_ptr in C++11 (deprecated) and std::unique_ptr in C++03 (non-existent).

Bug:
Issue 48: "Use of auto_ptr causes dirty compile under C++11"

Definition at line 39 of file smartptr.h.

Constructor & Destructor Documentation

template<class T>
member_ptr< T >::member_ptr ( T p = NULL)
inlineexplicit

Definition at line 42 of file smartptr.h.

Here is the caller graph for this function:

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

Definition at line 71 of file smartptr.h.

Here is the caller graph for this function:

template<class T>
member_ptr< T >::member_ptr ( const member_ptr< T > &  rhs)
protected

Member Function Documentation

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

Definition at line 52 of file smartptr.h.

Here is the caller graph for this function:

template<class T>
T* member_ptr< T >::get ( )
inline

Definition at line 53 of file smartptr.h.

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

Definition at line 46 of file smartptr.h.

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

Definition at line 47 of file smartptr.h.

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

Definition at line 49 of file smartptr.h.

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

Definition at line 50 of file smartptr.h.

template<class T>
void member_ptr< T >::operator= ( const member_ptr< T > &  rhs)
protected

Here is the caller graph for this function:

template<class T>
T* member_ptr< T >::release ( )
inline

Definition at line 55 of file smartptr.h.

Here is the caller graph for this function:

template<class T>
void member_ptr< T >::reset ( T p = 0)

Definition at line 72 of file smartptr.h.

Here is the caller graph for this function:

Member Data Documentation

template<class T>
T* member_ptr< T >::m_p
protected

Definition at line 68 of file smartptr.h.


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