Crypto++ 8.7
Free C++ class library of cryptographic schemes
Public Member Functions | List of all members
member_ptr< T > Class Template Reference

Pointer that overloads operator -> More...

#include <smartptr.h>

+ Inheritance diagram for member_ptr< T >:

Public Member Functions

 member_ptr (T *p=NULL)
 
const T & operator* () const
 
T & operator* ()
 
const T * operator-> () const
 
T * operator-> ()
 
const T * get () const
 
T * get ()
 
T * release ()
 
void reset (T *p=NULL)
 

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).

Definition at line 37 of file smartptr.h.

Constructor & Destructor Documentation

◆ member_ptr()

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

Definition at line 40 of file smartptr.h.

◆ ~member_ptr()

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

Definition at line 69 of file smartptr.h.

Member Function Documentation

◆ operator*() [1/2]

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

Definition at line 44 of file smartptr.h.

◆ operator*() [2/2]

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

Definition at line 45 of file smartptr.h.

◆ operator->() [1/2]

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

Definition at line 47 of file smartptr.h.

◆ operator->() [2/2]

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

Definition at line 48 of file smartptr.h.

◆ get() [1/2]

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

Definition at line 50 of file smartptr.h.

◆ get() [2/2]

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

Definition at line 51 of file smartptr.h.

◆ release()

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

Definition at line 53 of file smartptr.h.

◆ reset()

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

Definition at line 70 of file smartptr.h.


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