SequenceIter
Object Hierarchy:
Description:
[ Compact ]
public class SequenceIter<G>
The SequenceIter struct is an opaque data type representing an iterator pointing into a
Sequence.
Content:
Methods:
- public bool is_begin ()
Returns whether this is the begin
iterator
- public bool is_end ()
Returns whether this is the end
iterator
- public SequenceIter<G> next ()
Returns an iterator pointing to the next position after
this.
- public SequenceIter<G> prev ()
Returns an iterator pointing to the previous position before
this.
- public int get_position ()
Returns the position of this
- public SequenceIter<G> move (int delta)
Returns the SequenceIter which is
delta
positions away from this.
- public unowned Sequence<G> get_sequence ()
Returns the Sequence
that this points into.
- public int compare (SequenceIter<G> other)
Returns a negative number if this
comes before b
, 0 if they are equal, and a positive number if this comes after b
.
- public void foreach_range (SequenceIter<G> end, Func<G> func)
- public SequenceIter<G> insert_before (owned G data)
- public void move_to (SequenceIter<G> dest)
Moves the item pointed to by src
to the position
indicated by dest
.
- public void swap (SequenceIter<G> dest)
Swaps the items pointed to by a
and b
.
- public void sort_changed (CompareDataFunc<G> cmp_func)
- public void sort_changed_iter (SequenceIterCompareFunc<G> iter_cmp)
- public void remove ()
Removes the item pointed to by iter
.
- public void remove_range (SequenceIter<G> end)
Removes all items in the (begin
, end
) range.
- public void move_range (SequenceIter<G> begin, SequenceIter<G> end)
Inserts the (begin
, end
) range at the
destination pointed to by ptr.
- public weak G @get ()
- public void @set (owned G data)
Changes the data for the item pointed to by iter
to be
data
.
- public SequenceIter<G> range_get_midpoint (SequenceIter<G> end)