A class Circulator that satisfies the requirements of a forward circulator for the value type T, supports the following operations.
|
| |
|
| |
|
|
| Assignment. |
|
|
| Test for emptiness. |
|
|
| Test for non-emptiness. The result is the same as !(c == NULL). |
|
|
| Test for equality: Two circulators are equal if they refer to the same item. |
|
|
| Test for inequality. The result is the same as !(c == d). |
|
|
|
Returns the value of the circulator.
If Circulator is mutable *c = t is valid. Precondition: c is dereferenceable. |
|
|
|
Prefix increment operation. Precondition: c is dereferenceable. Postcondition: c is dereferenceable. |
|
|
| Postfix increment operation. The result is the same as that of Circulator tmp = c; ++c; return tmp; . |
A class Circulator that satisfies the requirements of a bidirectional circulator for the value type T, supports the following operations in addition to the operations supported by a forward circulator.
|
|
|
Prefix decrement operation. Precondition: c is dereferenceable. Postcondition: c is dereferenceable. |
|
|
| Postfix decrement operation. The result is the same as that of Circulator tmp = c; --c; return tmp; . |
A class Circulator that satisfies the requirements of a random access Circulator for the value type T, supports the following operations in addition to the operations supported by a bidirectional Circulator.
|
|
| The result is the same as if the prefix increment operation was applied times, but it is computed in constant time. |
|
|
| Same as above, but returns a new circulator. |
|
|
| Same as above. |
|
|
| The result is the same as if the prefix decrement operation was applied times, but it is computed in constant time. |
|
|
| Same as above, but returns a new circulator. |
|
|
| Returns *(c + n). |
|
|
| returns the difference between the two circulators within the interval for a sequence size . The difference for a fixed circulator c (or ) with all other circulators (or c) is a consistent ordering of the elements in the data structure. There has to be a minimal circulator min for which the difference cmin to all other circulators c is non negative. |
|
|
| |
| Returns the minimal circulator min in constant time. If has a singular value, a singular value is returned. | ||
There are no comparison operators required.