Skip to content

TMarshal

Declaration

Source position: objpash.inc line 804

type

  TMarshal = class
  public
    TUnicodeCharArray = Array of UnicodeChar = WideChar;
    Tint8Array = Array of Int8 = ShortInt;
    Tint16Array = Array of Int16 = SmallInt;
    Tint32Array = Array of Int32 = LongInt;
    Tint64Array = Array of Int64;
    TUint8Array = Array of UInt8 = Byte;
    TUint16Array = Array of UInt16 = Word;
    TUint32Array = Array of UInt32 = Cardinal;
    TUint64Array = Array of UInt64 = QWord;
    constructor Create;
    class function AllocMem : TPtrWrapper;
    class function ReallocMem : TPtrWrapper;
    class procedure FreeMem;
    class procedure Move;
    class function UnsafeAddrOf : TPtrWrapper;
    class function AsAnsi(const S: UnicodeString) : AnsiString;
    class function AsAnsi(S: PUnicodeChar) : AnsiString;
    class function InOutString : PUnicodeChar;
    class function InString : PUnicodeChar;
    class function OutString : PUnicodeChar;
    class function AllocStringAsAnsi(const Str: UnicodeString) : TPtrWrapper;
    class function AllocStringAsAnsi(const Str: UnicodeString; 
                                CodePage: Word) : TPtrWrapper;
    class function AllocStringAsAnsi(S: PUnicodeChar) : TPtrWrapper;
    class function AllocStringAsAnsi(S: PUnicodeChar; CodePage: Word)
                                 : TPtrWrapper;
    class function AllocStringAsAnsi(S: PUnicodeChar; Len: SizeInt; 
                                CodePage: Word) : TPtrWrapper;
    class function AllocStringAsUnicode : TPtrWrapper;
    class function AllocStringAsUtf8(const Str: UnicodeString) : TPtrWrapper;
    class function AllocStringAsUtf8(S: PUnicodeChar) : TPtrWrapper;
    class procedure Copy(const Src: TUnicodeCharArray; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TUnicodeCharArray; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TUint8Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TUint8Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TInt8Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TInt8Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TUInt16Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TUInt16Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TInt16Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TInt16Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TInt32Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TInt32Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TInt64Array; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TInt64Array; 
                    StartIndex: SizeInt; Count: SizeInt);
    class procedure Copy(const Src: TPtrWrapperArray; StartIndex: SizeInt; 
                    Dest: TPtrWrapper; Count: SizeInt);
    class procedure Copy(Src: TPtrWrapper; var Dest: TPtrWrapperArray; 
                    StartIndex: SizeInt; Count: SizeInt);
    class function FixString : TPtrWrapper;
    class function UnsafeFixString : TPtrWrapper;
    class procedure UnfixString;
    class function ReadStringAsAnsi(Ptr: TPtrWrapper; Len: SizeInt=- 1)
                                : UnicodeString;
    class function ReadStringAsAnsi(CodePage: Word; Ptr: TPtrWrapper; 
                               Len: SizeInt=- 1) : UnicodeString;
    class function ReadStringAsAnsiUpTo : UnicodeString;
    class procedure WriteStringAsAnsi(Ptr: TPtrWrapper; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt);
    class procedure WriteStringAsAnsi(Ptr: TPtrWrapper; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt; 
                                 CodePage: Word);
    class procedure WriteStringAsAnsi(Ptr: TPtrWrapper; Ofs: SizeInt; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt);
    class procedure WriteStringAsAnsi(Ptr: TPtrWrapper; Ofs: SizeInt; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt; 
                                 CodePage: Word);
    class function ReadStringAsUnicode : UnicodeString;
    class function ReadStringAsUnicodeUpTo : UnicodeString;
    class procedure WriteStringAsUnicode(Ptr: TPtrWrapper; 
                                    const Value: UnicodeString; 
                                    MaxCharsIncNull: SizeInt);
    class procedure WriteStringAsUnicode(Ptr: TPtrWrapper; Ofs: SizeInt; 
                                    const Value: UnicodeString; 
                                    MaxCharsIncNull: SizeInt);
    class function ReadStringAsUtf8 : UnicodeString;
    class function ReadStringAsUtf8UpTo : UnicodeString;
    class procedure WriteStringAsUtf8(Ptr: TPtrWrapper; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt);
    class procedure WriteStringAsUtf8(Ptr: TPtrWrapper; Ofs: SizeInt; 
                                 const Value: UnicodeString; 
                                 MaxCharsIncNull: SizeInt);
    class function FixArray : TPtrWrapper;
    class procedure UnfixArray;
    class function ReadByte : Byte;
    class procedure WriteByte(Ptr: TPtrWrapper; Ofs: SizeInt; Value: Byte);
    class procedure WriteByte(Ptr: TPtrWrapper; Value: Byte);
    class function ReadInt16 : Int16;
    class procedure WriteInt16(Ptr: TPtrWrapper; Ofs: SizeInt; Value: Int16);
    class procedure WriteInt16(Ptr: TPtrWrapper; Value: Int16);
    class function ReadInt32 : Int32;
    class procedure WriteInt32(Ptr: TPtrWrapper; Ofs: SizeInt; Value: Int32);
    class procedure WriteInt32(Ptr: TPtrWrapper; Value: Int32);
    class function ReadInt64 : Int64;
    class procedure WriteInt64(Ptr: TPtrWrapper; Ofs: SizeInt; Value: Int64);
    class procedure WriteInt64(Ptr: TPtrWrapper; Value: Int64);
    class function ReadPtr : TPtrWrapper;
    class procedure WritePtr(Ptr: TPtrWrapper; Ofs: SizeInt; 
                        Value: TPtrWrapper);
    class procedure WritePtr(Ptr: TPtrWrapper; Value: TPtrWrapper);
  end;

Inheritance

Methods

Member Visibility Description
AllocMem public
AllocStringAsAnsi public
AllocStringAsUnicode public
AllocStringAsUtf8 public
AsAnsi public
Copy public
Create public
FixArray public
FixString public
FreeMem public
InOutString public
InString public
Move public
OutString public
ReadByte public
ReadInt16 public
ReadInt32 public
ReadInt64 public
ReadPtr public
ReadStringAsAnsi public
ReadStringAsAnsiUpTo public
ReadStringAsUnicode public
ReadStringAsUnicodeUpTo public
ReadStringAsUtf8 public
ReadStringAsUtf8UpTo public
ReallocMem public
UnfixArray public
UnfixString public
UnsafeAddrOf public
UnsafeFixString public
WriteByte public
WriteInt16 public
WriteInt32 public
WriteInt64 public
WritePtr public
WriteStringAsAnsi public
WriteStringAsUnicode public
WriteStringAsUtf8 public