ATLAS Offline Software
TopBase.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4  */
13 #ifndef ATHENAKERNEL_TOPBASE_H
14 #define ATHENAKERNEL_TOPBASE_H
15 
16 
17 #include "AthenaKernel/BaseInfo.h"
18 #include <type_traits>
19 
20 
21 namespace SG {
22 
23 
36 template <class T>
37 struct TopBase
38 {
41  typedef typename std::conditional<has_base,
42  typename TopBase<Base1>::type,
44 };
45 
46 
47 template <>
48 struct TopBase<SG::NoBase>
49 {
50  typedef SG::NoBase type;
51 };
52 
53 
54 } // namespace SG
55 
56 
57 #endif // not ATHENAKERNEL_TOPBASE_H
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::TopBase::has_base
static const bool has_base
Definition: TopBase.h:40
SG::TopBase::Base1
SG::Bases< T >::bases::Base1 Base1
Definition: TopBase.h:39
athena.value
value
Definition: athena.py:124
SG::TopBase::type
std::conditional< has_base, typename TopBase< Base1 >::type, T >::type type
Definition: TopBase.h:43
SG::TopBase
Calculate topmost base accessible via SG_BASES.
Definition: TopBase.h:38
BaseInfo.h
Provide an interface for finding inheritance information at run time.
SG::NoBase
Marker to indicate a nonexistent base class.
Definition: Bases.h:63
SG::TopBase< SG::NoBase >::type
SG::NoBase type
Definition: TopBase.h:50