PPL  1.2
Parma_Polyhedra_Library::Grid::Status Class Reference

A conjunctive assertion about a grid. 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_c_up_to_date () const
 
void reset_c_up_to_date ()
 
void set_c_up_to_date ()
 
bool test_g_up_to_date () const
 
void reset_g_up_to_date ()
 
void set_g_up_to_date ()
 
bool test_c_minimized () const
 
void reset_c_minimized ()
 
void set_c_minimized ()
 
bool test_g_minimized () const
 
void reset_g_minimized ()
 
void set_g_minimized ()
 
bool test_sat_c_up_to_date () const
 
void reset_sat_c_up_to_date ()
 
void set_sat_c_up_to_date ()
 
bool test_sat_g_up_to_date () const
 
void reset_sat_g_up_to_date ()
 
void set_sat_g_up_to_date ()
 
bool test_c_pending () const
 
void reset_c_pending ()
 
void set_c_pending ()
 
bool test_g_pending () const
 
void reset_g_pending ()
 
void set_g_pending ()
 

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 bitmask. 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

Bitmasks for the individual assertions
static const flags_t ZERO_DIM_UNIV = 0U
 
static const flags_t EMPTY = 1U << 0
 
static const flags_t C_UP_TO_DATE = 1U << 1
 
static const flags_t G_UP_TO_DATE = 1U << 2
 
static const flags_t C_MINIMIZED = 1U << 3
 
static const flags_t G_MINIMIZED = 1U << 4
 
static const flags_t SAT_C_UP_TO_DATE = 1U << 5
 
static const flags_t SAT_G_UP_TO_DATE = 1U << 6
 
static const flags_t CS_PENDING = 1U << 7
 
static const flags_t GS_PENDING = 1U << 8
 

Related Functions

(Note that these are not member functions.)

bool get_field (std::istream &s, const char *keyword, bool &positive)
 

Detailed Description

A conjunctive assertion about a grid.

The assertions supported that are in use are:

  • zero-dim universe: the grid is the zero-dimension vector space $\Rset^0 = \{\cdot\}$;
  • empty: the grid is the empty set;
  • congruences up-to-date: the grid is correctly characterized by the attached system of congruences, modulo the processing of pending generators;
  • generators up-to-date: the grid is correctly characterized by the attached system of generators, modulo the processing of pending congruences;
  • congruences minimized: the non-pending part of the system of congruences attached to the grid is in minimal form;
  • generators minimized: the non-pending part of the system of generators attached to the grid is in minimal form.

Other supported assertions are:

  • congruences pending
  • generators pending
  • congruences' saturation matrix up-to-date
  • generators' saturation matrix up-to-date.

Not all the conjunctions of these elementary assertions constitute a legal Status. In fact:

  • zero-dim universe excludes any other assertion;
  • empty: excludes any other assertion;
  • congruences pending and generators pending are mutually exclusive;
  • congruences pending implies both congruences minimized and generators minimized;
  • generators pending implies both congruences minimized and generators minimized;
  • congruences minimized implies congruences up-to-date;
  • generators minimized implies generators up-to-date;
  • congruences' saturation matrix up-to-date implies both congruences up-to-date and generators up-to-date;
  • generators' saturation matrix up-to-date implies both congruences up-to-date and generators up-to-date.

Definition at line 72 of file Grid_defs.hh.

Member Typedef Documentation

typedef unsigned int Parma_Polyhedra_Library::Grid::Status::flags_t
private

Status is implemented by means of a finite bitset.

Definition at line 134 of file Grid_defs.hh.

Constructor & Destructor Documentation

Parma_Polyhedra_Library::Grid::Status::Status ( )
inline

By default Status is the zero-dim universe assertion.

Definition at line 35 of file Grid_Status_inlines.hh.

36  : flags(ZERO_DIM_UNIV) {
37 }
static const flags_t ZERO_DIM_UNIV
Definition: Grid_defs.hh:138
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
Parma_Polyhedra_Library::Grid::Status::Status ( flags_t  mask)
inlineprivate

Construct from a bitmask.

Definition at line 30 of file Grid_Status_inlines.hh.

31  : flags(mask) {
32 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151

Member Function Documentation

void Parma_Polyhedra_Library::Grid::Status::ascii_dump ( ) const

Writes to std::cerr an ASCII representation of *this.

void Parma_Polyhedra_Library::Grid::Status::ascii_dump ( std::ostream &  s) const

Writes to s an ASCII representation of *this.

Definition at line 68 of file Grid_Status.cc.

References Parma_Polyhedra_Library::Implementation::BD_Shapes::empty, and Parma_Polyhedra_Library::Implementation::BD_Shapes::zero_dim_univ.

68  {
69  s << (test_zero_dim_univ() ? '+' : '-') << zero_dim_univ << ' '
70  << (test_empty() ? '+' : '-') << empty << ' '
71  << ' '
72  << (test_c_minimized() ? '+' : '-') << consys_min << ' '
73  << (test_g_minimized() ? '+' : '-') << gensys_min << ' '
74  << ' '
75  << (test_c_up_to_date() ? '+' : '-') << consys_upd << ' '
76  << (test_g_up_to_date() ? '+' : '-') << gensys_upd << ' '
77  << ' '
78  << (test_c_pending() ? '+' : '-') << consys_pending << ' '
79  << (test_g_pending() ? '+' : '-') << gensys_pending << ' '
80  << ' '
81  << (test_sat_c_up_to_date() ? '+' : '-') << satc_upd << ' '
82  << (test_sat_g_up_to_date() ? '+' : '-') << satg_upd
83  << std::endl;
84 }
bool Parma_Polyhedra_Library::Grid::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 89 of file Grid_Status.cc.

References Parma_Polyhedra_Library::Implementation::BD_Shapes::empty, Parma_Polyhedra_Library::BD_Shape< T >::Status::get_field(), PPL_UNINITIALIZED, and Parma_Polyhedra_Library::Implementation::BD_Shapes::zero_dim_univ.

89  {
90  PPL_UNINITIALIZED(bool, positive);
91 
92  if (!get_field(s, zero_dim_univ, positive)) {
93  return false;
94  }
95  if (positive) {
97  }
98 
99  if (!get_field(s, empty, positive)) {
100  return false;
101  }
102  if (positive) {
103  set_empty();
104  }
105 
106  if (!get_field(s, consys_min, positive)) {
107  return false;
108  }
109  if (positive) {
110  set_c_minimized();
111  }
112  else {
114  }
115 
116  if (!get_field(s, gensys_min, positive)) {
117  return false;
118  }
119 
120  if (positive) {
121  set_g_minimized();
122  }
123  else {
125  }
126 
127  if (!get_field(s, consys_upd, positive)) {
128  return false;
129  }
130 
131  if (positive) {
133  }
134  else {
136  }
137 
138  if (!get_field(s, gensys_upd, positive)) {
139  return false;
140  }
141  if (positive) {
143  }
144  else {
146  }
147 
148  if (!get_field(s, consys_pending, positive)) {
149  return false;
150  }
151  if (positive) {
152  set_c_pending();
153  }
154  else {
155  reset_c_pending();
156  }
157 
158  if (!get_field(s, gensys_pending, positive)) {
159  return false;
160  }
161  if (positive) {
162  set_g_pending();
163  }
164  else {
165  reset_g_pending();
166  }
167 
168  if (!get_field(s, satc_upd, positive)) {
169  return false;
170  }
171  if (positive) {
173  }
174  else {
176  }
177 
178  if (!get_field(s, satg_upd, positive)) {
179  return false;
180  }
181  if (positive) {
183  }
184  else {
186  }
187 
188  // Check invariants.
189  PPL_ASSERT(OK());
190  return true;
191 }
bool OK() const
Checks if all the invariants are satisfied.
Definition: Grid_Status.cc:194
bool get_field(std::istream &s, const char *keyword, bool &positive)
Definition: Grid_Status.cc:54
#define PPL_UNINITIALIZED(type, name)
Definition: compiler.hh:72
bool Parma_Polyhedra_Library::Grid::Status::OK ( ) const

Checks if all the invariants are satisfied.

Definition at line 194 of file Grid_Status.cc.

References Parma_Polyhedra_Library::Checked_Number< T, Policy >::ascii_dump(), reset_empty(), and test_zero_dim_univ().

194  {
195 #ifndef NDEBUG
196  using std::endl;
197  using std::cerr;
198 #endif
199 
200  if (test_zero_dim_univ()) {
201  // Zero-dim universe is OK.
202  return true;
203  }
204 
205  if (test_empty()) {
206  Status copy = *this;
207  copy.reset_empty();
208  if (copy.test_zero_dim_univ()) {
209  return true;
210  }
211 #ifndef NDEBUG
212  cerr << "The empty flag is incompatible with any other one."
213  << endl << "Flags:" << endl;
214  ascii_dump(cerr);
215 #endif
216  return false;
217  }
218 
220  && !(test_c_up_to_date() && test_g_up_to_date())) {
221 #ifndef NDEBUG
222  cerr <<
223  "If a saturation matrix is up-to-date, congruences and\n"
224  "generators have to be both up-to-date."
225  << endl;
226 #endif
227  return false;
228  }
229 
230  if (test_c_minimized() && !test_c_up_to_date()) {
231 #ifndef NDEBUG
232  cerr << "If congruences are minimized they must be up-to-date."
233  << endl;
234 #endif
235  return false;
236  }
237 
238  if (test_g_minimized() && !test_g_up_to_date()) {
239 #ifndef NDEBUG
240  cerr << "If generators are minimized they must be up-to-date."
241  << endl;
242 #endif
243  return false;
244  }
245 
246  if (test_c_pending() && test_g_pending()) {
247 #ifndef NDEBUG
248  cerr << "There cannot be both pending congruences and pending generators."
249  << endl;
250 #endif
251  return false;
252  }
253 
254  if (test_c_pending() || test_g_pending()) {
255  if (!test_c_minimized() || !test_g_minimized()) {
256 #ifndef NDEBUG
257  cerr <<
258  "If there are pending congruences or generators, congruences\n"
259  "and generators must be minimized."
260  << endl;
261 #endif
262  return false;
263  }
264 
266 #ifndef NDEBUG
267  cerr <<
268  "If there are pending congruences or generators, there must\n"
269  "be at least a saturation matrix up-to-date."
270  << endl;
271 #endif
272  return false;
273  }
274  }
275 
276  // Any other case is OK.
277  return true;
278 }
void ascii_dump() const
Writes to std::cerr an ASCII representation of *this.
Status()
By default Status is the zero-dim universe assertion.
void Parma_Polyhedra_Library::Grid::Status::print ( ) const

Prints *this to std::cerr using operator<<.

void Parma_Polyhedra_Library::Grid::Status::reset ( flags_t  mask)
inlineprivate

Reset the bits in mask.

Definition at line 55 of file Grid_Status_inlines.hh.

55  {
56  flags &= ~mask;
57 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
void Parma_Polyhedra_Library::Grid::Status::reset_c_minimized ( )
inline

Definition at line 130 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::clear_congruences_minimized().

130  {
132 }
void reset(flags_t mask)
Reset the bits in mask.
static const flags_t C_MINIMIZED
Definition: Grid_defs.hh:142
void Parma_Polyhedra_Library::Grid::Status::reset_c_pending ( )
inline

Definition at line 161 of file Grid_Status_inlines.hh.

161  {
162  reset(CS_PENDING);
163 }
void reset(flags_t mask)
Reset the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::reset_c_up_to_date ( )
inline

Definition at line 100 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::clear_congruences_up_to_date().

100  {
102 }
void reset(flags_t mask)
Reset the bits in mask.
static const flags_t C_UP_TO_DATE
Definition: Grid_defs.hh:140
void Parma_Polyhedra_Library::Grid::Status::reset_empty ( )
inline

Definition at line 85 of file Grid_Status_inlines.hh.

References Parma_Polyhedra_Library::EMPTY.

Referenced by Parma_Polyhedra_Library::Grid::clear_empty(), and OK().

85  {
86  reset(EMPTY);
87 }
void reset(flags_t mask)
Reset the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::reset_g_minimized ( )
inline

Definition at line 145 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::clear_generators_minimized().

145  {
147 }
static const flags_t G_MINIMIZED
Definition: Grid_defs.hh:143
void reset(flags_t mask)
Reset the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::reset_g_pending ( )
inline

Definition at line 176 of file Grid_Status_inlines.hh.

176  {
177  reset(GS_PENDING);
178 }
void reset(flags_t mask)
Reset the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::reset_g_up_to_date ( )
inline

Definition at line 115 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::clear_generators_up_to_date().

115  {
117 }
void reset(flags_t mask)
Reset the bits in mask.
static const flags_t G_UP_TO_DATE
Definition: Grid_defs.hh:141
void Parma_Polyhedra_Library::Grid::Status::reset_sat_c_up_to_date ( )
inline

Definition at line 192 of file Grid_Status_inlines.hh.

192  {
194 }
static const flags_t SAT_C_UP_TO_DATE
Definition: Grid_defs.hh:144
void reset(flags_t mask)
Reset the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::reset_sat_g_up_to_date ( )
inline

Definition at line 207 of file Grid_Status_inlines.hh.

207  {
209 }
void reset(flags_t mask)
Reset the bits in mask.
static const flags_t SAT_G_UP_TO_DATE
Definition: Grid_defs.hh:145
void Parma_Polyhedra_Library::Grid::Status::reset_zero_dim_univ ( )
inline

Definition at line 65 of file Grid_Status_inlines.hh.

References Parma_Polyhedra_Library::EMPTY.

65  {
66  // This is a no-op if the current status is not zero-dim.
67  if (flags == ZERO_DIM_UNIV) {
68  // In the zero-dim space, if it is not the universe it is empty.
69  flags = EMPTY;
70  }
71 }
static const flags_t ZERO_DIM_UNIV
Definition: Grid_defs.hh:138
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
void Parma_Polyhedra_Library::Grid::Status::set ( flags_t  mask)
inlineprivate

Set the bits in mask.

Definition at line 50 of file Grid_Status_inlines.hh.

50  {
51  flags |= mask;
52 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
void Parma_Polyhedra_Library::Grid::Status::set_c_minimized ( )
inline

Definition at line 135 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::set_congruences_minimized().

135  {
136  set(C_MINIMIZED);
137 }
void set(flags_t mask)
Set the bits in mask.
static const flags_t C_MINIMIZED
Definition: Grid_defs.hh:142
void Parma_Polyhedra_Library::Grid::Status::set_c_pending ( )
inline

Definition at line 166 of file Grid_Status_inlines.hh.

166  {
167  set(CS_PENDING);
168 }
void set(flags_t mask)
Set the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::set_c_up_to_date ( )
inline

Definition at line 105 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::set_congruences_up_to_date().

105  {
106  set(C_UP_TO_DATE);
107 }
void set(flags_t mask)
Set the bits in mask.
static const flags_t C_UP_TO_DATE
Definition: Grid_defs.hh:140
void Parma_Polyhedra_Library::Grid::Status::set_empty ( )
inline

Definition at line 90 of file Grid_Status_inlines.hh.

References Parma_Polyhedra_Library::EMPTY.

Referenced by Parma_Polyhedra_Library::Grid::construct(), and Parma_Polyhedra_Library::Grid::Grid().

90  {
91  flags = EMPTY;
92 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
void Parma_Polyhedra_Library::Grid::Status::set_g_minimized ( )
inline

Definition at line 150 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::set_generators_minimized().

150  {
151  set(G_MINIMIZED);
152 }
static const flags_t G_MINIMIZED
Definition: Grid_defs.hh:143
void set(flags_t mask)
Set the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::set_g_pending ( )
inline

Definition at line 181 of file Grid_Status_inlines.hh.

181  {
182  set(GS_PENDING);
183 }
void set(flags_t mask)
Set the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::set_g_up_to_date ( )
inline

Definition at line 120 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::set_generators_up_to_date().

120  {
121  set(G_UP_TO_DATE);
122 }
void set(flags_t mask)
Set the bits in mask.
static const flags_t G_UP_TO_DATE
Definition: Grid_defs.hh:141
void Parma_Polyhedra_Library::Grid::Status::set_sat_c_up_to_date ( )
inline

Definition at line 197 of file Grid_Status_inlines.hh.

197  {
199 }
static const flags_t SAT_C_UP_TO_DATE
Definition: Grid_defs.hh:144
void set(flags_t mask)
Set the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::set_sat_g_up_to_date ( )
inline

Definition at line 212 of file Grid_Status_inlines.hh.

212  {
214 }
static const flags_t SAT_G_UP_TO_DATE
Definition: Grid_defs.hh:145
void set(flags_t mask)
Set the bits in mask.
void Parma_Polyhedra_Library::Grid::Status::set_zero_dim_univ ( )
inline

Definition at line 74 of file Grid_Status_inlines.hh.

74  {
75  // Zero-dim universe is incompatible with anything else.
77 }
static const flags_t ZERO_DIM_UNIV
Definition: Grid_defs.hh:138
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
bool Parma_Polyhedra_Library::Grid::Status::test_all ( flags_t  mask) const
inlineprivate

Check whether all bits in mask are set.

Definition at line 40 of file Grid_Status_inlines.hh.

40  {
41  return (flags & mask) == mask;
42 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
bool Parma_Polyhedra_Library::Grid::Status::test_any ( flags_t  mask) const
inlineprivate

Check whether at least one bit in mask is set.

Definition at line 45 of file Grid_Status_inlines.hh.

45  {
46  return (flags & mask) != 0;
47 }
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151
bool Parma_Polyhedra_Library::Grid::Status::test_c_minimized ( ) const
inline

Definition at line 125 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::congruences_are_minimized().

125  {
126  return test_any(C_MINIMIZED);
127 }
static const flags_t C_MINIMIZED
Definition: Grid_defs.hh:142
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_c_pending ( ) const
inline

Definition at line 156 of file Grid_Status_inlines.hh.

156  {
157  return test_any(CS_PENDING);
158 }
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_c_up_to_date ( ) const
inline

Definition at line 95 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::congruences_are_up_to_date().

95  {
96  return test_any(C_UP_TO_DATE);
97 }
static const flags_t C_UP_TO_DATE
Definition: Grid_defs.hh:140
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_empty ( ) const
inline

Definition at line 80 of file Grid_Status_inlines.hh.

References Parma_Polyhedra_Library::EMPTY.

Referenced by Parma_Polyhedra_Library::Grid::marked_empty().

80  {
81  return test_any(EMPTY);
82 }
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_g_minimized ( ) const
inline

Definition at line 140 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::generators_are_minimized().

140  {
141  return test_any(G_MINIMIZED);
142 }
static const flags_t G_MINIMIZED
Definition: Grid_defs.hh:143
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_g_pending ( ) const
inline

Definition at line 171 of file Grid_Status_inlines.hh.

171  {
172  return test_any(GS_PENDING);
173 }
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_g_up_to_date ( ) const
inline

Definition at line 110 of file Grid_Status_inlines.hh.

Referenced by Parma_Polyhedra_Library::Grid::generators_are_up_to_date().

110  {
111  return test_any(G_UP_TO_DATE);
112 }
static const flags_t G_UP_TO_DATE
Definition: Grid_defs.hh:141
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_sat_c_up_to_date ( ) const
inline

Definition at line 187 of file Grid_Status_inlines.hh.

187  {
188  return test_any(SAT_C_UP_TO_DATE);
189 }
static const flags_t SAT_C_UP_TO_DATE
Definition: Grid_defs.hh:144
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_sat_g_up_to_date ( ) const
inline

Definition at line 202 of file Grid_Status_inlines.hh.

202  {
203  return test_any(SAT_G_UP_TO_DATE);
204 }
static const flags_t SAT_G_UP_TO_DATE
Definition: Grid_defs.hh:145
bool test_any(flags_t mask) const
Check whether at least one bit in mask is set.
bool Parma_Polyhedra_Library::Grid::Status::test_zero_dim_univ ( ) const
inline

Definition at line 60 of file Grid_Status_inlines.hh.

Referenced by OK().

60  {
61  return flags == ZERO_DIM_UNIV;
62 }
static const flags_t ZERO_DIM_UNIV
Definition: Grid_defs.hh:138
flags_t flags
This holds the current bitset.
Definition: Grid_defs.hh:151

Friends And Related Function Documentation

bool get_field ( std::istream &  s,
const char *  keyword,
bool &  positive 
)
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 54 of file Grid_Status.cc.

54  {
55  std::string str;
56  if (!(s >> str)
57  || (str[0] != '+' && str[0] != '-')
58  || str.substr(1) != keyword) {
59  return false;
60  }
61  positive = (str[0] == '+');
62  return true;
63 }

Member Data Documentation

const flags_t Parma_Polyhedra_Library::Grid::Status::C_MINIMIZED = 1U << 3
staticprivate

Definition at line 142 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::C_UP_TO_DATE = 1U << 1
staticprivate

Definition at line 140 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::CS_PENDING = 1U << 7
staticprivate

Definition at line 146 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::EMPTY = 1U << 0
staticprivate

Definition at line 139 of file Grid_defs.hh.

flags_t Parma_Polyhedra_Library::Grid::Status::flags
private

This holds the current bitset.

Definition at line 151 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::G_MINIMIZED = 1U << 4
staticprivate

Definition at line 143 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::G_UP_TO_DATE = 1U << 2
staticprivate

Definition at line 141 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::GS_PENDING = 1U << 8
staticprivate

Definition at line 147 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::SAT_C_UP_TO_DATE = 1U << 5
staticprivate

Definition at line 144 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::SAT_G_UP_TO_DATE = 1U << 6
staticprivate

Definition at line 145 of file Grid_defs.hh.

const flags_t Parma_Polyhedra_Library::Grid::Status::ZERO_DIM_UNIV = 0U
staticprivate

Definition at line 138 of file Grid_defs.hh.


The documentation for this class was generated from the following files: