mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 18:46:01 +02:00
* move RTTI related types from rtti.inc to rttidecl.inc
git-svn-id: trunk@39250 -
This commit is contained in:
parent
bbf578b193
commit
393d1c2256
@ -14,92 +14,6 @@
|
|||||||
|
|
||||||
{ Run-Time type information routines }
|
{ Run-Time type information routines }
|
||||||
|
|
||||||
type
|
|
||||||
PRecordElement=^TRecordElement;
|
|
||||||
TRecordElement=
|
|
||||||
{$ifdef USE_PACKED}
|
|
||||||
packed
|
|
||||||
{$endif USE_PACKED}
|
|
||||||
record
|
|
||||||
{$ifdef VER3_0}
|
|
||||||
TypeInfo: Pointer;
|
|
||||||
{$else}
|
|
||||||
TypeInfo: PPointer;
|
|
||||||
{$endif}
|
|
||||||
{$ifdef VER2_6}
|
|
||||||
Offset: Longint;
|
|
||||||
{$else}
|
|
||||||
Offset: SizeInt;
|
|
||||||
{$endif}
|
|
||||||
end;
|
|
||||||
|
|
||||||
PRecordInfoFull=^TRecordInfoFull;
|
|
||||||
TRecordInfoFull=
|
|
||||||
{$ifdef USE_PACKED}
|
|
||||||
packed
|
|
||||||
{$endif USE_PACKED}
|
|
||||||
record
|
|
||||||
{$ifndef VER3_0}
|
|
||||||
InitTable: Pointer;
|
|
||||||
{$endif VER3_0}
|
|
||||||
Size: Longint;
|
|
||||||
Count: Longint;
|
|
||||||
{ Elements: array[count] of TRecordElement }
|
|
||||||
end;
|
|
||||||
|
|
||||||
PRecordInfoInit=^TRecordInfoInit;
|
|
||||||
{$ifndef VER3_0}
|
|
||||||
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
|
|
||||||
TRTTIRecVarOp=procedure(ARec: Pointer);
|
|
||||||
TRTTIRecCopyOp=procedure(ASrc, ADest: Pointer);
|
|
||||||
TRTTIRecOpType=(rotAny, rotInitialize, rotFinalize, rotAddRef, rotCopy);
|
|
||||||
PRTTIRecordOpVMT=^TRTTIRecordOpVMT;
|
|
||||||
TRTTIRecordOpVMT=
|
|
||||||
{$ifdef USE_PACKED}
|
|
||||||
packed
|
|
||||||
{$endif USE_PACKED}
|
|
||||||
record
|
|
||||||
Initialize: TRTTIRecVarOp;
|
|
||||||
Finalize: TRTTIRecVarOp;
|
|
||||||
AddRef: TRTTIRecVarOp;
|
|
||||||
Copy: TRTTIRecCopyOp;
|
|
||||||
end;
|
|
||||||
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
|
|
||||||
|
|
||||||
TRecordInfoInit=
|
|
||||||
{$ifdef USE_PACKED}
|
|
||||||
packed
|
|
||||||
{$endif USE_PACKED}
|
|
||||||
record
|
|
||||||
Terminator: Pointer;
|
|
||||||
Size: Longint;
|
|
||||||
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
|
|
||||||
RecordOp: PRTTIRecordOpVMT;
|
|
||||||
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
|
|
||||||
Count: Longint;
|
|
||||||
{ Elements: array[count] of TRecordElement }
|
|
||||||
end;
|
|
||||||
{$else VER3_0}
|
|
||||||
TRecordInfoInit=TRecordInfoFull;
|
|
||||||
{$endif VER3_0}
|
|
||||||
|
|
||||||
PArrayInfo=^TArrayInfo;
|
|
||||||
TArrayInfo=
|
|
||||||
{$ifdef USE_PACKED}
|
|
||||||
packed
|
|
||||||
{$endif USE_PACKED}
|
|
||||||
record
|
|
||||||
Size: SizeInt;
|
|
||||||
ElCount: SizeInt;
|
|
||||||
{$ifdef VER3_0}
|
|
||||||
ElInfo: Pointer;
|
|
||||||
{$else}
|
|
||||||
ElInfo: PPointer;
|
|
||||||
{$endif}
|
|
||||||
DimCount: Byte;
|
|
||||||
Dims:array[0..255] of Pointer;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function RTTIArraySize(typeInfo: Pointer): SizeInt;
|
function RTTIArraySize(typeInfo: Pointer): SizeInt;
|
||||||
begin
|
begin
|
||||||
{$ifdef VER3_0}
|
{$ifdef VER3_0}
|
||||||
|
@ -32,3 +32,89 @@ const
|
|||||||
tkManagedTypes = [tkAstring,tkWstring,tkUstring,tkArray,
|
tkManagedTypes = [tkAstring,tkWstring,tkUstring,tkArray,
|
||||||
tkObject,tkRecord,tkDynArray,tkInterface,tkVariant];
|
tkObject,tkRecord,tkDynArray,tkInterface,tkVariant];
|
||||||
|
|
||||||
|
type
|
||||||
|
PRecordElement=^TRecordElement;
|
||||||
|
TRecordElement=
|
||||||
|
{$ifdef USE_PACKED}
|
||||||
|
packed
|
||||||
|
{$endif USE_PACKED}
|
||||||
|
record
|
||||||
|
{$ifdef VER3_0}
|
||||||
|
TypeInfo: Pointer;
|
||||||
|
{$else}
|
||||||
|
TypeInfo: PPointer;
|
||||||
|
{$endif}
|
||||||
|
{$ifdef VER2_6}
|
||||||
|
Offset: Longint;
|
||||||
|
{$else}
|
||||||
|
Offset: SizeInt;
|
||||||
|
{$endif}
|
||||||
|
end;
|
||||||
|
|
||||||
|
PRecordInfoFull=^TRecordInfoFull;
|
||||||
|
TRecordInfoFull=
|
||||||
|
{$ifdef USE_PACKED}
|
||||||
|
packed
|
||||||
|
{$endif USE_PACKED}
|
||||||
|
record
|
||||||
|
{$ifndef VER3_0}
|
||||||
|
InitTable: Pointer;
|
||||||
|
{$endif VER3_0}
|
||||||
|
Size: Longint;
|
||||||
|
Count: Longint;
|
||||||
|
{ Elements: array[count] of TRecordElement }
|
||||||
|
end;
|
||||||
|
|
||||||
|
PRecordInfoInit=^TRecordInfoInit;
|
||||||
|
{$ifndef VER3_0}
|
||||||
|
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
|
||||||
|
TRTTIRecVarOp=procedure(ARec: Pointer);
|
||||||
|
TRTTIRecCopyOp=procedure(ASrc, ADest: Pointer);
|
||||||
|
TRTTIRecOpType=(rotAny, rotInitialize, rotFinalize, rotAddRef, rotCopy);
|
||||||
|
PRTTIRecordOpVMT=^TRTTIRecordOpVMT;
|
||||||
|
TRTTIRecordOpVMT=
|
||||||
|
{$ifdef USE_PACKED}
|
||||||
|
packed
|
||||||
|
{$endif USE_PACKED}
|
||||||
|
record
|
||||||
|
Initialize: TRTTIRecVarOp;
|
||||||
|
Finalize: TRTTIRecVarOp;
|
||||||
|
AddRef: TRTTIRecVarOp;
|
||||||
|
Copy: TRTTIRecCopyOp;
|
||||||
|
end;
|
||||||
|
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
|
||||||
|
|
||||||
|
TRecordInfoInit=
|
||||||
|
{$ifdef USE_PACKED}
|
||||||
|
packed
|
||||||
|
{$endif USE_PACKED}
|
||||||
|
record
|
||||||
|
Terminator: Pointer;
|
||||||
|
Size: Longint;
|
||||||
|
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
|
||||||
|
RecordOp: PRTTIRecordOpVMT;
|
||||||
|
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
|
||||||
|
Count: Longint;
|
||||||
|
{ Elements: array[count] of TRecordElement }
|
||||||
|
end;
|
||||||
|
{$else VER3_0}
|
||||||
|
TRecordInfoInit=TRecordInfoFull;
|
||||||
|
{$endif VER3_0}
|
||||||
|
|
||||||
|
PArrayInfo=^TArrayInfo;
|
||||||
|
TArrayInfo=
|
||||||
|
{$ifdef USE_PACKED}
|
||||||
|
packed
|
||||||
|
{$endif USE_PACKED}
|
||||||
|
record
|
||||||
|
Size: SizeInt;
|
||||||
|
ElCount: SizeInt;
|
||||||
|
{$ifdef VER3_0}
|
||||||
|
ElInfo: Pointer;
|
||||||
|
{$else}
|
||||||
|
ElInfo: PPointer;
|
||||||
|
{$endif}
|
||||||
|
DimCount: Byte;
|
||||||
|
Dims:array[0..255] of Pointer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user