Skip to content

EF.Intf

All interfaces in EF are based on EFInterface and disable reference counting. This unit defines the base interface and the norefcount-related classes and utility routines.

IEFInterface interface

Base interface for all EF interfaces.

pascal
function AsObject: TObject;

Gives access to the implementing object. Implementors should return Self.

TEFNoRefCountObject class

Base class for objects that implement interfaces but disable reference counting.

pascal
function QueryInterface(const IID: TGUID;

Standard IInterface implementation; returns the requested interface if supported.

pascal
function _AddRef: Integer;

Disabled reference counting; always returns -1.

pascal
function _Release: Integer;

Disabled reference counting; always returns -1.

pascal
function AsObject: TObject;

Returns the implementing object (Self).

Routines

pascal
procedure FreeAndNilEFIntf(var AEFIntferface);

Frees the object and sets the reference to nil. It is mandatory to use this function instead of FreeAnNil on references of type IEFInterface or descendants, which are not reference-counted. Don't pass anything else to this function.

pascal
procedure NilEFIntf(var AEFIntferface);

Sets the reference to nil but doesn't free the object. It is mandatory to use this function instead of simply setting the reference to nil on references of type IEFInterface or descendants, which are not reference-counted. Don't pass anything else to this function.

Released under Apache License, Version 2.0.