![]() |
The Gaudi Framework
v26r3
|
Small smart pointer class with automatic reference counting for IInterface. More...
#include <GaudiKernel/SmartIF.h>
Public Member Functions | |
SmartIF () | |
Default constructor. More... | |
SmartIF (TYPE *ptr) | |
Standard constructor from pointer. More... | |
template<class OTHER > | |
SmartIF (OTHER *ptr) | |
Standard constructor from any (IInterface-derived) pointer. More... | |
SmartIF (const SmartIF &rhs) | |
Copy constructor. More... | |
template<class T > | |
SmartIF (const SmartIF< T > &rhs) | |
Constructor from another SmartIF, with a different type. More... | |
~SmartIF () | |
Standard Destructor. More... | |
bool | isValid () const |
Allow for check if smart pointer is valid. More... | |
operator TYPE * () const | |
Automatic conversion to pointer. More... | |
TYPE * | operator-> () const |
Dereference operator. More... | |
TYPE & | operator* () const |
Dereference operator. More... | |
TYPE * | get () const |
Get interface pointer. More... | |
TYPE *& | pRef () |
Get reference to the pointer. More... | |
void | reset (TYPE *ptr=0) |
Set the internal pointer to the passed one disposing of the old one. More... | |
template<class OTHER > | |
void | reset (OTHER *ptr) |
Set the internal pointer to the passed one disposing of the old one. More... | |
SmartIF & | operator= (IInterface *ptr) |
Assignment operator from IInterface pointer. More... | |
SmartIF & | operator= (const SmartIF &rhs) |
Assignment operator. More... | |
template<class T > | |
SmartIF & | operator= (const SmartIF< T > &rhs) |
Assignment operator from a different SmartIF. More... | |
SmartIF () | |
Default constructor. More... | |
SmartIF (TYPE *ptr) | |
Standard constructor from pointer. More... | |
template<class OTHER > | |
SmartIF (OTHER *ptr) | |
Standard constructor from any (IInterface-derived) pointer. More... | |
SmartIF (const SmartIF &rhs) | |
Copy constructor. More... | |
template<class T > | |
SmartIF (const SmartIF< T > &rhs) | |
Constructor from another SmartIF, with a different type. More... | |
~SmartIF () | |
Standard Destructor. More... | |
bool | isValid () const |
Allow for check if smart pointer is valid. More... | |
operator TYPE * () const | |
Automatic conversion to pointer. More... | |
TYPE * | operator-> () const |
Dereference operator. More... | |
TYPE & | operator* () const |
Dereference operator. More... | |
TYPE * | get () const |
Get interface pointer. More... | |
TYPE *& | pRef () |
Get reference to the pointer. More... | |
void | reset (TYPE *ptr=0) |
Set the internal pointer to the passed one disposing of the old one. More... | |
template<class OTHER > | |
void | reset (OTHER *ptr) |
Set the internal pointer to the passed one disposing of the old one. More... | |
SmartIF & | operator= (IInterface *ptr) |
Assignment operator from IInterface pointer. More... | |
SmartIF & | operator= (const SmartIF &rhs) |
Assignment operator. More... | |
template<class T > | |
SmartIF & | operator= (const SmartIF< T > &rhs) |
Assignment operator from a different SmartIF. More... | |
Private Attributes | |
TYPE * | m_interface |
Pointer to the instance. More... | |
Small smart pointer class with automatic reference counting for IInterface.
SmartIF simplifies the interaction with components in Gaudi by implementing an automatic reference counting and the casting (via IInterface::queryInterface).
Definition at line 14 of file IConverter.h.
Standard constructor from any (IInterface-derived) pointer.
Definition at line 33 of file SmartIF.h.
|
inlineexplicit |
Constructor from another SmartIF, with a different type.
Definition at line 43 of file SmartIF.h.
Standard Destructor.
Definition at line 47 of file SmartIF.h.
Standard constructor from any (IInterface-derived) pointer.
Definition at line 33 of file SmartIF.h.
|
inlineexplicit |
Constructor from another SmartIF, with a different type.
Definition at line 43 of file SmartIF.h.
Standard Destructor.
Definition at line 47 of file SmartIF.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator from IInterface pointer.
It allows things like SmartIF<T> x; x = 0;
Definition at line 104 of file SmartIF.h.
|
inline |
Assignment operator from IInterface pointer.
It allows things like SmartIF<T> x; x = 0;
Definition at line 104 of file SmartIF.h.
Assignment operator.
Definition at line 109 of file SmartIF.h.
Assignment operator.
Definition at line 109 of file SmartIF.h.
|
inline |
Assignment operator from a different SmartIF.
Definition at line 116 of file SmartIF.h.
|
inline |
Assignment operator from a different SmartIF.
Definition at line 116 of file SmartIF.h.
|
inline |
|
inline |
|
inline |
|
inline |
Set the internal pointer to the passed one disposing of the old one.
Version for pointers of types inheriting from IInterface.
Definition at line 87 of file SmartIF.h.
Set the internal pointer to the passed one disposing of the old one.
Version for pointers of types inheriting from IInterface.
Definition at line 87 of file SmartIF.h.
|
private |