[Overview][Types][Classes][Variables][Index] |
Custom sort callback handler
Source position: avl_tree.pp line 39
type TObjectSortCompare = function( |
Tree: TAVLTree; |
Data1: Pointer; |
Data2: Pointer |
):Integer of object; |
Tree |
|
Tree that is comparing objects |
Data1 |
|
First object |
Data2 |
|
Second object |
one of -1, 0 or 1 depending on the comparison of data1 and data2
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.
|
Compare handler |
|
|
Compare function used when comparing nodes |