Sequence
Object Hierarchy:
Description:
[ Compact ]
[ Version ( since = "2.14" ) ]
[ CCode ( free_function = "g_sequence_free" ) ]
public class Sequence<G>
The Sequence struct is an opaque data type representing a sequence data type.
Example: Sort all items:
public static int main (string[] args) {
Sequence<string> seq = new Sequence<string> ();
seq.append ("1. Lorem");
seq.append ("4. amet");
seq.append ("2. ipsum");
seq.append ("3. sit");
bool asc = true;
seq.sort ((a, b) => {
return (asc)? strcmp (a, b) : strcmp (b, a);
});
// Output:
// ``1. Lorem``
// ``2. ipsum``
// ``3. sit``
// ``4. amet``
seq.foreach ((item) => {
print ("%s\n", item);
});
return 0;
}
valac --pkg glib-2.0 GLib.Sequence.sort.vala
Content:
Static methods:
- public static unowned G @get (SequenceIter<G> iter)
- public static void @set (SequenceIter<G> iter, owned G data)
- public static void foreach_range (SequenceIter<G> begin, SequenceIter<G> end, Func<G> func)
- public static SequenceIter<G> insert_before (SequenceIter<G> iter, owned G data)
- public static void move (SequenceIter<G> src, SequenceIter<G> dest)
- public static void move_range (SequenceIter<G> dest, SequenceIter<G> begin, SequenceIter<G> end)
- public static SequenceIter<G> range_get_midpoint (SequenceIter<G> begin, SequenceIter<G> end)
- public static void remove (SequenceIter<G> iter)
- public static void remove_range (SequenceIter<G> begin, SequenceIter<G> end)
- public static void sort_changed (SequenceIter<G> iter, CompareDataFunc<G> cmp_func)
- public static void sort_changed_iter (SequenceIter<G> iter, SequenceIterCompareFunc<G> iter_cmp)
- public static void swap (SequenceIter<G> src, SequenceIter<G> dest)
Creation methods:
Methods: