System.TypInfo.TTypeData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TTypeData = packed record
    function NameListFld: TTypeInfoFieldAccessor; inline;
    function UnitNameFld: TTypeInfoFieldAccessor; inline;
    function IntfUnitFld: TTypeInfoFieldAccessor; inline;
    function DynUnitNameFld: TTypeInfoFieldAccessor; inline;
    function PropData: PPropData; inline;
    function IntfMethods: PIntfMethodTable; inline;
    function DynArrElType: PPTypeInfo; inline;
    function DynArrAttrData: PAttrData; inline;
    function GUID: TGUID; inline;
    case TTypeKind of
      tkUnknown: ();
      tkUString,
{$IFNDEF NEXTGEN}
      tkWString,
{$ENDIF !NEXTGEN}
      tkVariant: (AttrData: TAttrData);
      tkLString: (
        CodePage: Word
       {LStrAttrData: TAttrData});
      tkInteger, tkChar, tkEnumeration, tkWChar: (
        OrdType: TOrdType;
        case TTypeKind of
          tkInteger, tkChar, tkEnumeration, tkWChar: (
            MinValue: Integer;
            MaxValue: Integer;
            case TTypeKind of
              tkInteger, tkChar, tkWChar: (
                {OrdAttrData: TAttrData});
              tkEnumeration: (
                BaseType: PPTypeInfo;
                NameList: TSymbolName;
               {EnumUnitName: TSymbolName;
                EnumAttrData: TAttrData})));
      tkSet: (
        SetTypeOrSize: UInt8;
        CompType: PPTypeInfo;
        {SetAttrData: TAttrData;
         SetLoByte: UInt8;
         SetSize: UInt8});
      tkFloat: (
        FloatType: TFloatType
       {FloatAttrData: TAttrData});
{$IFNDEF NEXTGEN}
      tkString: (
        MaxLength: Byte
       {StrAttrData: TAttrData});
{$ENDIF !NEXTGEN}
      tkClass: (
        ClassType: TClass; // most data for instance types is in VMT offsets
        ParentInfo: PPTypeInfo;
        PropCount: SmallInt; // total properties inc. ancestors
        UnitName: TSymbolName;
       {PropData: TPropData;
        PropDataEx: TPropDataEx;
        ClassAttrData: TAttrData;
        ArrayPropCount: Word;
        ArrayPropData: array[1..ArrayPropCount] of TArrayPropInfo;});
      tkMethod: (
        MethodKind: TMethodKind; // only mkFunction or mkProcedure
        ParamCount: Byte;
{$IFNDEF NEXTGEN}
        ParamList: array[0..1023] of AnsiChar
{$ELSE NEXTGEN}
        ParamList: array[0..1023] of Byte
{$ENDIF NEXTGEN}
       {ParamList: array[1..ParamCount] of
          record
            Flags: TParamFlags;
            ParamName: ShortString;
            TypeName: ShortString;
          end;

C++

struct DECLSPEC_DRECORD TTypeData
{
public:
    TTypeInfoFieldAccessor __fastcall NameListFld();
    TTypeInfoFieldAccessor __fastcall UnitNameFld();
    TTypeInfoFieldAccessor __fastcall IntfUnitFld();
    TTypeInfoFieldAccessor __fastcall DynUnitNameFld();
    PPropData __fastcall PropData();
    PIntfMethodTable __fastcall IntfMethods();
    PPTypeInfo __fastcall DynArrElType();
    PAttrData __fastcall DynArrAttrData();
    GUID __fastcall GUID();
public:
    union
    {
        struct
        {
            TArrayTypeData ArrayData;
        };
        struct
        {
            PTypeInfo *RefType;
            TAttrData PtrAttrData;
        };
        struct
        {
            PTypeInfo *InstanceType;
            TAttrData ClassRefAttrData;
        };
        struct
        {
            int RecSize;
            int ManagedFldCount;
        };
        struct
        {
            int elSize;
            PTypeInfo *elType;
            int varType;
            PTypeInfo *elType2;
            TSymbolNameBase DynUnitName;
        };
        struct
        {
            __int64 MinInt64Value;
            __int64 MaxInt64Value;
            TAttrData Int64AttrData;
        };
        struct
        {
            PTypeInfo *IntfParent;
            TIntfFlagsBase IntfFlags;
            System::StaticArray<System::Byte, 16> IntfGuid;
            TSymbolNameBase IntfUnit;
        };
        struct
        {
            TProcedureSignature *ProcSig;
            TAttrData ProcAttrData;
        };
        struct
        {
            TMethodKind MethodKind;
            System::Byte ParamCount;
            System::StaticArray<char, 1024> ParamList;
        };
        struct
        {
            System::TClass ClassType;
            PTypeInfo *ParentInfo;
            short PropCount;
            TSymbolNameBase UnitName;
        };
        struct
        {
            System::Byte MaxLength;
        };
        struct
        {
            TFloatType FloatType;
        };
        struct
        {
            System::Byte SetTypeOrSize;
            PTypeInfo *CompType;
        };
        struct
        {
            TOrdType OrdType;union
            {
                struct
                {
                    int MinValue;
                    int MaxValue;union
                    {
                        struct
                        {
                            PTypeInfo *BaseType;
                            TSymbolNameBase NameList;
                        };
                    };
                };
            };
        };
        struct
        {
            System::Word CodePage;
        };
        struct
        {
            TAttrData AttrData;
        };
    };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.TypInfo.pas
System.TypInfo.hpp
System.TypInfo System.TypInfo

Description

TTypeData is used internally to represent type information.

A TTypeData structure represents a category of properties, events, or methods in parameters passed to several routines in the TypInfo unit.

See Also