24 #ifndef PPL_Og_Status_inlines_hh
25 #define PPL_Og_Status_inlines_hh 1
38 : flags(ZERO_DIM_UNIV) {
44 return (flags & mask) == mask;
50 return (flags & mask) != 0;
68 return flags == ZERO_DIM_UNIV;
75 if (flags == ZERO_DIM_UNIV) {
85 flags = ZERO_DIM_UNIV;
91 return test_any(
EMPTY);
100 template <
typename T>
106 template <
typename T>
109 return test_any(STRONGLY_CLOSED);
112 template <
typename T>
115 reset(STRONGLY_CLOSED);
118 template <
typename T>
121 set(STRONGLY_CLOSED);
124 template <
typename T>
127 if (test_zero_dim_univ()) {
140 std::cerr <<
"The empty flag is incompatible with any other one."
152 namespace Implementation {
154 namespace Octagonal_Shapes {
157 extern const char*
empty;
171 get_field(std::istream& s,
const char* keyword,
bool& positive) {
174 || (str[0] != yes && str[0] != no)
175 || str.substr(1) != keyword) {
178 positive = (str[0] ==
yes);
186 template <
typename T>
189 using namespace Implementation::Octagonal_Shapes;
199 template <
typename T>
202 using namespace Implementation::Octagonal_Shapes;
212 if (!get_field(s,
empty, positive)) {
236 #endif // !defined(PPL_Og_Status_inlines_hh)
const char * strong_closed
bool OK() const
Checks if all the invariants are satisfied.
The empty element, i.e., the empty set.
Status()
By default Status is the zero-dim universe assertion.
void reset(flags_t mask)
Reset the bits in mask.
bool test_all(flags_t mask) const
Check whether all bits in mask are set.
const char * zero_dim_univ
void set(flags_t mask)
Set the bits in mask.
bool OK() const
Checks if all the invariants are satisfied.
void reset_strongly_closed()
A conjunctive assertion about a Octagonal_Shape object.
void set_strongly_closed()
Marks *this as strongly closed.
void ascii_dump(std::ostream &s) const
Writes to s an ASCII representation of the internal representation of *this.
void set_strongly_closed()
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
void reset_zero_dim_univ()
The entire library is confined to this namespace.
unsigned int flags_t
Status is implemented by means of a finite bitset.
bool test_strongly_closed() const
bool get_field(std::istream &s, const char *keyword, bool &positive)
void set_zero_dim_univ()
Turns *this into a zero-dimensional universe OS.
void reset_strongly_closed()
Marks *this as possibly not strongly closed.
void set_empty()
Turns *this into an empty OS.
#define PPL_UNINITIALIZED(type, name)
bool test_zero_dim_univ() const
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...