Oma_Ot_Table_By_Column_Sort_Proc()
Abstract
Compares two rows of a table based on the values in a specified column.
Syntax
Oma_Ot_Table_By_Column_Sort_Proc (ot_table_ptr, sort_data_ptr, row_a, row_b)
| Argument | Type | Description |
|---|---|---|
ot_table_ptr |
OmaT_Ot_Table * |
OT table being sorted. |
sort_data_ptr |
const void * |
Index of the column on which to sort (cast to const void*). |
row_a |
int |
First row to compare. |
row_b |
int |
Second row to compare. |
Return Type
int
Result of the comparison (see Details).
Header
oma_ot.h
Details
This function can be used when sorting a table (as the sort procedure for Oma_Ot_Table_Rows_Sort(), for example) to perform a simple comparison of two table rows based on the values in a specified column. The function returns one of the following values to indicate the precedence relationship between the two rows:
- 1—
row_ashould precederow_b - 0—
row_aandrow_bare equal in rank - -1—
row_bshould precederow_a