Sign in Join
FPDoc Onlineexperiment

TOnIsDataEqual procedure type

In unit CacheCls

Callback type to check whether 2 data types are equal.

Declaration

pascal
TOnIsDataEqual = function(ACache: TCache; AData1: Pointer; 
 AData2: Pointer): Boolean of object

Arguments

ACacheTCache instance which calls the callback.
AData1

First data element pointer.

AData2

Second data element pointer.

Function result

True if AData1 and AData2 are equal.

Description

TOnIsDataEqual is a callback prototype; It is used by the Add call to determine whether the item to be added is a new item or not. The function returns True if the 2 data pointers AData1 and AData2 should be considered equal, or False when they are not.

For most purposes, comparing the pointers will be enough, but if the pointers are ansistrings, then the contents should be compared.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.