ATLAS Offline Software
Public Types | Static Public Attributes | List of all members
SG::TopBase< T > Struct Template Reference

Calculate topmost base accessible via SG_BASES. More...

#include <TopBase.h>

Collaboration diagram for SG::TopBase< T >:

Public Types

typedef SG::Bases< T >::bases::Base1 Base1
 
typedef std::conditional< has_base, typename TopBase< Base1 >::type, T >::type type
 

Static Public Attributes

static const bool has_base = !std::is_same<Base1, SG::NoBase>::value
 

Detailed Description

template<class T>
struct SG::TopBase< T >

Calculate topmost base accessible via SG_BASES.

For example, if we have

SG_BASES(C2, C1);
SG_BASES(C3, C2);

then TopBase<C1>::type, TopBase<C2>::type, and TopBase<C3>::type all yield C1.

Definition at line 37 of file TopBase.h.

Member Typedef Documentation

◆ Base1

template<class T >
typedef SG::Bases<T>::bases::Base1 SG::TopBase< T >::Base1

Definition at line 39 of file TopBase.h.

◆ type

template<class T >
typedef std::conditional<has_base, typename TopBase<Base1>::type, T>::type SG::TopBase< T >::type

Definition at line 43 of file TopBase.h.

Member Data Documentation

◆ has_base

template<class T >
const bool SG::TopBase< T >::has_base = !std::is_same<Base1, SG::NoBase>::value
static

Definition at line 40 of file TopBase.h.


The documentation for this struct was generated from the following file:
SG_BASES
#define SG_BASES(D,...)
Declare the base classes from which D derives.
Definition: Control/AthenaKernel/AthenaKernel/BaseInfo.h:224