ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthContainersInterfaces
AthContainersInterfaces
AuxStore_traits.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
/*
4
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5
*/
6
31
32
33
#ifndef ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
34
#define ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
35
36
37
#include "
AthContainersInterfaces/IAuxElement.h
"
38
#include "
AthContainersInterfaces/IAuxStore.h
"
39
#include "
AthContainersInterfaces/IConstAuxStore.h
"
40
41
42
# include <type_traits>
43
#include <string>
44
45
46
47
namespace
SG
{
48
49
53
class
NoAuxStore
{};
54
55
57
struct
AuxStore_traits_AuxDefault
58
{
59
typedef
std::true_type
flag
;
60
61
typedef
IAuxStore
type
;
62
static
const
std::string&
typeName
()
63
{
64
static
const
std::string name (
"SG::IAuxStore"
);
65
return
name;
66
}
67
68
typedef
IConstAuxStore
const_type
;
69
static
const
std::string&
const_typeName
()
70
{
71
static
const
std::string name (
"SG::IConstAuxStore"
);
72
return
name;
73
}
74
};
75
76
78
struct
AuxStore_traits_NoAuxDefault
79
{
80
typedef
std::false_type
flag
;
81
82
typedef
NoAuxStore
type
;
83
static
const
std::string&
typeName
()
84
{
85
static
const
std::string name (
"SG::NoAuxStore"
);
86
return
name;
87
}
88
89
typedef
NoAuxStore
const_type
;
90
static
const
std::string&
const_typeName
()
91
{
92
static
const
std::string name (
"SG::NoAuxStore"
);
93
return
name;
94
}
95
};
96
97
100
template
<
class
DOBJ,
class
FLAG_>
101
struct
AuxStore_traits1
102
{
103
typedef
typename
std::conditional<
104
std::is_base_of<IAuxElement, DOBJ>::value,
105
AuxStore_traits_AuxDefault
,
106
AuxStore_traits_NoAuxDefault
>
::type
107
type
;
108
};
109
110
119
template
<
class
DOBJ>
120
struct
AuxStore_traits1
<DOBJ,
121
typename
std
::is_base_of<
122
IAuxElement, typename DOBJ::base_value_type>
::type
>
123
{
124
typedef
AuxStore_traits_AuxDefault
type
;
125
};
126
127
135
template
<
class
DOBJ>
136
struct
AuxStore_traits
137
:
public
AuxStore_traits1
<DOBJ, std::true_type>
::type
138
{
145
};
146
147
153
template
<
class
DOBJ>
154
struct
AuxStore_traits
<DOBJ*> :
public
AuxStore_traits<DOBJ>
{};
155
156
157
158
}
// namespace SG
159
160
161
#endif
// not ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
IAuxElement.h
Flag that a class may have auxiliary data associated with it.
IAuxStore.h
Interface for non-const operations on an auxiliary store.
IConstAuxStore.h
Interface for const operations on an auxiliary store.
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition
IAuxStore.h:51
SG::NoAuxStore
Mark that there's no associated AuxStore class.
Definition
AuxStore_traits.h:53
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
std
STL namespace.
SG::AuxStore_traits1< DOBJ, typename std::is_base_of< IAuxElement, typename DOBJ::base_value_type >::type >::type
AuxStore_traits_AuxDefault type
Definition
AuxStore_traits.h:124
SG::AuxStore_traits1
Helper for the case where DOBJ::base_value_type does not derive from SG::IAuxElement.
Definition
AuxStore_traits.h:102
SG::AuxStore_traits1::type
std::conditional< std::is_base_of< IAuxElement, DOBJ >::value, AuxStore_traits_AuxDefault, AuxStore_traits_NoAuxDefault >::type type
Definition
AuxStore_traits.h:107
SG::AuxStore_traits_AuxDefault
Default traits values for aux data case.
Definition
AuxStore_traits.h:58
SG::AuxStore_traits_AuxDefault::const_typeName
static const std::string & const_typeName()
Definition
AuxStore_traits.h:69
SG::AuxStore_traits_AuxDefault::flag
std::true_type flag
Definition
AuxStore_traits.h:59
SG::AuxStore_traits_AuxDefault::typeName
static const std::string & typeName()
Definition
AuxStore_traits.h:62
SG::AuxStore_traits_AuxDefault::type
IAuxStore type
Definition
AuxStore_traits.h:61
SG::AuxStore_traits_AuxDefault::const_type
IConstAuxStore const_type
Definition
AuxStore_traits.h:68
SG::AuxStore_traits_NoAuxDefault
Default traits values for no-aux data case.
Definition
AuxStore_traits.h:79
SG::AuxStore_traits_NoAuxDefault::const_typeName
static const std::string & const_typeName()
Definition
AuxStore_traits.h:90
SG::AuxStore_traits_NoAuxDefault::typeName
static const std::string & typeName()
Definition
AuxStore_traits.h:83
SG::AuxStore_traits_NoAuxDefault::flag
std::false_type flag
Definition
AuxStore_traits.h:80
SG::AuxStore_traits_NoAuxDefault::type
NoAuxStore type
Definition
AuxStore_traits.h:82
SG::AuxStore_traits_NoAuxDefault::const_type
NoAuxStore const_type
Definition
AuxStore_traits.h:89
SG::AuxStore_traits
Associate AuxStore classes with EDM container classes (default implementation).
Definition
AuxStore_traits.h:138
SG::type
Generated on
for ATLAS Offline Software by
1.17.0