Show: Delphi C++
Display Preferences

__declspec(delphirtti)

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

Modifiers (C++), Keyword Extensions, Storage Class Specifiers (C++)

Syntax

__declspec( delphirtti ) declarator

The delphirtti storage-class attribute is used to allow C/C++ code to request RTTI on Delphi objects. This attribute represents the C++Builder equivalent for the {$M}/{$TYPEINFO} Delphi directives.

If a class is marked with __declspec(delphirtti) (or derives from one that does), the compiler will generate RTTI for all public methods (excluding constructors, destructors, and compiler-generated methods). DataSnap servers use this RTTI to expose Server methods. However, you can browse and invoke methods exposed via RTTI using functions exposed in the System.ObjAuto unit.

Note: __declspec(delphirtti) only works on published Delphi types.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance