Class TDeriver (unit Deriver)

Inherits from

TObject

Constructors


constructor Create;

**************************************************************************** -- procedure Create [constructor] Class constructor.


Functions

function DerivedClass(const Info: TObject): TClass;

**************************************************************************** -- function DerivedClass [method] For every registered class the MatchMethod is called and if it returns true its class reference is returned.

destructor Destroy;

**************************************************************************** -- procedure Create [destructor] Class destructor.

procedure Register(const DerivedClass: TClass; const MatchMethod: TDeriverMatchMethod);

* TDeriver ******************************************************************} {****************************************************************************** -- procedure Register [method] Register a new derived class.

Properties

Events

event OnNoMatch : TDeriverNoMatch


Variables

Derived : TStringList;


FOnNoMatch : TDeriverNoMatch;



Constructors


constructor Create;

**************************************************************************** -- procedure Create [constructor] Class constructor. Create Derived list and register itself.


Functions


function DerivedClass(const Info: TObject): TClass;

**************************************************************************** -- function DerivedClass [method] For every registered class the MatchMethod is called and if it returns true its class reference is returned. -- Parameters: Info: in TObject Condition data, it is passed to MatchMethod. Result: out TClass Class reference whose MatchMethod returned true. -- Exception: EMatch Raised if no registerd class match the condition data and if OnNoMatch event is not assigned.


destructor Destroy;

**************************************************************************** -- procedure Create [destructor] Class destructor. Release Derived contents and Derived itself.


procedure Register(const DerivedClass: TClass; const MatchMethod: TDeriverMatchMethod);

* TDeriver ******************************************************************} {****************************************************************************** -- procedure Register [method] Register a new derived class. -- Parameters: DerivedClass: in TClass Class reference to be registered. MatchMethod: in TMatchMethod Method of DerivedClass to be used to check it against condition data.


Properties


Events


event OnNoMatch : TDeriverNoMatch


Variables


Derived : TStringList;


FOnNoMatch : TDeriverNoMatch;