Merge branch 'dev-smartif-use' into 'master'
Provide (and use) C++11 smart pointer 'look and feel' for SmartIF
The aim of this branch is to confine, for everything that inherits from IInterface,
the calls to addRef(), release() and queryInterface() to the SmartIF implementation.
Exceptions are a few places where interfaces (currently) return bare pointers (instead of
SmartIF...) and where one thus has to addRef() explicitly to avoid returning a dangling
pointer. This can be avoided by changing the relevant interface to return a SmartIF
instead of a bare pointer.
In addition, make SmartIF 'look and feel' like a smart pointer.
- use explict bool conversion instead of .isValid()
- add SmartIF::as<IFace>(), to return a SmartIF<IFace> to an alternate
interface -- which (together with move) encourages the use of auto
- add ISvcLocator::as<IFace>(), to return a SmartIF<IFace> to the current ISvcLocator.
- add ServiceManager::service<IFace>() which return SmartIF<IFace> which encourages
the use of auto
And add a few other C++11 modernizations (eg. prefer STL over raw loop)
Fixes GAUDI-1094
See merge request !24
Loading
Please sign in to comment