[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 9.195 PObjectType

### Synopsis

    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.)

### Description

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.

### Conforming to

``PObjectType'` is a GNU Pascal extension

### Example

### See also

section 9.286 TypeOf, section 9.247 SetType, section 8.8 Object-Orientated Programming.

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html