#include <SmartIF.h>
Inheritance diagram for SmartIFBase< TYPE >:
Public Member Functions | |
bool | isValid () const |
Allow for check if smart pointer is valid. | |
operator TYPE * () | |
Automatic conversion to constined interface type. | |
operator const TYPE * () const | |
Automatic conversion to constined interface type (CONST). | |
bool | operator!= (const TYPE *test) const |
Check for non-equality. | |
bool | operator== (const TYPE *test) const |
Check for equality. | |
TYPE * | operator-> () |
Dereference operator. | |
const TYPE * | operator-> () const |
Dereference operator (CONST). | |
void ** | operator & () |
Allow for use as void pointer. | |
const TYPE * | get () |
Get reference to interface pointer. | |
TYPE *& | pRef () |
Get reference to interface pointer. | |
const TYPE *const & | pRef () const |
Get reference to interface pointer (CONST). | |
bool | operator! () const |
check the validity of the interface | |
Protected Member Functions | |
void | releaseInterface () |
Release interface. | |
SmartIFBase (const InterfaceID &iid) | |
Standard constructor. | |
virtual | ~SmartIFBase () |
Standard Destructor. | |
Protected Attributes | |
const InterfaceID | m_iid |
TYPE * | m_interface |
Private Member Functions | |
SmartIFBase (const SmartIFBase ©) | |
disable copy | |
SmartIFBase & | operator= (const SmartIFBase &right) |
disable assignement |
Definition at line 31 of file SmartIF.h.
SmartIFBase< TYPE >::SmartIFBase | ( | const InterfaceID & | iid | ) | [inline, protected] |
Standard constructor.
Definition at line 41 of file SmartIF.h.
00041 : m_iid(iid), m_interface(0) { 00042 }
virtual SmartIFBase< TYPE >::~SmartIFBase | ( | ) | [inline, protected, virtual] |
Standard Destructor.
Definition at line 44 of file SmartIF.h.
00044 { 00045 releaseInterface(); 00046 }
SmartIFBase< TYPE >::SmartIFBase | ( | const SmartIFBase< TYPE > & | copy | ) | [private] |
disable copy
void SmartIFBase< TYPE >::releaseInterface | ( | ) | [inline, protected] |
Release interface.
Definition at line 36 of file SmartIF.h.
00036 { 00037 if ( m_interface ) m_interface->release(); 00038 m_interface = 0; 00039 }
bool SmartIFBase< TYPE >::isValid | ( | ) | const [inline] |
Allow for check if smart pointer is valid.
Definition at line 49 of file SmartIF.h.
00049 { 00050 return ( 0 != m_interface ); 00051 }
SmartIFBase< TYPE >::operator TYPE * | ( | ) | [inline] |
Automatic conversion to constined interface type.
Definition at line 53 of file SmartIF.h.
00053 { 00054 return m_interface; 00055 }
SmartIFBase< TYPE >::operator const TYPE * | ( | ) | const [inline] |
Automatic conversion to constined interface type (CONST).
Definition at line 57 of file SmartIF.h.
00057 { 00058 return m_interface; 00059 }
bool SmartIFBase< TYPE >::operator!= | ( | const TYPE * | test | ) | const [inline] |
Check for non-equality.
Definition at line 61 of file SmartIF.h.
00061 { 00062 return test != m_interface; 00063 }
bool SmartIFBase< TYPE >::operator== | ( | const TYPE * | test | ) | const [inline] |
Check for equality.
Definition at line 65 of file SmartIF.h.
00065 { 00066 return test == m_interface; 00067 }
TYPE* SmartIFBase< TYPE >::operator-> | ( | ) | [inline] |
Dereference operator.
Definition at line 69 of file SmartIF.h.
00069 { 00070 return m_interface; 00071 }
const TYPE* SmartIFBase< TYPE >::operator-> | ( | ) | const [inline] |
Dereference operator (CONST).
Definition at line 73 of file SmartIF.h.
00073 { 00074 return m_interface; 00075 }
void** SmartIFBase< TYPE >::operator & | ( | ) | [inline] |
Allow for use as void pointer.
Definition at line 77 of file SmartIF.h.
00077 { 00078 return (void**) &m_interface; 00079 }
const TYPE* SmartIFBase< TYPE >::get | ( | ) | [inline] |
Get reference to interface pointer.
Definition at line 81 of file SmartIF.h.
00081 { 00082 return m_interface; 00083 }
TYPE*& SmartIFBase< TYPE >::pRef | ( | ) | [inline] |
Get reference to interface pointer.
Definition at line 85 of file SmartIF.h.
00085 { 00086 return this->m_interface; 00087 }
const TYPE* const& SmartIFBase< TYPE >::pRef | ( | ) | const [inline] |
Get reference to interface pointer (CONST).
Definition at line 89 of file SmartIF.h.
00089 { 00090 return this->m_interface; 00091 }
bool SmartIFBase< TYPE >::operator! | ( | ) | const [inline] |
check the validity of the interface
Reimplemented in SmartIF< TYPE >, and SmartIF< IInterface >.
Definition at line 93 of file SmartIF.h.
00093 { return !(this->isValid()) ; }
SmartIFBase& SmartIFBase< TYPE >::operator= | ( | const SmartIFBase< TYPE > & | right | ) | [private] |
disable assignement
const InterfaceID SmartIFBase< TYPE >::m_iid [protected] |
TYPE* SmartIFBase< TYPE >::m_interface [protected] |