Sign in Join
FPDoc Onlineexperiment

TMediatorDef.BetterMatch function

Member of TMediatorDefpublicIn unit fpObserver

Compares this definition against another for best match selection

Declaration

pascal
function BetterMatch(M: TMediatorDef): Boolean

Arguments

M

Other mediator definition to compare against

Function result

True if this definition is a better match

Description

The BetterMatch method compares this definition against another to determine which provides a better match for a given scenario. It considers property name specificity, class hierarchies, and mediator types.

This comparison logic ensures that the most specific and appropriate mediator is selected when multiple mediators could handle the same situation.

See also

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