[next] [prev] [prev-tail] [tail] [up]

#### $M or $TYPEINFO : Generate type info

For classes that are compiled in the {$M+} or {$TYPEINFO ON} state, the compiler will generate Run-Time Type Information (RTTI). All descendent objects of an object that was compiled in the {$M+} state will get RTTI information too, as well as any published classes. By default, no Run-Time Type Information is generated. The TPersistent object that is present in the FCL (Free Component Library) is generated in the {$M+} state. The generation of RTTI allows programmers to stream objects, and to access published properties of objects, without knowing the actual class of the object.

The run-time type information is accessible through the TypInfo unit, which is part of the Free Pascal Run-Time Library.

Remark: The streaming system implemented by Free Pascal requires that all streamable components be descendent from TPersistent.

[next] [prev] [prev-tail] [front] [up]