tesseract 3.04.01

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 64 of file hashfn.h.


Constructor & Destructor Documentation

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

Definition at line 66 of file hashfn.h.

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

Definition at line 67 of file hashfn.h.

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

Definition at line 68 of file hashfn.h.

              {
    delete ptr_;
  }

Member Function Documentation

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

Definition at line 72 of file hashfn.h.

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

Definition at line 82 of file hashfn.h.

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

Definition at line 79 of file hashfn.h.

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

Definition at line 75 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