tesseract  3.03
SmartPtr< T > Class Template Reference

#include <hashfn.h>

List of all members.

Public Member Functions

 SmartPtr ()
 SmartPtr (T *ptr)
 ~SmartPtr ()
T * get () const
void reset (T *ptr)
bool operator== (const T *ptr) const
T * operator-> () const

Detailed Description

template<class T>
class SmartPtr< T >

Definition at line 59 of file hashfn.h.


Constructor & Destructor Documentation

template<class T>
SmartPtr< T >::SmartPtr ( ) [inline]

Definition at line 61 of file hashfn.h.

: ptr_(NULL) {}
template<class T>
SmartPtr< T >::SmartPtr ( T *  ptr) [inline, explicit]

Definition at line 62 of file hashfn.h.

: ptr_(ptr) {}
template<class T>
SmartPtr< T >::~SmartPtr ( ) [inline]

Definition at line 63 of file hashfn.h.

              {
    delete ptr_;
  }

Member Function Documentation

template<class T>
T* SmartPtr< T >::get ( ) const [inline]

Definition at line 67 of file hashfn.h.

                 {
    return ptr_;
  }
template<class T>
T* SmartPtr< T >::operator-> ( ) const [inline]

Definition at line 77 of file hashfn.h.

                        {
    return ptr_;
  }
template<class T>
bool SmartPtr< T >::operator== ( const T *  ptr) const [inline]

Definition at line 74 of file hashfn.h.

                                      {
    return ptr_ == ptr;
  }
template<class T>
void SmartPtr< T >::reset ( T *  ptr) [inline]

Definition at line 70 of file hashfn.h.

                     {
    if (ptr_ != NULL) delete ptr_;
    ptr_ = ptr;
  }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines