CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
moduleAbilities.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_moduleAbilities_h
2 #define FWCore_Framework_moduleAbilities_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : moduleAbilities
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Tue, 07 May 2013 19:19:53 GMT
19 //
20 
21 // system include files
22 #include <type_traits>
23 
24 // user include files
26 
27 // forward declarations
28 
29 namespace edm {
30  namespace module {
31  //Used in the case where ability is not available
32  struct Empty{};
33  }
34 
35  template<typename T>
36  struct GlobalCache {
38  typedef T Type;
39  };
40 
41  template<typename T>
42  struct StreamCache {
44  typedef T Type;
45  };
46 
47  template<typename T>
48  struct RunCache {
50  typedef T Type;
51  };
52 
53  template<typename T>
56  typedef T Type;
57  };
58 
59  template<typename T>
60  struct RunSummaryCache {
62  typedef T Type;
63  };
64 
65  template<typename T>
68  typedef T Type;
69  };
70 
74  };
75 
76  struct EndRunProducer {
79  };
80 
84  };
85 
89  };
90 
91  struct WatchInputFiles {
94  };
95 
96  //Recursively checks VArgs template arguments looking for the ABILITY
97  template<module::Abilities ABILITY, typename... VArgs> struct CheckAbility;
98 
99  template<module::Abilities ABILITY, typename T, typename... VArgs>
100  struct CheckAbility<ABILITY,T,VArgs...> {
101  static constexpr bool kHasIt = (T::kAbilities==ABILITY) | CheckAbility<ABILITY,VArgs...>::kHasIt;
102  typedef std::conditional_t<(T::kAbilities==ABILITY),
103  typename T::Type,
105  };
106 
107  //End of the recursion
108  template<module::Abilities ABILITY>
109  struct CheckAbility<ABILITY> {
110  static constexpr bool kHasIt=false;
112  };
113 
114 }
115 
116 #endif
static constexpr module::Abilities kAbilities
module::Empty Type
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
std::conditional_t<(T::kAbilities==ABILITY), typename T::Type, typename CheckAbility< ABILITY, VArgs...>::Type > Type
#define constexpr
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
static constexpr module::Abilities kAbilities
long double T
Definition: vlib.h:208