__declspec(pascalimplementation)
Go Up to Keywords, Alphabetical Listing Index
Category
Modifiers (C++), Keyword Extensions, Storage Class Specifiers (C++)
Syntax
__declspec( pascalimplementation ) declarator
The pascalimplementation argument indicates that the code defining the class was implemented in Delphi. This specifier tells the C++ compiler not to generate any RTTI/VMT/TypeIds for declarator
because the Delphi compiler has done so already. This modifier appears in an Delphi portability header file that has an .hpp
extension.
Description
A Delphi package can be compiled using the -JPHNE
flag, and then it generates a file with an .hpp extension, which is the C++ header for the functions in the package. These functions need to be declared __declspec(pascalimplementation)
so that the compiler knows to enforce the restrictions imposed by Delphi OOP rules.
Note: C++ programs that you write should not use this __declspec specifier. Code generated by the Delphi compiler can contain this specifier.