RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DelphiInterface Template

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

Pascal
DelphiInterface = class;
C++
template <class T>
class DelphiInterface;

systobj.h

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.  

System::DelphiInterface is a C++ template that defines types compatible with Delphi interfaces, System::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.
System::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 System::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). 

 

Variant 

TVariant

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!