linear_hierarchy.h
Go to the documentation of this file.
1 
10 #pragma once
12 
13 namespace illumina { namespace interop { namespace hierarchy
14 {
16  template<
17  class TypeList,
18  template<class AtomicType, class BaseType> class Base,
19  class Root=null_type
20  >
22 
27  template<
28  class T1,
29  class T2,
30  template<class, class> class Base,
31  class Root
32  >
33  class linear_hierarchy< type_list<T1,T2>, Base, Root > : public Base<T1, linear_hierarchy<T2, Base, Root> >
34  {
35  protected:
37  typedef Base<T1, linear_hierarchy<T2, Base, Root> > base_t;
38  };
39 
44  template<
45  class T,
46  template<class, class> class Base,
47  class Root
48  >
49  class linear_hierarchy<type_list<T,null_type>, Base, Root> : public Base<T, Root>
50  {
51  protected:
53  typedef Base<T, Root> base_t;
54  };
55 
60  template<
61  template<class, class> class Base,
62  class Root
63  >
64  class linear_hierarchy<null_type, Base, Root> : public Root
65  {
66  protected:
68  typedef Root base_t;
69  };
70 
71 
73  template<
74  class T,
75  class TypeList,
76  template<class AtomicType, class BaseType> class Base,
77  class Root=null_type
78  >
79  struct base_at;
84  template<
85  class T,
86  class T1,
87  class T2,
88  template<class, class> class Base,
89  class Root
90  >
91  struct base_at< T, type_list<T1,T2>, Base, Root >
92  {
95  };
100  template<
101  class T1,
102  class T2,
103  template<class, class> class Base,
104  class Root
105  >
106  struct base_at< T1, type_list<T1,T2>, Base, Root >
107  {
109  typedef Base<T1, linear_hierarchy<T2, Base, Root> > result_t;
110  };
115  template<
116  class T1,
117  template<class, class> class Base,
118  class Root
119  >
120  struct base_at< T1, type_list<T1,null_type>, Base, Root >
121  {
123  typedef Base<T1, Root > result_t;
124  };
125 
126 
127 }}}
128 
Definition: enum_description.h:15
Definition: type_traits.h:20
Definition: linear_hierarchy.h:21
Base< T1, linear_hierarchy< T2, Base, Root > > base_t
Definition: linear_hierarchy.h:37
Definition: enums.h:301
Base< T1, linear_hierarchy< T2, Base, Root > > result_t
Definition: linear_hierarchy.h:109
base_at< T, T2, Base, Root >::result_t result_t
Definition: linear_hierarchy.h:94
Definition: type_traits.h:16
Definition: linear_hierarchy.h:79