Changeset 405 for Common/UMemory.pas


Ignore:
Timestamp:
Aug 14, 2012, 7:04:04 AM (12 years ago)
Author:
chronos
Message:
  • Modified: TemplateGenerics TBinarySerializer now use TListByte class instead TStreamByte.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/UMemory.pas

    r393 r405  
    2424    constructor Create;
    2525    destructor Destroy; override;
     26    procedure WriteMemory(Position: Integer; Memory: TMemory);
     27    procedure ReadMemory(Position: Integer; Memory: TMemory);
    2628    property Data: PByte read FData;
    2729    property Size: Integer read FSize write SetSize;
     
    108110end;
    109111
     112procedure TMemory.WriteMemory(Position: Integer; Memory: TMemory);
     113begin
     114  Move(Memory.FData, PByte(@FData + Position)^, Memory.Size);
     115end;
     116
     117procedure TMemory.ReadMemory(Position: Integer; Memory: TMemory);
     118begin
     119  Move(PByte(@FData + Position)^, Memory.FData, Memory.Size);
     120end;
     121
    110122end.
    111123
Note: See TracChangeset for help on using the changeset viewer.