ATLAS Offline Software
Loading...
Searching...
No Matches
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
40
41
42# include <type_traits>
43#include <string>
44
45
46
47namespace SG {
48
49
53class NoAuxStore {};
54
55
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
69 static const std::string& const_typeName()
70 {
71 static const std::string name ("SG::IConstAuxStore");
72 return name;
73 }
74};
75
76
79{
80 typedef std::false_type flag;
81
83 static const std::string& typeName()
84 {
85 static const std::string name ("SG::NoAuxStore");
86 return name;
87 }
88
90 static const std::string& const_typeName()
91 {
92 static const std::string name ("SG::NoAuxStore");
93 return name;
94 }
95};
96
97
100template <class DOBJ, class FLAG_>
102{
103 typedef typename std::conditional<
104 std::is_base_of<IAuxElement, DOBJ>::value,
108};
109
110
119template <class DOBJ>
121 typename std::is_base_of<
122 IAuxElement, typename DOBJ::base_value_type>::type>
123{
125};
126
127
135template <class DOBJ>
137 : public AuxStore_traits1<DOBJ, std::true_type>::type
138{
145};
146
147
153template <class DOBJ>
154struct AuxStore_traits<DOBJ*> : public AuxStore_traits<DOBJ> {};
155
156
157
158} // namespace SG
159
160
161#endif // not ATHCONTAINERSINTERFACES_AUXSTORE_TRAITS_H
Flag that a class may have auxiliary data associated with it.
Interface for non-const operations on an auxiliary store.
Interface for const operations on an auxiliary store.
Interface for non-const operations on an auxiliary store.
Definition IAuxStore.h:48
Interface for const operations on an auxiliary store.
Mark that there's no associated AuxStore class.
Forward declaration.
STL namespace.
Helper for the case where DOBJ::base_value_type does not derive from SG::IAuxElement.
std::conditional< std::is_base_of< IAuxElement, DOBJ >::value, AuxStore_traits_AuxDefault, AuxStore_traits_NoAuxDefault >::type type
Default traits values for aux data case.
static const std::string & const_typeName()
static const std::string & typeName()
Default traits values for no-aux data case.
static const std::string & const_typeName()
static const std::string & typeName()
Associate AuxStore classes with EDM container classes (default implementation).