18template <
typename... Interfaces>
51 if (
auto count =
decRef() ) {
62 unsigned long decRef()
const override {
67 while ( count > 0 && !
m_refCount.compare_exchange_weak( count, count - 1 ) ) { assert( count > 0 ); }
78template <
typename I1,
typename I2>
80template <
typename I1,
typename I2,
typename I3>
82template <
typename I1,
typename I2,
typename I3,
typename I4>
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
implements< I1, I2 > implements2
implements< I1 > implements1
implements< I1, I2, I3, I4 > implements4
implements< I1, I2, I3 > implements3
void * iid_cast(const InterfaceID &tid, Gaudi::interface_list< Is... >, P *ptr)
std::vector< std::string > getInterfaceNames(Gaudi::interface_list< Is... >)
Base class to be used to extend an interface.
typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type ext_iids
Base class used to implement the interfaces.
unsigned long release() const override
Release Interface instance.
std::atomic_ulong m_refCount
implements & operator=(const implements &)
Assignment operator (do not touch the reference count).
std::vector< std::string > getInterfaceNames() const override
Implementation of IInterface::getInterfaceNames.
implements()=default
Default constructor.
StatusCode queryInterface(const InterfaceID &ti, void **pp) override
Implementation of IInterface::queryInterface.
extend_interfaces< Interfaces... > extend_interfaces_base
unsigned long refCount() const override
Current reference count.
implements< Interfaces... > base_class
Typedef to this class.
typename extend_interfaces_base::ext_iids iids
unsigned long addRef() const override
unsigned long decRef() const override
void const * i_cast(const InterfaceID &tid) const override
Implementation of IInterface::i_cast.
implements(const implements &)
Copy constructor (zero the reference count)