PPL
1.2
|
A conjunctive assertion about a BD_Shape<T> object. More...
Public Member Functions | |
Status () | |
By default Status is the zero-dim universe assertion. More... | |
bool | OK () const |
Checks if all the invariants are satisfied. More... | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . More... | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . More... | |
void | print () const |
Prints *this to std::cerr using operator<< . More... | |
bool | ascii_load (std::istream &s) |
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this accordingly. Returns true if successful, false otherwise. More... | |
Test, remove or add an individual assertion from the conjunction. | |
bool | test_zero_dim_univ () const |
void | reset_zero_dim_univ () |
void | set_zero_dim_univ () |
bool | test_empty () const |
void | reset_empty () |
void | set_empty () |
bool | test_shortest_path_closed () const |
void | reset_shortest_path_closed () |
void | set_shortest_path_closed () |
bool | test_shortest_path_reduced () const |
void | reset_shortest_path_reduced () |
void | set_shortest_path_reduced () |
Private Types | |
typedef unsigned int | flags_t |
Status is implemented by means of a finite bitset. More... | |
Private Member Functions | |
Status (flags_t mask) | |
Construct from a bit-mask. More... | |
bool | test_all (flags_t mask) const |
Check whether all bits in mask are set. More... | |
bool | test_any (flags_t mask) const |
Check whether at least one bit in mask is set. More... | |
void | set (flags_t mask) |
Set the bits in mask . More... | |
void | reset (flags_t mask) |
Reset the bits in mask . More... | |
Private Attributes | |
flags_t | flags |
This holds the current bitset. More... | |
Static Private Attributes | |
Bit-masks for the individual assertions. | |
static const flags_t | ZERO_DIM_UNIV = 0U |
static const flags_t | EMPTY = 1U << 0 |
static const flags_t | SHORTEST_PATH_CLOSED = 1U << 1 |
static const flags_t | SHORTEST_PATH_REDUCED = 1U << 2 |
Related Functions | |
(Note that these are not member functions.) | |
bool | get_field (std::istream &s, const char *keyword, bool &positive) |
A conjunctive assertion about a BD_Shape<T> object.
The assertions supported are:
Not all the conjunctions of these elementary assertions constitute a legal Status. In fact:
Definition at line 51 of file BD_Shape_defs.hh.
|
private |
Status is implemented by means of a finite bitset.
Definition at line 89 of file BD_Shape_defs.hh.
|
inline |
By default Status is the zero-dim universe assertion.
Definition at line 37 of file BDS_Status_inlines.hh.
|
inlineprivate |
Construct from a bit-mask.
Definition at line 31 of file BDS_Status_inlines.hh.
void Parma_Polyhedra_Library::BD_Shape< T >::Status::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
void Parma_Polyhedra_Library::BD_Shape< T >::Status::ascii_dump | ( | std::ostream & | s | ) | const |
Writes to s
an ASCII representation of *this
.
Definition at line 225 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::Implementation::BD_Shapes::empty, Parma_Polyhedra_Library::Implementation::BD_Shapes::no, Parma_Polyhedra_Library::Implementation::BD_Shapes::separator, Parma_Polyhedra_Library::Implementation::BD_Shapes::sp_closed, Parma_Polyhedra_Library::Implementation::BD_Shapes::sp_reduced, Parma_Polyhedra_Library::Implementation::BD_Shapes::yes, and Parma_Polyhedra_Library::Implementation::BD_Shapes::zero_dim_univ.
bool Parma_Polyhedra_Library::BD_Shape< T >::Status::ascii_load | ( | std::istream & | s | ) |
Loads from s
an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this
accordingly. Returns true
if successful, false
otherwise.
Definition at line 238 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::Implementation::BD_Shapes::empty, Parma_Polyhedra_Library::BD_Shape< T >::OK(), PPL_UNINITIALIZED, Parma_Polyhedra_Library::BD_Shape< T >::reset_shortest_path_closed(), Parma_Polyhedra_Library::BD_Shape< T >::reset_shortest_path_reduced(), Parma_Polyhedra_Library::BD_Shape< T >::set_empty(), Parma_Polyhedra_Library::BD_Shape< T >::set_shortest_path_closed(), Parma_Polyhedra_Library::BD_Shape< T >::set_shortest_path_reduced(), Parma_Polyhedra_Library::BD_Shape< T >::set_zero_dim_univ(), Parma_Polyhedra_Library::Implementation::BD_Shapes::sp_closed, Parma_Polyhedra_Library::Implementation::BD_Shapes::sp_reduced, and Parma_Polyhedra_Library::Implementation::BD_Shapes::zero_dim_univ.
bool Parma_Polyhedra_Library::BD_Shape< T >::Status::OK | ( | ) | const |
Checks if all the invariants are satisfied.
Definition at line 146 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::BD_Shape< T >::Status::reset_empty(), and Parma_Polyhedra_Library::BD_Shape< T >::Status::test_zero_dim_univ().
void Parma_Polyhedra_Library::BD_Shape< T >::Status::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
|
inlineprivate |
Reset the bits in mask
.
Definition at line 61 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 96 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::EMPTY.
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::Status::OK().
|
inline |
Definition at line 114 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 133 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 73 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::EMPTY.
|
inlineprivate |
Set the bits in mask
.
Definition at line 55 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 102 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::EMPTY.
|
inline |
Definition at line 121 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 139 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 83 of file BDS_Status_inlines.hh.
|
inlineprivate |
Check whether all bits in mask
are set.
Definition at line 43 of file BDS_Status_inlines.hh.
|
inlineprivate |
Check whether at least one bit in mask
is set.
Definition at line 49 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 90 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::EMPTY.
|
inline |
Definition at line 108 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 127 of file BDS_Status_inlines.hh.
|
inline |
Definition at line 67 of file BDS_Status_inlines.hh.
Referenced by Parma_Polyhedra_Library::BD_Shape< T >::Status::OK().
|
related |
Reads a keyword and its associated on/off flag from s
. Returns true
if the operation is successful, returns false
otherwise. When successful, positive
is set to true
if the flag is on; it is set to false
otherwise.
Definition at line 208 of file BDS_Status_inlines.hh.
References Parma_Polyhedra_Library::Implementation::BD_Shapes::yes.
Referenced by Parma_Polyhedra_Library::Grid::Status::ascii_load(), and Parma_Polyhedra_Library::Polyhedron::Status::ascii_load().
|
staticprivate |
Definition at line 94 of file BD_Shape_defs.hh.
|
private |
This holds the current bitset.
Definition at line 100 of file BD_Shape_defs.hh.
|
staticprivate |
Definition at line 95 of file BD_Shape_defs.hh.
|
staticprivate |
Definition at line 96 of file BD_Shape_defs.hh.
|
staticprivate |
Definition at line 93 of file BD_Shape_defs.hh.