From Appmethod Topics
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Modifiers, Keyword Extensions, Storage Class Specifiers


__declspec( delphirtti ) declarator

The delphirtti storage-class attribute is used to allow C/C++ code to request RTTI on Object Pascal objects. This attribute represents the Appmethod C++ equivalent for the {$M}/{$TYPEINFO} Object Pascal 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). You can browse and invoke methods exposed via RTTI using functions exposed in the System.ObjAuto unit.

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

See Also