1 #ifndef DUNE_ENUMSET_HH
2 #define DUNE_ENUMSET_HH
55 template<
typename TA,
int item>
74 template<
typename TA,
int from,
int end>
94 typedef typename S::Type
Type;
105 template<
class TI1,
class TI2,
typename TA=
typename TI1::Type>
109 static bool contains(
const TA& item);
112 template<
typename TA>
118 template<
typename TA>
124 template<
typename TA,
int i>
130 template<
typename TA,
int i>
131 inline std::ostream& operator<<(std::ostream& os, const EnumItem<TA,i>&)
136 template<
typename TA,
int from,
int to>
139 return from<=item && item<=to;
142 template<
typename TA,
int from,
int to>
143 inline std::ostream& operator<<(std::ostream& os, const EnumRange<TA,from,to>&)
145 return os<<
"["<<from<<
" - "<<to<<
"]";
148 template<
class TI1,
class TI2,
typename TA>
151 return TI1::contains(item) ||
155 template<
class TI1,
class TI2>
161 template<
class TI1,
class TI2,
class T>
162 inline std::ostream& operator<<(std::ostream& os, const Combine<TI1,TI2,T>&)
164 return os << TI1()<<
" "<<TI2();