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).

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_a should precede row_b
  • 0—row_a and row_b are equal in rank
  • -1—row_b should precede row_a

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com