Go to the documentation of this file.
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>
141 template<
typename TA,
int from,
int to>
144 return from<=item && item<=to;
147 template<
typename TA,
int from,
int 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>
168 template<
class TI1,
class TI2,
class T>
171 return os << TI1()<<
" "<<TI2();
TA Type
The type the set holds.
Definition: enumset.hh:65
static bool contains(const TA &item)
Definition: enumset.hh:154
S::Type Type
Definition: enumset.hh:97
Combine< TI1, TI2, typename TI1::Type > combine(const TI1 &set1, const TI2 &set2)
Definition: enumset.hh:161
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
A set containing everything.
Definition: enumset.hh:42
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentionally unused function parameters with.
Definition: unused.hh:25
static bool contains(const Type &attribute)
Always returns false.
Definition: enumset.hh:116
static bool contains(const Type &attribute)
Always returns true.
Definition: enumset.hh:123
std::ostream & operator<<(std::ostream &s, const bigunsignedint< k > &x)
Definition: bigunsignedint.hh:273
A set representing a range including the borders.
Definition: enumset.hh:78
static bool contains(const Type &attribute)
Tests whether an item is in the set.
Definition: enumset.hh:130
A set combining two other sets.
Definition: enumset.hh:109
A set consisting only of one item.
Definition: enumset.hh:59
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
An empty set.
Definition: enumset.hh:25
TA Type
The POD type the set holds.
Definition: enumset.hh:31
TA Type
The POD type the set holds.
Definition: enumset.hh:48
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 &item)
Definition: enumset.hh:142
Dune namespace.
Definition: alignedallocator.hh:13