| Class TDeriver (unit Deriver) |
TObject
| Constructors |
constructor Create;| Functions |
procedure DecInstance;
function DerivedClass(const Info: TObject): TClass;
destructor Destroy;
procedure IncInstance;
procedure Register(const DerivedClass: TClass;
const MatchMethod: TMatchMethod);| Properties |
| Events |
| Variables |
Derived : TStringList;
InstanceCount : Integer;| Constructors |
constructor Create;**************************************************************************** -- procedure Create [constructor]
| Functions |
procedure DecInstance;
function DerivedClass(const Info: TObject): TClass;**************************************************************************** -- function DerivedClass [method] For every class registered in Derived list the MatchMethod is called with creational infos as parameter. When MatchMethod return true the corresponding class is returned. -- Parameters: Info: in TObject Creational infos. Result: out TClass Class that matches creational infos. -- Exception: EMatch: raised if no class match is found.
destructor Destroy;**************************************************************************** -- procedure Create [destructor] Free everything.
procedure IncInstance;* TDeriver ******************************************************************} {****************************************************************************** -- procedure IncInstance and DecInstance [method] These procedure mantain the InstanceCount, that is the number of objects that use the TDeriver object. When no object remain the TDeriver object can be safely destroyed. Note: these procedure are useless in Delphi 2.
procedure Register(const DerivedClass: TClass;
const MatchMethod: TMatchMethod);**************************************************************************** -- procedure Register [method] Register a class in Derived list. -- Parameters: DerivedClass: in TClass Class to be registerd. MatchMethod: in TMatchMethod Method to be used to determine the class corresponding to a set of creational infos.
| Properties |
| Events |
| Variables |
Derived : TStringList;
InstanceCount : Integer;