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.
procedure AfterConstruction;Sets the default log level for the component.
destructor Destroy;Frees the internal config object and destroys the component.
function AsObject: TObject;Returns the component itself as a TObject (IEFInterface support).
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.
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.
property OnLog: TEFLogEvent read FOnLog write FOnLog;Fired each time the object needs to log information about its work.
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.
function GetConfig: TEFComponentConfig;An internal tree-like config object used to set values that affect the object's operations.
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.
