EF.Types
Generally useful types.
EEFError class
Base class for all EF exceptions.
constructor CreateWithAdditionalInfo(const AMessage, AAdditionalInfo: string);Creates the exception with an additional message.
property AdditionalInfo: string read FAdditionalInfo;An EF exception may optionally have additional information over what's displayed in the Message. The value of this property is set upon creation through the CreateWithAdditionalInfo constructor.
TEFTriple record
A triple of string values, useful where a key/value pair is not enough.
constructor Create(const AValue1, AVAlue2, AVAlue3: string);Creates a triple from three string values.
procedure AssignPair({$IFDEF D15+}const {$ENDIF}APair: TEFPair);Fills the triple from a pair: Value1 and Value2 take the pair's key and value; Value3 is set to ''.
TEFRegistry class
Holds a list of registered classes and provides class references by string Ids.
constructor Create;Creates the registry with a case-insensitive Id lookup.
destructor Destroy;Destroys the registry and its internal list of classes.
procedure RegisterClass(const AId: string;Adds a class to the registry.
procedure UnregisterClass(const AId: string);Deletes a previously registered class from the registry.
function HasClass(const AId: string): Boolean;Returns True if a given class Id is registered.
function GetClass(const AId: string): TClass;Returns a class reference to the class identified by AClassId, if registered. Otherwise an exception is raised.
function FindClassId(const AClass: TClass): string;Returns the Id under which a class was registered, or ''.
function FindClass(const AId: string): TClass;Returns a class reference to the class identified by AClassId, if registered. Otherwise returns nil.
function GetClassIds: TArray<string>;Returns a sorted array with all registered class Ids.
TEFFactory class
Uses the registry to create objects by class id. It is friend to a descendant of TEFRegistry.
constructor Create(const ARegistry: TEFRegistry);Pass a reference to the registry to use when constructing a factory.
function CreateObject(const AId: string): TObject;Creates and returns an instance of the class identified by AClassId. Raises an exception if said class is not registered.
function HasClass(const AId: string): Boolean;Returns True if a given class Id is registered.
TEFArray class
Extends the RTL TArray with helpers to search open arrays for an item.
class function Contains<T>(const Values: array of T;Returns True if Item is found in Values using the given equality comparer, setting ItemIndex to its position (or -1 if not found).
class function Contains<T>(const Values: array of T;Returns True if Item is found in Values using the default comparer, setting ItemIndex to its position (or -1 if not found).
class function Contains<T>(const Values: array of T;Returns True if Item is found in Values using the default comparer.
class function IndexOf<T>(const Values: array of T;Returns the index of Item in Values using the given equality comparer, or -1 if not found.
class function IndexOf<T>(const Values: array of T;Returns the index of Item in Values using the default comparer, or -1 if not found.
