|
Delphi Interface mode |
Top Previous Next |
|
What is translated > Routines > Translation modes > Delphi Interface mode This translation mode is used for Delphi-style interfaces, including interfaces derived from IInterface.
It represents a Delphi-oriented interface model that may be COM-compatible internally, but preserves Delphi semantics and usage patterns.
Characteristics
Interfaces
Portable compilers (MSVC, GCC, Clang):
mapped to DelphiInterface<T>
C++Builder:
mapped to DelphiInterface<T> or native C++Builder interface types
Types
Boolean -> bool Standard Delphi types are preserved (no Windows API type substitution)
Parameters
var / out -> T& (reference)
Calling convention
Portable compilers:
default calling convention
C++Builder:
usually __fastcall (Delphi-compatible)
General Behavior
Example
Delphi
function GetIsRecyclable: Boolean;
C++ (Portable)
bool GetIsRecyclable();
C++ (C++Builder)
bool __fastcall GetIsRecyclable();
Notes
Even if an interface is technically COM-based, this mode is selected when:
Typical indicators include:
|
|
This page belongs to the Delphi2Cpp Documentation |
Delphi2Cpp home Content |