RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TObject::ClassInfo Method

Returns a pointer to the runtime type information (RTTI) table for the object type.

Pascal
class function ClassInfo: Pointer;
C++
Pointer ClassInfo();

System::TObject::ClassInfo provides access to the RTTI table for a given object type.

Note: The format of the RTTI table is subject to change. Applications should use the other RTTI methods provided by System::TObject::TObject; these provide easy, consistent access to RTTI data.
Note: Some classes do not provide runtime type information. For these classes, System::TObject::ClassInfo returns nil (Delphi) or NULL (C++). All classes descended from TPersistent do provide runtime type information.
Note: The Delphi compiler does not provide RTTI by default. Most classes implemented in Delphi that need to provide RTTI are descended from TPersistent. If your Delphi class needs RTTI but not the full functionality of TPersistent, compile the code with the $M switch.
Note: The C++ compiler provides RTTI by default. This feature can be disabled as project option and selectively re-enabled using the __rtti keyword.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!