OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
custom_ptr< T > Class Template Reference

#include <util.h>

Public Member Functions

 custom_ptr (boost::function< void(T *)> deleter, T *ptr=0)
 
 ~custom_ptr ()
 
T * get () const
 
T * operator-> () const
 
void reset (T *ptr=0)
 
T * release ()
 

Private Attributes

boost::function< void(T *)> deleter_
 
T * ptr_
 

Detailed Description

template<typename T>
class custom_ptr< T >

Definition at line 132 of file util.h.

Constructor & Destructor Documentation

template<typename T >
custom_ptr< T >::custom_ptr ( boost::function< void(T *)>  deleter,
T *  ptr = 0 
)
inline

Definition at line 134 of file util.h.

template<typename T >
custom_ptr< T >::~custom_ptr ( )
inline

Definition at line 138 of file util.h.

Member Function Documentation

template<typename T >
T* custom_ptr< T >::get ( ) const
inline

Definition at line 143 of file util.h.

template<typename T >
T* custom_ptr< T >::operator-> ( ) const
inline

Definition at line 146 of file util.h.

template<typename T >
T* custom_ptr< T >::release ( )
inline

Definition at line 155 of file util.h.

template<typename T >
void custom_ptr< T >::reset ( T *  ptr = 0)
inline

Definition at line 149 of file util.h.

Member Data Documentation

template<typename T >
boost::function<void(T *)> custom_ptr< T >::deleter_
private

Definition at line 161 of file util.h.

template<typename T >
T* custom_ptr< T >::ptr_
private

Definition at line 162 of file util.h.


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