System.Rtti.TRttiContext

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TRttiContext = record

C++

struct DECLSPEC_DRECORD TRttiContext
{
private:
    System::_di_IInterface FContextToken;
    static System::_di_IInterface __fastcall UseContext();
public:
    static TRttiContext __fastcall Create();
    void __fastcall Free();
    static void __fastcall KeepContext();
    static void __fastcall DropContext();
    TRttiType* __fastcall GetType(void * ATypeInfo)/* overload */;
    TRttiType* __fastcall GetType(System::TClass AClass)/* overload */;
    System::DynamicArray<TRttiType*> __fastcall GetTypes();
    TRttiType* __fastcall FindType(const System::UnicodeString AQualifiedName);
    System::DynamicArray<TRttiPackage*> __fastcall GetPackages();
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Rtti.pas
System.Rtti.hpp
System.Rtti System.Rtti

Description

TRttiContext is the cornerstone of the Rtti unit.

Obtain and use the instance of TRttiContext to access type information for all public types in an application and associated packages. Only one instance of TRttiContext is actually created in your application.

TRttiContext exposes methods and properties that allow obtaining TRttiObject instances that represent different RTTI information. All the TRttiObject instances are cached internally and freed when the application terminates.

See Also

Code Examples