Public Member Functions | Protected Attributes

zeus::TAutoPtrBase< T > Class Template Reference

#include <AutoPtr.hpp>

Inheritance diagram for zeus::TAutoPtrBase< T >:
zeus::TAutoPtr< T >

List of all members.

Public Member Functions

 TAutoPtrBase ()
 TAutoPtrBase (const T *pIface, bool bAllocPointer=false)
 TAutoPtrBase (const T &rIface, bool bAllocPointer=false)
virtual ~TAutoPtrBase ()
void assign (const T *pInterface)
void assign (const T &rInterface)
void attach (const T *pInterface)
void attach (const T &rInterface)
bool equals (const T *pInterface) const
bool equals (const T &rInterface) const
T *& getPointerReference ()
const T *& getConstPointerReference () const
IZUnknown *& getInterfaceReference ()
const IZUnknown *& getInterfaceReferenceConst () const
T * getPointer ()
const T * getConstPointer () const
T * detach ()
void release ()

Protected Attributes

T * m_pInterface

Detailed Description

template<class T>
class zeus::TAutoPtrBase< T >

This is the base class of all smart interface pointers


Constructor & Destructor Documentation

template<class T>
zeus::TAutoPtrBase< T >::TAutoPtrBase (  ) [inline]

Creates an Interface Smart pointer

template<class T>
zeus::TAutoPtrBase< T >::TAutoPtrBase ( const T *  pIface,
bool  bAllocPointer = false 
) [inline]

Creates an Interface Smart pointer

Parameters:
pIface: Interface
bAllocPointer: If this flag is true the pointer will be allocated with addRef()
template<class T>
zeus::TAutoPtrBase< T >::TAutoPtrBase ( const T &  rIface,
bool  bAllocPointer = false 
) [inline]

Creates an Interface Smart pointer

Parameters:
rIface: Interface
bAllocPointer: If this flag is true the pointer will be allocated with addRef()
template<class T>
virtual zeus::TAutoPtrBase< T >::~TAutoPtrBase (  ) [inline, virtual]

Destroys the smart pointer


Member Function Documentation

template<class T>
void zeus::TAutoPtrBase< T >::assign ( const T *  pInterface ) [inline]

assigns a new interface pointer to the auto pointer. This method will allocate a new pointer reference (using addRef())

Parameters:
pInterface: Interface pointer to assign
template<class T>
void zeus::TAutoPtrBase< T >::assign ( const T &  rInterface ) [inline]

assigns a new interface reference to the auto pointer. This method will allocate a new pointer reference (using addRef())

Parameters:
rInterface: Interface reference to assign
template<class T>
void zeus::TAutoPtrBase< T >::attach ( const T &  rInterface ) [inline]

adopts a new interface reference to the auto pointer. This method will not allocate a new pointer reference (no addRef())

Parameters:
rInterface: reference to attach
template<class T>
void zeus::TAutoPtrBase< T >::attach ( const T *  pInterface ) [inline]

adopts a new interface pointer to the auto pointer. This method will not allocate a new pointer reference (no addRef())

Parameters:
pInterface: pointer to attach
template<class T>
T* zeus::TAutoPtrBase< T >::detach (  ) [inline]

Removes the pointer from the wrapper without releasing it. After this call the internal member is set to NULL.

template<class T>
bool zeus::TAutoPtrBase< T >::equals ( const T &  rInterface ) const [inline]

Checks if two pointers are equal

Parameters:
rInterface: reference to check
template<class T>
bool zeus::TAutoPtrBase< T >::equals ( const T *  pInterface ) const [inline]

Checks if two pointers are equal

Parameters:
pInterface: pointer to check
template<class T>
const T* zeus::TAutoPtrBase< T >::getConstPointer (  ) const [inline]

returns the the const_pointer

template<class T>
const T*& zeus::TAutoPtrBase< T >::getConstPointerReference (  ) const [inline]

returns the Reference of the pointer

template<class T>
IZUnknown*& zeus::TAutoPtrBase< T >::getInterfaceReference (  ) [inline]

returns the Reference of the interface pointer

template<class T>
const IZUnknown*& zeus::TAutoPtrBase< T >::getInterfaceReferenceConst (  ) const [inline]

returns the Reference of the interface pointer

template<class T>
T* zeus::TAutoPtrBase< T >::getPointer (  ) [inline]

returns the the pointer

template<class T>
T*& zeus::TAutoPtrBase< T >::getPointerReference (  ) [inline]

returns the Reference of the pointer

template<class T>
void zeus::TAutoPtrBase< T >::release (  ) [inline]

Removes the pointer from the wrapper


Member Data Documentation

template<class T>
T* zeus::TAutoPtrBase< T >::m_pInterface [protected]

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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Sun Jan 22 2012 15:28:32