Security Scol plugin
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 >:
clonable_ptr< GF2NP > clonable_ptr< ModularArithmetic > value_ptr< BlockCipherFinal > value_ptr< ECP > value_ptr< MontgomeryRepresentation > ASNOptional< T > clonable_ptr< T > value_ptr< T >

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

T * m_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 37 of file smartptr.h.

Constructor & Destructor Documentation

◆ member_ptr()

template<class T >
member_ptr< T >::member_ptr ( T *  p = NULLPTR)
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

◆ get() [1/2]

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

Definition at line 51 of file smartptr.h.

◆ get() [2/2]

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

Definition at line 50 of file smartptr.h.

◆ operator*() [1/2]

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

Definition at line 45 of file smartptr.h.

◆ operator*() [2/2]

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

Definition at line 44 of file smartptr.h.

◆ operator->() [1/2]

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

Definition at line 48 of file smartptr.h.

◆ operator->() [2/2]

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

Definition at line 47 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 = NULLPTR)

Definition at line 70 of file smartptr.h.

Member Data Documentation

◆ m_p

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

Definition at line 66 of file smartptr.h.


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