A class Circulator that satisfies the requirements of a forward circulator with the value type T, supports the following operations. See the reference pages for the full set of requirements. Note that the stated return values are not required, only a return value that is convertible to the stated type is required. As for C++, we recommend the use of 0 instead of NULL.
| |
the value type T.
| |
| |
either reference or const reference to T.
| |
| |
either pointer or const pointer to T.
| |
| |
unsigned integral type that can hold the size
of the sequence.
| |
| |
signed integral type that can hold the
distance between two circulators.
| |
| |
circulator category
Forward_circulator_tag.
|
| |
a circulator equal to NULL denoting
an empty sequence.
| |
| |
a circulator equal to .
|
|
| Assignment. | ||||
|
| Test for emptiness. | ||||
|
| Test for non-emptiness, i.e. !(c == NULL). | ||||
|
| is equal to if they refer to the same item. | ||||
|
| Test for inequality, i.e. !(c == d). | ||||
|
|
Returns the value of the circulator.
If Circulator is mutable *c = t is valid.
| ||||
|
|
Returns a pointer to the value of the circulator.
| ||||
|
|
Prefix increment operation.
| ||||
|
| 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 with the value type T, supports the following operations in addition to the operations supported by a forward circulator.
| |
circulator category
Bidirectional_circulator_tag.
|
|
|
Prefix decrement operation.
| ||||
|
| 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. In contrast to random access iterators, no comparison operators are available for random access circulators.
| |
circulator category
Random_access_circulator_tag.
|
|
| 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. The value will be in the interval if is the size of the total sequence. 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. |