System.TypInfo.TTypeData

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

  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;
    case TTypeKind of
      tkUnknown: ();
      tkUString,
{$IFNDEF NEXTGEN}
      tkWString,
{$ENDIF !NEXTGEN}
      tkVariant: (AttrData: TAttrData);
{$IFNDEF NEXTGEN}
      tkLString: (
        CodePage: Word
       {LStrAttrData: TAttrData});
{$ENDIF !NEXTGEN}
      tkInteger,
{$IFNDEF NEXTGEN}
      tkChar,
{$ENDIF !NEXTGEN}
      tkEnumeration, tkSet, 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: (
            CompType: PPTypeInfo
           {SetAttrData: TAttrData}));
      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(void);
    TTypeInfoFieldAccessor __fastcall UnitNameFld(void);
    TTypeInfoFieldAccessor __fastcall IntfUnitFld(void);
    TTypeInfoFieldAccessor __fastcall DynUnitNameFld(void);
    PPropData __fastcall PropData(void);
    PIntfMethodTable __fastcall IntfMethods(void);
    PPTypeInfo __fastcall DynArrElType(void);
    PAttrData __fastcall DynArrAttrData(void);
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;
            GUID Guid;
            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
        {
            TOrdType OrdType;union
            {
                struct
                {
                    PTypeInfo *CompType;
                };
                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