ProductTypeIDs.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Common_detail_ProductTypeIDs_h
2 #define canvas_Persistency_Common_detail_ProductTypeIDs_h
3 
5 
6 namespace art::detail {
7  template <typename T>
8  inline auto
10  {
11  return TypeID{typeid(art::Wrapper<T>)};
12  }
13 
14  template <typename T>
15  struct ProductTypeIDs {
16  static product_typeids_t
17  get()
18  {
19  return {{product_metatype::Normal, wrapperTypeID<T>()}};
20  }
21  };
22 
23  template <typename L, typename R>
24  struct ProductTypeIDs<Assns<L, R, void>> {
26  using RL_t = typename LR_t::partner_t;
27  static product_typeids_t
28  get()
29  {
30  return {{product_metatype::LeftRight, wrapperTypeID<LR_t>()},
31  {product_metatype::RightLeft, wrapperTypeID<RL_t>()}};
32  }
33  };
34 
35  template <typename L, typename R, typename D>
36  struct ProductTypeIDs<Assns<L, R, D>> {
38  using RL_t = typename LR_t::partner_t;
40  using RLD_t = typename LRD_t::partner_t;
41  static product_typeids_t
42  get()
43  {
44  return {{product_metatype::LeftRight, wrapperTypeID<LR_t>()},
45  {product_metatype::RightLeft, wrapperTypeID<RL_t>()},
46  {product_metatype::LeftRightData, wrapperTypeID<LRD_t>()},
47  {product_metatype::RightLeftData, wrapperTypeID<RLD_t>()}};
48  }
49  };
50 }
51 #endif /* canvas_Persistency_Common_detail_ProductTypeIDs_h */
52 
53 // Local Variables:
54 // mode: c++
55 // End:
std::map< product_metatype, TypeID > product_typeids_t
Definition: fwd.h:43
auto wrapperTypeID()
Definition: ProductTypeIDs.h:9