Unit 'AVL_Tree' Package
[Overview][Types][Classes][Variables][Index] [#fcl]

TObjectSortCompare

Custom sort callback handler.

Declaration

Source position: avl_tree.pp line 39

type TObjectSortCompare = function(

  Tree: TAVLTree;

  Data1: Pointer;

  Data2: Pointer

):Integer of object;

Arguments

Tree

  

Tree that is comparing objects.

Data1

  

First object.

Data2

  

Second object.

Function result

one of -1, 0 or 1 depending on the comparison of data1 and data2.

Description

TObjectSortCompare is the prototype for the TAVLTree.OnObjectCompare property. When assigned, it is used to sort the elements in the tree. It provides more information than the standard TListSortCompare handler used in TAVLTree.OnCompare: it also passes the tree to the sort mechanism.

See also

TAVLTree.OnObjectCompare

  

Compare handler.

TAVLTree.OnCompare

  

Compare function used when comparing nodes.


Documentation generated on: Jul 24 2023