1 #ifndef GAUDIKERNEL_IMPLEMENTS_H 2 #define GAUDIKERNEL_IMPLEMENTS_H 8 template <
typename... Interfaces>
39 unsigned long addRef()
override {
return ++m_refCount; }
44 auto count = ( m_refCount ? --m_refCount : m_refCount.load() );
45 if ( count == 0 )
delete this;
49 unsigned long refCount()
const override {
return m_refCount.load(); }
53 std::atomic_ulong m_refCount = {0};
56 template <
typename I1>
58 template <
typename I1,
typename I2>
60 template <
typename I1,
typename I2,
typename I3>
62 template <
typename I1,
typename I2,
typename I3,
typename I4>
constexpr static const auto FAILURE
Base class used to implement the interfaces.
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type ext_iids
take union of the ext_iids of all Interfaces...
void * i_cast(const InterfaceID &tid) const override
Implementation of IInterface::i_cast.
implements(const implements &)
Copy constructor (zero the reference count)
typename extend_interfaces_base::ext_iids iids
implements & operator=(const implements &)
Assignment operator (do not touch the reference count).
unsigned long addRef() override
Reference Interface instance.
This class is used for returning status codes from appropriate routines.
Base class to be used to extend an interface.
constexpr static const auto SUCCESS
std::vector< std::string > getInterfaceNames() const override
Implementation of IInterface::getInterfaceNames.
unsigned long refCount() const override
Current reference count.
std::vector< std::string > getInterfaceNames(Gaudi::interface_list< Is... >)
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is... >, P *ptr)
unsigned long release() override
Release Interface instance.