ref< T, doRelease > Class Template Reference

#include <AddressBookSource.h>

List of all members.

Public Member Functions

 ref (T pointer=NULL, const char *objectName=NULL)
 ~ref ()
void set (T pointer, const char *objectName=NULL)
ref< T > & operator= (T pointer)
operator-> ()
operator* ()
 operator T ()
 operator bool ()
release ()

Protected Attributes

m_pointer


Detailed Description

template<class T, bool doRelease = true>
class ref< T, doRelease >

a smart pointer for CoreFoundation object references

trying to store a NULL pointer raises an exception, unreferencing valid objects is done automatically

Parameters:
T the pointer type
release CFRelease() is only called when passing true

Definition at line 46 of file AddressBookSource.h.


Constructor & Destructor Documentation

template<class T , bool doRelease = true>
ref< T, doRelease >::ref ( 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 61 of file AddressBookSource.h.

template<class T , bool doRelease = true>
ref< T, doRelease >::~ref (  )  [inline]

Definition at line 68 of file AddressBookSource.h.


Member Function Documentation

template<class T , bool doRelease = true>
ref< T, doRelease >::operator bool (  )  [inline]

Definition at line 93 of file AddressBookSource.h.

template<class T , bool doRelease = true>
ref< T, doRelease >::operator T (  )  [inline]

Definition at line 92 of file AddressBookSource.h.

template<class T , bool doRelease = true>
T ref< T, doRelease >::operator* (  )  [inline]

Definition at line 91 of file AddressBookSource.h.

template<class T , bool doRelease = true>
T ref< T, doRelease >::operator-> (  )  [inline]

Definition at line 90 of file AddressBookSource.h.

template<class T , bool doRelease = true>
ref<T>& ref< T, doRelease >::operator= ( pointer  )  [inline]

Definition at line 89 of file AddressBookSource.h.

template<class T , bool doRelease = true>
T ref< T, doRelease >::release (  )  [inline]

Definition at line 95 of file AddressBookSource.h.

template<class T , bool doRelease = true>
void ref< T, doRelease >::set ( 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 78 of file AddressBookSource.h.

Referenced by vCard2ABPerson::fromPerson(), and AddressBookSource::insertItem().


Member Data Documentation

template<class T , bool doRelease = true>
T ref< T, doRelease >::m_pointer [protected]


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

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