Sign in Join
FPDoc Onlineexperiment

TMediatorManager.RegisterMediator function

Member of TMediatorManagerpublicIn unit fpObserver

Registers a new mediator class with the manager

Declaration

pascal
function RegisterMediator(MediatorClass: TMediatorClass; 
 MinSubjectClass: TClass): TMediatorDef
 ; overload
function RegisterMediator(MediatorClass: TMediatorClass; 
 MinSubjectClass: TClass; 
 const PropertyName: string): TMediatorDef
 ; overload
function RegisterMediator(MediatorClass: TMediatorClass; 
 MinSubjectClass: TClass; 
 PropertyTypes: TTypeKinds): TMediatorDef
 ; overload

Arguments

MediatorClass

Class reference of the mediator to register

MinSubjectClass

Minimum subject class the mediator can handle

PropertyName

Specific property name the mediator handles

PropertyTypes

Set of property types the mediator can handle

Function result

Created mediator definition for the registration

Description

The RegisterMediator method creates a new mediator definition and adds it to the manager's collection. Multiple overloads allow registration with different criteria including minimum subject class, property names, and property types.

The method returns the created definition, which can be further customized if needed.

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