Type |
Switch |
Syntax |
{$M+} or {$M-} {$TYPEINFO ON} or {$TYPEINFO OFF} |
Default |
{$M-} {$TYPEINFO OFF} |
Scope |
Local |
The $M switch directive controls generation of runtime type information (RTTI). When a class is declared in the {$M+} state, or is derived from a class that was declared in the {$M+} state, the compiler generates runtime type information for properties and events that are declared in a published section. If a class is declared in the {$M+} state, and is not derived from a class that was declared in the {$M} state, published sections are not allowed in the class. Note that if a class is forward declared, the first declaration of the class must be declared with the $Mswitch.
When the $M switch is used to declare an interface, the compiler generates runtime type information for all properties. That is, for interfaces, all members are treated as if they were published.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|