Skip to content

EF.Classes

Defines a useful base TEFComponent base class and related classes.

TEFComponentConfig class

Persistent tree used to hold a TEFComponent's configuration.

TEFComponent class

Abstract class for configurable objects with logging and observer capability. A TEFComponent:<br />- has class-level and object-level  identification methods;<br />- has a Config that it can load from a file;<br />- can be a subject and observer;<br />- has logging capability.

Used as a base class for various kinds of objects in EF.

pascal
procedure AfterConstruction;

Sets the default log level for the component.

pascal
destructor Destroy;

Frees the internal config object and destroys the component.

pascal
function AsObject: TObject;

Returns the component itself as a TObject (IEFInterface support).

pascal
class function GetClassId: string;

Returns an identification string based on the class name.

By default, returns the class name without any 'T' or 'TEF' prefix.

Identifying classes by string-based Ids is useful in registration frameworks, in which class Ids are read from a file and corresponding class references must be retrieved from a registry object.

pascal
function GetId: string;

Returns an identification string for the object. By default returns the same value as GetClassId.

Identifying objects by string-based Ids is useful in registration frameworks, in which object Ids are read from a file and corresponding objects must be retrieved from a registry or factory object.

pascal
property OnLog: TEFLogEvent read FOnLog write FOnLog;

Fired each time the object needs to log information about its work.

pascal
property LogLevel: Integer read FLogLevel write FLogLevel default DEFAULT_LOG_LEVEL;

Gets or sets the logging level for this component. Only messages that have a level lower than or equal to this setting will be logged.

pascal
function GetConfig: TEFComponentConfig;

An internal tree-like config object used to set values that affect the object's operations.

pascal
procedure InvalidateConfig;

Invalidates the internal config object so that it is re-created at next access. Virtual so descendants (e.g. TKConfig) can also refresh derived state, such as cached typed config readers.

Released under Apache License, Version 2.0.