eptr< T, base, R > Class Template Reference

#include <EvolutionSmartPtr.h>

List of all members.

Public Member Functions

 eptr (T *pointer=NULL, const char *objectName=NULL)
 ~eptr ()
 eptr (eptr &other)
eptroperator= (eptr &other)
void set (T *pointer, const char *objectName=NULL)
T * release ()
eptr< T, base, R > & operator= (T *pointer)
T * get ()
T * operator-> ()
T & operator* ()
 operator T * ()
 operator void * ()
 operator bool ()

Protected Attributes

T * m_pointer


Detailed Description

template<class T, class base = T, class R = EvolutionUnref>
class eptr< T, base, R >

a smart pointer implementation for objects for which a unref() function exists; trying to store a NULL pointer raises an exception, unreferencing valid objects is done automatically

Definition at line 75 of file EvolutionSmartPtr.h.


Constructor & Destructor Documentation

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::eptr ( T *  pointer = NULL,
const char *  objectName = NULL 
) [inline]

create a smart pointer that owns the given object; passing a NULL pointer and a name for the object raises an error

Definition at line 84 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::~eptr (  )  [inline]

Definition at line 91 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::eptr ( eptr< T, base, R > &  other  )  [inline]

assignment and copy construction transfer ownership to the copy

Definition at line 97 of file EvolutionSmartPtr.h.


Member Function Documentation

template<class T , class base = T, class R = EvolutionUnref>
T* eptr< T, base, R >::get (  )  [inline]

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::operator bool (  )  [inline]

Definition at line 136 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::operator T * (  )  [inline]

Definition at line 134 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr< T, base, R >::operator void * (  )  [inline]

Definition at line 135 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
T& eptr< T, base, R >::operator* (  )  [inline]

Definition at line 133 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
T* eptr< T, base, R >::operator-> (  )  [inline]

Definition at line 132 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr<T, base, R>& eptr< T, base, R >::operator= ( T *  pointer  )  [inline]

Definition at line 130 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
eptr& eptr< T, base, R >::operator= ( eptr< T, base, R > &  other  )  [inline]

Definition at line 101 of file EvolutionSmartPtr.h.

template<class T , class base = T, class R = EvolutionUnref>
T* eptr< T, base, R >::release (  )  [inline]

transfer ownership over the pointer to caller and stop tracking it: pointer tracked by smart pointer is set to NULL and the original pointer is returned

Definition at line 128 of file EvolutionSmartPtr.h.

Referenced by SQLiteUtil::vObjectToRow().

template<class T , class base = T, class R = EvolutionUnref>
void eptr< T, base, R >::set ( T *  pointer,
const char *  objectName = NULL 
) [inline]

store another object in this pointer, replacing any which was referenced there before; passing a NULL pointer and a name for the object raises an error

Definition at line 112 of file EvolutionSmartPtr.h.

Referenced by EvolutionContactSource::beginSyncThrow(), SQLiteContactSource::deleteItem(), EvolutionMemoSource::insertItem(), SQLiteUtil::open(), EvolutionContactSource::open(), and EvolutionCalendarSource::open().


Member Data Documentation

template<class T , class base = T, class R = EvolutionUnref>
T* eptr< T, base, R >::m_pointer [protected]


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

Generated on Sat Oct 18 17:17:03 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1