Show: Delphi C++
Display Preferences

System.DelphiInterface

From XE3 API Documentation
Jump to: navigation, search

C++

template <class T> class RTL_DELPHIRETURN DelphiInterface

Properties

Type Visibility Source Unit Parent
class public systobj.h System System

Description

DelphiInterface is a C++ implementation of the Delphi interface.

A Delphi interface is an abstract collection of properties, methods, and events with no implementation. It resembles a C++ class with only pure virtual methods. However, a Delphi interface type supports built-in reference counting.

DelphiInterface is a C++ template that defines types compatible with Delphi interfaces. DelphiInterface defines reference counting logic in its initialization constructor, copy constructor, assignment operator, and destructor.

Note: Other operators that provide access to the underlying interface pointer do not handle reference counting. You may need to explicitly call AddRef or Release to ensure proper reference counting.

DelphiInterface is a template:

template <class T> class RTL_DELPHIRETURN DelphiInterface;

where the T parameter is an underlying interface class or COM interface. In the object framework, the resulting DelphiInterface class is usually given a name such as _di_IUnknown, where IUnknown is the name of the corresponding interface. Such interfaces are documented under the interface name (such as IFormDesigner).

See Also

Personal tools
Translations