find_row_sorted


Description:

public abstract unowned ModelIter find_row_sorted (Variant[] row_spec, CompareRowFunc cmp_func, out bool out_was_found)

Finds a row in this according to the sorting specified by cmp_func.

This method will assume that this is already sorted by cmp_func.

If you use this method for searching you should only use insert_row_sorted to insert rows in the model.

Parameters:

this

The model to search

row_spec

An array of Variants with type signature matching those of the column schemas of this. No references will be taken on the variants.

cmp_func

Callback used for comparison or rows

out_was_found

A place to store a boolean value that will be set when this method returns. If true then an exact match was found. If false then the returned iter points to a row just after where row_spec would have been inserted. Pass null to ignore.

user_data

Arbitrary pointer passed to cmp_func during search

Returns:

If out_was_found is set to true then a ModelIter pointing to the last matching row. If it is false then the iter pointing to the row just after where row_spec_would have been inserted.