ZeusBase-Library  2.0.4
zeus::TAutoPtrBase< T > Class Template Reference

#include <AutoPtr.hpp>

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

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

§ TAutoPtrBase() [1/3]

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

Creates an Interface Smart pointer

§ TAutoPtrBase() [2/3]

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()

§ TAutoPtrBase() [3/3]

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()

§ ~TAutoPtrBase()

template<class T>
virtual zeus::TAutoPtrBase< T >::~TAutoPtrBase ( )
inlinevirtual

Destroys the smart pointer

Member Function Documentation

§ assign() [1/2]

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

§ assign() [2/2]

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

§ attach() [1/2]

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

§ attach() [2/2]

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

§ detach()

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.

§ equals() [1/2]

template<class T>
bool zeus::TAutoPtrBase< T >::equals ( const T *  pInterface) const
inline

Checks if two pointers are equal

Parameters
pInterface: pointer to check

§ equals() [2/2]

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

Checks if two pointers are equal

Parameters
rInterface: reference to check

§ getConstPointer()

template<class T>
const T* zeus::TAutoPtrBase< T >::getConstPointer ( ) const
inline

returns the the const_pointer

§ getConstPointerReference()

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

returns the Reference of the pointer

§ getInterfaceReference()

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

returns the Reference of the interface pointer

§ getInterfaceReferenceConst()

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

returns the Reference of the interface pointer

§ getPointer()

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

returns the the pointer

§ getPointerReference()

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

returns the Reference of the pointer

§ release()

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

Removes the pointer from the wrapper

Member Data Documentation

§ m_pInterface

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

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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Tue Sep 13 2016 22:31:50