[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
type PObjectType = ^const record Size: SizeType; NegSize: Integer (BitSizeOf (SizeType)); Parent: PObjectType; Name: ^const String end; |
(Note: `^record' is not valid syntax. It is just used here for explanation because the record type itself is not declared.)
The type returned by `TypeOf' and required by `SetType'. In fact, the record pointed to (the VMT) also contains pointers to the virtual methods. However, these are not declared in `PObjectType' because they vary from object type to object type. The fields declared here are those that can be accessed (via `TypeOf') for every object type.
`Size' contains the size of the object type, `NegSize' contains the size negated (for runtime checks). `Parent' contains a pointer to the parent type's VMT (or nil if the type has no parent or the parent type is abstract). `Name' points to a string containing the type's name.
`PObjectType' is a GNU Pascal extension
section 9.286 TypeOf, section 9.247 SetType, section 8.8 Object-Orientated Programming.