#include <GElementID.h>
Collaboration diagram for GCS::GIDRange:

Public Member Functions | |
| GIDRange () | |
| GIDRange (unsigned long lower_bound, unsigned long upper_bound) | |
| unsigned long | takeID () |
| bool | isEmpty () const |
| unsigned long | count () const |
| void | setRange (unsigned long low, unsigned long high) |
| unsigned long | getLowerBound () const |
| unsigned long | getUpperBound () const |
Private Attributes | |
| unsigned long | LowerBound |
| unsigned long | UpperBound |
Represents a range of element IDs, usually used to store available free element IDs. The range itself includes the bounds, that means for example a range of 1 to 1 counts 1 while 2 to 5 counts 5-2+1 = 4 possible IDs. A range is considered to be empty as soon as lower bound > upper bound.
| GCS::GIDRange::GIDRange | ( | ) |
Constructor (only for QValueList), initializes to 1 - 0.
| GCS::GIDRange::GIDRange | ( | unsigned long | lower_bound, | |
| unsigned long | upper_bound | |||
| ) |
Constructor.
| unsigned long GCS::GIDRange::count | ( | ) | const |
| unsigned long GCS::GIDRange::getLowerBound | ( | ) | const |
| unsigned long GCS::GIDRange::getUpperBound | ( | ) | const |
| bool GCS::GIDRange::isEmpty | ( | ) | const |
| void GCS::GIDRange::setRange | ( | unsigned long | low, | |
| unsigned long | high | |||
| ) |
Sets the range of IDs.
| unsigned long GCS::GIDRange::takeID | ( | ) |
0 when no ID is available.
unsigned long GCS::GIDRange::LowerBound [private] |
Lower bound of the ID range. The range includes the bounds themselves as well.
unsigned long GCS::GIDRange::UpperBound [private] |
Upper bound of the ID range. The range includes the bounds themselves as well.
1.4.7