![]() |
|
|
Generated: 18 Jul 2008 |
#include <GaudiKernel/SmartIF.h>
Inheritance diagram for SmartIF< TYPE >:


Description: A small class to easy the use of Gaudi interfaces.
Base Class: SmartIFBase<TYPE>
History :
+---------+----------------------------------------------+--------+
| Date | Comment | Who |
+---------+----------------------------------------------+--------+
| 30/10/99| Initial version. | MF |
+---------+----------------------------------------------+--------+
Author: M.Frank Version: 1.0
Definition at line 120 of file SmartIF.h.
Public Member Functions | |
| SmartIF (const InterfaceID &iid, IInterface *iface) | |
| Standard constructor with initialisation. | |
| SmartIF (const InterfaceID &iid, TYPE *iface) | |
| Standard constructor with initialisation. | |
| SmartIF (const InterfaceID &iid) | |
| Standard constructor with initialisation. | |
| SmartIF (TYPE *iface) | |
| Standard constructor with initialisation. | |
| SmartIF (IInterface *iface=0) | |
| Standard constructor with initialisation. | |
| SmartIF (const SmartIF< TYPE > ©) | |
| Copy constructor. | |
| virtual | ~SmartIF () |
| Standard destructor. | |
| SmartIF< TYPE > & | operator= (int) |
| Simple assignment operator. | |
| template<class T> | |
| SmartIF< TYPE > & | operator= (const SmartIF< T > &iface) |
| Copy assignment operator with conversion to requested interface type. | |
| SmartIF< TYPE > & | operator= (const SmartIF< TYPE > &iface) |
| Copy assignment operator. | |
| SmartIF & | operator= (IInterface *iface) |
| Assignment operator with conversion to requested interface type. | |
| SmartIF< TYPE > & | operator= (TYPE *iface) |
| Simple assignment operator. | |
| bool | operator! () const |
| check the validity of the interface | |
| SmartIF< TYPE >::SmartIF | ( | const InterfaceID & | iid, | |
| IInterface * | iface | |||
| ) | [inline] |
Standard constructor with initialisation.
Definition at line 123 of file SmartIF.h.
00123 : SmartIFBase<TYPE>(iid) { 00124 SmartIF<TYPE>::operator=(iface); 00125 }
| SmartIF< TYPE >::SmartIF | ( | const InterfaceID & | iid, | |
| TYPE * | iface | |||
| ) | [inline] |
Standard constructor with initialisation.
Definition at line 127 of file SmartIF.h.
00127 : SmartIFBase<TYPE>(iid) { 00128 SmartIF<TYPE>::operator=(iface); 00129 }
| SmartIF< TYPE >::SmartIF | ( | const InterfaceID & | iid | ) | [inline] |
Standard constructor with initialisation.
Definition at line 131 of file SmartIF.h.
00131 : SmartIFBase<TYPE>(iid) { 00132 }
Standard constructor with initialisation.
Definition at line 134 of file SmartIF.h.
00134 : SmartIFBase<TYPE>(TYPE::interfaceID()) { 00135 SmartIF<TYPE>::operator=(iface); 00136 }
| SmartIF< TYPE >::SmartIF | ( | IInterface * | iface = 0 |
) | [inline] |
Standard constructor with initialisation.
Definition at line 138 of file SmartIF.h.
00138 : SmartIFBase<TYPE>(TYPE::interfaceID()) { 00139 SmartIF<TYPE>::operator=(iface); 00140 }
Copy constructor.
Definition at line 142 of file SmartIF.h.
00142 : SmartIFBase<TYPE>(copy.m_iid) { 00143 SmartIF<TYPE>::operator=(copy.m_interface); 00144 }
Simple assignment operator.
Definition at line 149 of file SmartIF.h.
Referenced by SmartIF< IInterface >::SmartIF(), and SmartIF< IPartitionControl >::SmartIF().
00149 { 00150 this->releaseInterface(); 00151 this->m_interface = 0; 00152 return *this; 00153 }
| SmartIF<TYPE>& SmartIF< TYPE >::operator= | ( | const SmartIF< T > & | iface | ) | [inline] |
Copy assignment operator with conversion to requested interface type.
Definition at line 156 of file SmartIF.h.
00157 { 00158 T* ptr = iface.m_interface ; 00159 if ( (void*)ptr != (void*)this->m_interface ) 00160 { 00161 TYPE* newIF = 0; 00162 if ( ptr != 0 ) { 00163 ptr->queryInterface(this->m_iid, pp_cast<void>(&newIF)).ignore(); 00164 } 00165 this->releaseInterface(); 00166 this->m_interface = newIF; 00167 } 00168 return *this; 00169 }
| SmartIF<TYPE>& SmartIF< TYPE >::operator= | ( | const SmartIF< TYPE > & | iface | ) | [inline] |
Copy assignment operator.
Definition at line 171 of file SmartIF.h.
00172 { 00173 TYPE* newIF = iface.m_interface ; 00174 return (*this)=newIF ; 00175 }
| SmartIF& SmartIF< TYPE >::operator= | ( | IInterface * | iface | ) | [inline] |
Assignment operator with conversion to requested interface type.
Definition at line 177 of file SmartIF.h.
00178 { 00179 if ( iface != this->m_interface ) 00180 { 00181 TYPE* newIF = 0; 00182 if ( iface != 0 ) { 00183 iface->queryInterface(this->m_iid, pp_cast<void>(&newIF)).ignore(); 00184 } 00185 this->releaseInterface(); 00186 this->m_interface = newIF; 00187 } 00188 return *this; 00189 }
Simple assignment operator.
Definition at line 191 of file SmartIF.h.
00192 { 00193 if ( iface != this->m_interface ) { 00194 if ( iface != 0 ) { 00195 iface->addRef(); 00196 } 00197 this->releaseInterface(); 00198 this->m_interface = iface; 00199 } 00200 return *this; 00201 }
| bool SmartIF< TYPE >::operator! | ( | ) | const [inline] |
check the validity of the interface
Reimplemented from SmartIFBase< TYPE >.
Definition at line 203 of file SmartIF.h.
00203 { return !(this->isValid()) ; }