24 #ifndef PPL_Box_Status_inlines_hh
25 #define PPL_Box_Status_inlines_hh 1
31 template <
typename ITV>
37 template <
typename ITV>
43 template <
typename ITV>
44 template <
typename Other_ITV>
50 template <
typename ITV>
56 template <
typename ITV>
59 return (flags & mask) == mask;
62 template <
typename ITV>
65 return (flags & mask) != 0;
68 template <
typename ITV>
74 template <
typename ITV>
80 template <
typename ITV>
83 return test_any(EMPTY_UP_TO_DATE);
86 template <
typename ITV>
89 reset(EMPTY_UP_TO_DATE);
92 template <
typename ITV>
95 set(EMPTY_UP_TO_DATE);
98 template <
typename ITV>
101 return test_any(
EMPTY);
104 template <
typename ITV>
110 template <
typename ITV>
116 template <
typename ITV>
122 template <
typename ITV>
128 template <
typename ITV>
134 template <
typename ITV>
137 if (test_empty_up_to_date()
139 && test_universe()) {
142 <<
"The status asserts emptiness and universality at the same time."
153 namespace Implementation {
159 extern const char*
empty;
173 get_field(std::istream& s,
const char* keyword,
bool& positive) {
176 || (str[0] != yes && str[0] != no)
177 || str.substr(1) != keyword) {
180 positive = (str[0] ==
yes);
188 template <
typename ITV>
191 using namespace Implementation::Boxes;
199 template <typename ITV>
202 using namespace Implementation::Boxes;
218 if (!get_field(s,
universe, positive)) {
235 #endif // !defined(PPL_Box_Status_inlines_hh)
The empty element, i.e., the empty set.
void set(flags_t mask)
Set the bits in mask.
void set_empty_up_to_date()
void ascii_dump() const
Writes to std::cerr an ASCII representation of *this.
The standard C++ namespace.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
void reset(flags_t mask)
Reset the bits in mask.
const char * empty_up_to_date
#define PPL_OUTPUT_TEMPLATE_DEFINITIONS_ASCII_ONLY(type_symbol, class_prefix)
bool get_field(std::istream &s, const char *keyword, bool &positive)
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool OK() const
Checks if all the invariants are satisfied.
bool test_all(flags_t mask) const
Check whether all bits in mask are set.
A not necessarily closed, iso-oriented hyperrectangle.
bool test_universe() const
unsigned int flags_t
Status is implemented by means of a finite bitset.
The universe element, i.e., the whole vector space.
The entire library is confined to this namespace.
bool test_empty_up_to_date() const
void set_empty_up_to_date()
Asserts the validity of the empty flag of *this.
void reset_empty_up_to_date()
#define PPL_UNINITIALIZED(type, name)
bool OK() const
Returns true if and only if *this satisfies all its invariants.
Status()
By default Status is the empty set of assertion.
void set_empty()
Causes the box to become empty, i.e., to represent the empty set.