![]() |
The Gaudi Framework
v27r0
|
Small smart pointer class with automatic reference counting for IInterface. More...
#include <GaudiKernel/SmartIF.h>
Public Member Functions | |
SmartIF ()=default | |
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... | |
SmartIF (SmartIF &&rhs) | |
Move constructor. More... | |
SmartIF & | operator= (SmartIF &&rhs) |
Move assignement. 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 bool () const | |
bool | operator! () const |
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=nullptr) |
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... | |
template<typename IFace > | |
SmartIF< IFace > | as () const |
return a new SmartIF instance to another interface 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 | |
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... | |
SmartIF (SmartIF &&rhs) | |
Move constructor. More... | |
SmartIF & | operator= (SmartIF &&rhs) |
Move assignement. 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 bool () const | |
bool | operator! () const |
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=nullptr) |
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... | |
template<typename IFace > | |
SmartIF< IFace > | as () const |
return a new SmartIF instance to another interface 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 = nullptr |
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 32 of file SmartIF.h.
|
inlineexplicit |
Constructor from another SmartIF, with a different type.
Definition at line 54 of file SmartIF.h.
Standard Destructor.
Definition at line 58 of file SmartIF.h.
Standard constructor from any (IInterface-derived) pointer.
Definition at line 32 of file SmartIF.h.
|
inlineexplicit |
Constructor from another SmartIF, with a different type.
Definition at line 54 of file SmartIF.h.
Standard Destructor.
Definition at line 58 of file SmartIF.h.
return a new SmartIF instance to another interface
Definition at line 110 of file SmartIF.h.
return a new SmartIF instance to another interface
Definition at line 110 of file SmartIF.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
Definition at line 64 of file SmartIF.h.
|
inlineexplicit |
Definition at line 64 of file SmartIF.h.
|
inline |
|
inline |
|
inline |
Definition at line 65 of file SmartIF.h.
|
inline |
Definition at line 65 of file SmartIF.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assignment operator from IInterface pointer.
It allows things like SmartIF<T> x; x = 0;
Definition at line 121 of file SmartIF.h.
|
inline |
Assignment operator from IInterface pointer.
It allows things like SmartIF<T> x; x = 0;
Definition at line 121 of file SmartIF.h.
Assignment operator.
Definition at line 126 of file SmartIF.h.
Assignment operator.
Definition at line 126 of file SmartIF.h.
|
inline |
Assignment operator from a different SmartIF.
Definition at line 133 of file SmartIF.h.
|
inline |
Assignment operator from a different SmartIF.
Definition at line 133 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 97 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 97 of file SmartIF.h.
|
private |