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;
101 return !S::contains(item);
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();
static bool contains(const Type &attribute)
Always returns false.
Definition: enumset.hh:116
A set consisting only of one item.
Definition: enumset.hh:59
static bool contains(const Type &item)
Definition: enumset.hh:142
TA Type
The POD type the set holds.
Definition: enumset.hh:48
TA Type
The type the set holds.
Definition: enumset.hh:65
static bool contains(const TA &item)
Definition: enumset.hh:154
Combine< TI1, TI2, typename TI1::Type > combine(const TI1 &set1, const TI2 &set2)
Definition: enumset.hh:161
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentional unused function parameters with.
Definition: unused.hh:18
TA Type
The type the set holds.
Definition: enumset.hh:84
static bool contains(const Type &item)
Definition: enumset.hh:99
static bool contains(const Type &attribute)
Tests whether an item is in the set.
Definition: enumset.hh:130
The negation of a set. An item is contained in the set if and only if it is not contained in the nega...
Definition: enumset.hh:94
TA Type
The POD type the set holds.
Definition: enumset.hh:31
S::Type Type
Definition: enumset.hh:97
A set containing everything.
Definition: enumset.hh:42
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
static bool contains(const Type &attribute)
Always returns false.
Definition: enumset.hh:123
A set combining two other sets.
Definition: enumset.hh:109
An empty set.
Definition: enumset.hh:25
A set representing a range including the borders.
Definition: enumset.hh:78