Class TPagedFile

Unit

Declaration

type TPagedFile = class(TObject)

Description

This item has no description.

Hierarchy

Overview

Fields

Protected FStream: TStream;
Protected FHeaderOffset: Integer;
Protected FHeaderSize: Integer;
Protected FRecordSize: Integer;
Protected FPageSize: Integer;
Protected FRecordCount: Integer;
Protected FPagesPerRecord: Integer;
Protected FCachedSize: Integer;
Protected FCachedRecordCount: Integer;
Protected FHeader: PChar;
Protected FActive: Boolean;
Protected FNeedRecalc: Boolean;
Protected FHeaderModified: Boolean;
Protected FPageOffsetByHeader: Boolean;
Protected FMode: TPagedFileMode;
Protected FTempMode: TPagedFileMode;
Protected FUserMode: TPagedFileMode;
Protected FAutoCreate: Boolean;
Protected FNeedLocks: Boolean;
Protected FVirtualLocks: Boolean;
Protected FFileLocked: Boolean;
Protected FFileName: string;
Protected FBufferPtr: Pointer;
Protected FBufferAhead: Boolean;
Protected FBufferPage: Integer;
Protected FBufferOffset: Integer;
Protected FBufferSize: Integer;
Protected FBufferReadSize: Integer;
Protected FBufferMaxSize: Integer;
Protected FBufferModified: Boolean;
Protected FWriteError: Boolean;

Methods

Protected procedure SetHeaderOffset(NewValue: Integer); virtual;
Protected procedure SetRecordSize(NewValue: Integer); virtual;
Protected procedure SetHeaderSize(NewValue: Integer); virtual;
Protected procedure SetPageSize(NewValue: Integer);
Protected procedure SetPageOffsetByHeader(NewValue: Boolean); virtual;
Protected procedure SetRecordCount(NewValue: Integer);
Protected procedure SetBufferAhead(NewValue: Boolean);
Protected procedure SetFileName(NewName: string);
Protected procedure SetStream(NewStream: TStream);
Protected function LockSection(const Offset, Length: Cardinal; const Wait: Boolean): Boolean; virtual;
Protected function UnlockSection(const Offset, Length: Cardinal): Boolean; virtual;
Protected procedure UpdateBufferSize;
Protected procedure RecalcPagesPerRecord;
Protected procedure ReadHeader;
Protected procedure FlushHeader;
Protected procedure FlushBuffer;
Protected function ReadChar: Byte;
Protected procedure WriteChar(c: Byte);
Protected procedure CheckCachedSize(const APosition: Integer);
Protected procedure SynchronizeBuffer(IntRecNum: Integer);
Protected function Read(Buffer: Pointer; ASize: Integer): Integer;
Protected function ReadBlock(const BlockPtr: Pointer; const ASize, APosition: Integer): Integer;
Protected function SingleReadRecord(IntRecNum: Integer; Buffer: Pointer): Integer;
Protected procedure WriteBlock(const BlockPtr: Pointer; const ASize, APosition: Integer);
Protected procedure SingleWriteRecord(IntRecNum: Integer; Buffer: Pointer);
Protected function GetRecordCount: Integer;
Protected procedure UpdateCachedSize(CurrPos: Integer);
Public constructor Create;
Public destructor Destroy; override;
Public procedure CloseFile; virtual;
Public procedure OpenFile; virtual;
Public procedure DeleteFile;
Public procedure TryExclusive; virtual;
Public procedure EndExclusive; virtual;
Public procedure CheckExclusiveAccess;
Public procedure DisableForceCreate;
Public function CalcPageOffset(const PageNo: Integer): Integer;
Public function IsRecordPresent(IntRecNum: Integer): boolean;
Public function ReadRecord(IntRecNum: Integer; Buffer: Pointer): Integer; virtual;
Public procedure WriteRecord(IntRecNum: Integer; Buffer: Pointer); virtual;
Public procedure WriteHeader; virtual;
Public function FileCreated: Boolean;
Public function IsSharedAccess: Boolean;
Public procedure ResetError;
Public function LockPage(const PageNo: Integer; const Wait: Boolean): Boolean;
Public function LockAllPages(const Wait: Boolean): Boolean;
Public procedure UnlockPage(const PageNo: Integer);
Public procedure UnlockAllPages;
Public procedure Flush; virtual;

Properties

Protected property VirtualLocks: Boolean read FVirtualLocks write FVirtualLocks;
Public property Active: Boolean read FActive;
Public property AutoCreate: Boolean read FAutoCreate write FAutoCreate;
Public property Mode: TPagedFileMode read FMode write FMode;
Public property TempMode: TPagedFileMode read FTempMode;
Public property NeedLocks: Boolean read FNeedLocks;
Public property HeaderOffset: Integer read FHeaderOffset write SetHeaderOffset;
Public property HeaderSize: Integer read FHeaderSize write SetHeaderSize;
Public property RecordSize: Integer read FRecordSize write SetRecordSize;
Public property PageSize: Integer read FPageSize write SetPageSize;
Public property PagesPerRecord: Integer read FPagesPerRecord;
Public property RecordCount: Integer read GetRecordCount write SetRecordCount;
Public property CachedRecordCount: Integer read FCachedRecordCount;
Public property PageOffsetByHeader: Boolean read FPageOffsetbyHeader write SetPageOffsetByHeader;
Public property FileLocked: Boolean read FFileLocked;
Public property Header: PChar read FHeader;
Public property FileName: string read FFileName write SetFileName;
Public property Stream: TStream read FStream write SetStream;
Public property BufferAhead: Boolean read FBufferAhead write SetBufferAhead;
Public property WriteError: Boolean read FWriteError;

Description

Fields

Protected FStream: TStream;

This item has no description.

Protected FHeaderOffset: Integer;

This item has no description.

Protected FHeaderSize: Integer;

This item has no description.

Protected FRecordSize: Integer;

This item has no description.

Protected FPageSize: Integer;

This item has no description.

Protected FRecordCount: Integer;

This item has no description.

Protected FPagesPerRecord: Integer;

This item has no description.

Protected FCachedSize: Integer;

This item has no description.

Protected FCachedRecordCount: Integer;

This item has no description.

Protected FHeader: PChar;

This item has no description.

Protected FActive: Boolean;

This item has no description.

Protected FNeedRecalc: Boolean;

This item has no description.

Protected FHeaderModified: Boolean;

This item has no description.

Protected FPageOffsetByHeader: Boolean;

This item has no description.

Protected FMode: TPagedFileMode;

This item has no description.

Protected FTempMode: TPagedFileMode;

This item has no description.

Protected FUserMode: TPagedFileMode;

This item has no description.

Protected FAutoCreate: Boolean;

This item has no description.

Protected FNeedLocks: Boolean;

This item has no description.

Protected FVirtualLocks: Boolean;

This item has no description.

Protected FFileLocked: Boolean;

This item has no description.

Protected FFileName: string;

This item has no description.

Protected FBufferPtr: Pointer;

This item has no description.

Protected FBufferAhead: Boolean;

This item has no description.

Protected FBufferPage: Integer;

This item has no description.

Protected FBufferOffset: Integer;

This item has no description.

Protected FBufferSize: Integer;

This item has no description.

Protected FBufferReadSize: Integer;

This item has no description.

Protected FBufferMaxSize: Integer;

This item has no description.

Protected FBufferModified: Boolean;

This item has no description.

Protected FWriteError: Boolean;

This item has no description.

Methods

Protected procedure SetHeaderOffset(NewValue: Integer); virtual;

This item has no description.

Protected procedure SetRecordSize(NewValue: Integer); virtual;

This item has no description.

Protected procedure SetHeaderSize(NewValue: Integer); virtual;

This item has no description.

Protected procedure SetPageSize(NewValue: Integer);

This item has no description.

Protected procedure SetPageOffsetByHeader(NewValue: Boolean); virtual;

This item has no description.

Protected procedure SetRecordCount(NewValue: Integer);

This item has no description.

Protected procedure SetBufferAhead(NewValue: Boolean);

This item has no description.

Protected procedure SetFileName(NewName: string);

This item has no description.

Protected procedure SetStream(NewStream: TStream);

This item has no description.

Protected function LockSection(const Offset, Length: Cardinal; const Wait: Boolean): Boolean; virtual;

This item has no description.

Protected function UnlockSection(const Offset, Length: Cardinal): Boolean; virtual;

This item has no description.

Protected procedure UpdateBufferSize;

This item has no description.

Protected procedure RecalcPagesPerRecord;

This item has no description.

Protected procedure ReadHeader;

This item has no description.

Protected procedure FlushHeader;

This item has no description.

Protected procedure FlushBuffer;

This item has no description.

Protected function ReadChar: Byte;

This item has no description.

Protected procedure WriteChar(c: Byte);

This item has no description.

Protected procedure CheckCachedSize(const APosition: Integer);

This item has no description.

Protected procedure SynchronizeBuffer(IntRecNum: Integer);

This item has no description.

Protected function Read(Buffer: Pointer; ASize: Integer): Integer;

This item has no description.

Protected function ReadBlock(const BlockPtr: Pointer; const ASize, APosition: Integer): Integer;

This item has no description.

Protected function SingleReadRecord(IntRecNum: Integer; Buffer: Pointer): Integer;

This item has no description.

Protected procedure WriteBlock(const BlockPtr: Pointer; const ASize, APosition: Integer);

This item has no description.

Protected procedure SingleWriteRecord(IntRecNum: Integer; Buffer: Pointer);

This item has no description.

Protected function GetRecordCount: Integer;

This item has no description.

Protected procedure UpdateCachedSize(CurrPos: Integer);

This item has no description.

Public constructor Create;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure CloseFile; virtual;

This item has no description.

Public procedure OpenFile; virtual;

This item has no description.

Public procedure DeleteFile;

This item has no description.

Public procedure TryExclusive; virtual;

This item has no description.

Public procedure EndExclusive; virtual;

This item has no description.

Public procedure CheckExclusiveAccess;

This item has no description.

Public procedure DisableForceCreate;

This item has no description.

Public function CalcPageOffset(const PageNo: Integer): Integer;

This item has no description.

Public function IsRecordPresent(IntRecNum: Integer): boolean;

This item has no description.

Public function ReadRecord(IntRecNum: Integer; Buffer: Pointer): Integer; virtual;

This item has no description.

Public procedure WriteRecord(IntRecNum: Integer; Buffer: Pointer); virtual;

This item has no description.

Public procedure WriteHeader; virtual;

This item has no description.

Public function FileCreated: Boolean;

This item has no description.

Public function IsSharedAccess: Boolean;

This item has no description.

Public procedure ResetError;

This item has no description.

Public function LockPage(const PageNo: Integer; const Wait: Boolean): Boolean;

This item has no description.

Public function LockAllPages(const Wait: Boolean): Boolean;

This item has no description.

Public procedure UnlockPage(const PageNo: Integer);

This item has no description.

Public procedure UnlockAllPages;

This item has no description.

Public procedure Flush; virtual;

This item has no description.

Properties

Protected property VirtualLocks: Boolean read FVirtualLocks write FVirtualLocks;

This item has no description.

Public property Active: Boolean read FActive;

This item has no description.

Public property AutoCreate: Boolean read FAutoCreate write FAutoCreate;

This item has no description.

Public property Mode: TPagedFileMode read FMode write FMode;

This item has no description.

Public property TempMode: TPagedFileMode read FTempMode;

This item has no description.

Public property NeedLocks: Boolean read FNeedLocks;

This item has no description.

Public property HeaderOffset: Integer read FHeaderOffset write SetHeaderOffset;

This item has no description.

Public property HeaderSize: Integer read FHeaderSize write SetHeaderSize;

This item has no description.

Public property RecordSize: Integer read FRecordSize write SetRecordSize;

This item has no description.

Public property PageSize: Integer read FPageSize write SetPageSize;

This item has no description.

Public property PagesPerRecord: Integer read FPagesPerRecord;

This item has no description.

Public property RecordCount: Integer read GetRecordCount write SetRecordCount;

This item has no description.

Public property CachedRecordCount: Integer read FCachedRecordCount;

This item has no description.

Public property PageOffsetByHeader: Boolean read FPageOffsetbyHeader write SetPageOffsetByHeader;

This item has no description.

Public property FileLocked: Boolean read FFileLocked;

This item has no description.

Public property Header: PChar read FHeader;

This item has no description.

Public property FileName: string read FFileName write SetFileName;

This item has no description.

Public property Stream: TStream read FStream write SetStream;

This item has no description.

Public property BufferAhead: Boolean read FBufferAhead write SetBufferAhead;

This item has no description.

Public property WriteError: Boolean read FWriteError;

This item has no description.


Generated by PasDoc 0.17.0.snapshot.