3 #ifndef DUNE_ENUMSET_HH
4 #define DUNE_ENUMSET_HH
58 template<
typename TA,
int item>
77 template<
typename TA,
int from,
int end>
97 typedef typename S::Type
Type;
108 template<
class TI1,
class TI2,
typename TA=
typename TI1::Type>
112 static bool contains(
const TA& item);
115 template<
typename TA>
122 template<
typename TA>
129 template<
typename TA,
int i>
135 template<
typename TA,
int i>
136 inline std::ostream& operator<<(std::ostream& os, const EnumItem<TA,i>&)
141 template<
typename TA,
int from,
int to>
144 return from<=item && item<=to;
147 template<
typename TA,
int from,
int to>
148 inline std::ostream& operator<<(std::ostream& os, const EnumRange<TA,from,to>&)
150 return os<<
"["<<from<<
" - "<<to<<
"]";
153 template<
class TI1,
class TI2,
typename TA>
156 return TI1::contains(item) ||
160 template<
class TI1,
class TI2>
166 template<
class TI1,
class TI2,
class T>
167 inline std::ostream& operator<<(std::ostream& os, const Combine<TI1,TI2,T>&)
169 return os << TI1()<<
" "<<TI2();