ATLAS Offline Software
Loading...
Searching...
No Matches
SG::TopBase< T > Struct Template Reference

Calculate topmost base accessible via SG_BASES that also has a defined CLID. More...

#include <TopBase.h>

Collaboration diagram for SG::TopBase< T >:

Public Types

using Base1 = typename SG::Bases<T>::bases::Base1
using type

Static Public Attributes

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

Detailed Description

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

Calculate topmost base accessible via SG_BASES that also has a defined CLID.

For example, if we have

SG_BASES(C2, C1);
SG_BASES(C3, C2);
#define SG_BASES(D,...)
Declare the base classes from which D derives.

with all three classes having CLIDs defined, then TopBase<C1>::type, TopBase<C2>::type, and TopBase<C3>::type all yield C1.

If, on the other hand, there is no CLID for C2, then TopBase<C3>::type will yield C3.

For the use of this, see the comments for ReadDecorHandleKey.

Definition at line 45 of file TopBase.h.

Member Typedef Documentation

◆ Base1

template<class T>
using SG::TopBase< T >::Base1 = typename SG::Bases<T>::bases::Base1

Definition at line 47 of file TopBase.h.

◆ type

template<class T>
using SG::TopBase< T >::type
Initial value:
typename std::conditional<has_base && base_has_clid,
typename std::conditional< has_base &&base_has_clid, typename TopBase< Base1 >::type, T >::type type
Definition TopBase.h:50
static const bool has_base
Definition TopBase.h:48
static const bool base_has_clid
Definition TopBase.h:49

Definition at line 50 of file TopBase.h.

Member Data Documentation

◆ base_has_clid

template<class T>
const bool SG::TopBase< T >::base_has_clid = SG::safe_clid<Base1>()
static

Definition at line 49 of file TopBase.h.

◆ has_base

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

Definition at line 48 of file TopBase.h.


The documentation for this struct was generated from the following file: