⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 absdiskengine.hpp

📁 Absolute Database 5.12 src. Absolute Database lets you forget the Borland Database Engine (BDE). Th
💻 HPP
📖 第 1 页 / 共 4 页
字号:
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Absdiskengine.pas' rev: 10.00

#ifndef AbsdiskengineHPP
#define AbsdiskengineHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Math.hpp>	// Pascal unit
#include <Absexcept.hpp>	// Pascal unit
#include <Absbase.hpp>	// Pascal unit
#include <Absbaseengine.hpp>	// Pascal unit
#include <Absbtree.hpp>	// Pascal unit
#include <Absmemory.hpp>	// Pascal unit
#include <Abspage.hpp>	// Pascal unit
#include <Abscompression.hpp>	// Pascal unit
#include <Absexpressions.hpp>	// Pascal unit
#include <Abssecurity.hpp>	// Pascal unit
#include <Abscipher.hpp>	// Pascal unit
#include <Absconverts.hpp>	// Pascal unit
#include <Abstypes.hpp>	// Pascal unit
#include <Absconst.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Absdiskengine
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TABSDiskDatabaseData;
class DELPHICLASS TABSSystemDirectory;
class DELPHICLASS TABSDiskPageManager;
class DELPHICLASS TABSDatabaseFreeSpaceManager;
class PASCALIMPLEMENTATION TABSDatabaseFreeSpaceManager : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TABSDiskPageManager* LPageManager;
	int FPageCountInExtent;
	int FPFSPage_PagesAddressed;
	int FEAMPage_ExtentsAddressed;
	int FEAMPage_PagesAddressed;
	int FLastUsedPageNo;
	int FTotalPageCount;
	bool FSuppressDBHeaderErrors;
	int __fastcall GetAddPagesStep(void);
	int __fastcall GetDelPagesStep(void);
	Abspage::TABSPage* __fastcall NewPage(int PageNo);
	Abspage::TABSPage* __fastcall ReadPage(int PageNo);
	void __fastcall WriteAndFreePage(Abspage::TABSPage* &Page);
	int __fastcall CorrectEamPageNo(int EamPageNo);
	int __fastcall UncorrectEamPageNo(int EamPageNo);
	int __fastcall EamPageNoForEamPagePosition(int EamPagePosition);
	int __fastcall EamPageNoToEamPagePosition(int EamPageNo);
	int __fastcall EamPageNoForPageNo(int PageNo);
	int __fastcall GetLastEamPagePosition(void);
	int __fastcall GetLastEamPageNo(void);
	int __fastcall GetLastPfsPagePosition(void);
	bool __fastcall PfsPositionsForExtentPosition(const int ExtentPosition, /* out */ int &PfsFirstPagePosition, /* out */ int &PfsLastPagePosition);
	int __fastcall PfsPageNoForPfsPagePosition(int PfsPagePosition);
	int __fastcall PfsPageNoForPageNo(int PageNo);
	bool __fastcall IsPagePfsOrEam(int PageNo);
	int __fastcall FindAndReusePage(void);
	int __fastcall FindLastUsedPageNo(void);
	void __fastcall SetPageUsage(int PageNo, bool UsedFlag);
	void __fastcall SetPageUsageToPFS(int PageNo, bool UsedFlag);
	void __fastcall SetPageUsageToEAM(int PageNo, bool UsedFlag);
	
public:
	bool __fastcall GetPageUsageFromPFS(int PageNo);
	
private:
	int __fastcall AddNewPageAndExtentFile(void);
	void __fastcall TruncateFile(void);
	void __fastcall ReReadPageCountVariables(void);
	void __fastcall ReWritePageCountVariables(void);
	
public:
	__fastcall TABSDatabaseFreeSpaceManager(TABSDiskPageManager* aPageManager);
	int __fastcall GetPage(int DesiredStartPageNo = 0xffffffff);
	void __fastcall FreePage(int PageNo);
	void __fastcall CheckPageNoForSystemPages(int PageNo);
	__property int AddPagesStep = {read=GetAddPagesStep, nodefault};
	__property int DelPagesStep = {read=GetDelPagesStep, nodefault};
	__property bool SuppressDBHeaderErrors = {read=FSuppressDBHeaderErrors, write=FSuppressDBHeaderErrors, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TABSDatabaseFreeSpaceManager(void) { }
	#pragma option pop
	
};


class DELPHICLASS TABSDatabaseFile;
class PASCALIMPLEMENTATION TABSDatabaseFile : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FFileName;
	Abstypes::TABSAccessMode FAccessMode;
	Abstypes::TABSShareMode FShareMode;
	unsigned FAttrFlags;
	unsigned FHandle;
	bool FIsOpened;
	int DesignOpenCount;
	bool FWasCriticalError;
	unsigned __fastcall AccessModeToWindowsMode(Abstypes::TABSAccessMode am);
	unsigned __fastcall ShareModeToWindowsMode(Abstypes::TABSShareMode sm);
	void __fastcall CheckOpened(AnsiString OperationName);
	void __fastcall CheckClosed(AnsiString OperationName);
	bool __fastcall InternalSeek(__int64 Offset);
	void __fastcall Seek(__int64 Offset, int ErrorCode = 0x0);
	void __fastcall SetPosition(__int64 Offset);
	__int64 __fastcall GetPosition(void);
	void __fastcall SetSize(__int64 NewSize);
	__int64 __fastcall GetSize(void);
	
public:
	__fastcall TABSDatabaseFile(void);
	__fastcall virtual ~TABSDatabaseFile(void);
	void __fastcall CreateAndOpenFile(AnsiString FileName);
	void __fastcall DeleteFile(AnsiString FileName);
	void __fastcall RenameFile(AnsiString OldFileName, AnsiString NewFileName);
	void __fastcall OpenFile(AnsiString FileName, Abstypes::TABSAccessMode AccessMode, Abstypes::TABSShareMode ShareMode);
	void __fastcall CloseFile(void);
	void __fastcall OpenFileForDesignTime(void);
	void __fastcall CloseFileForDesignTime(void);
	bool __fastcall ReopenDatabaseFile(void);
	void __fastcall ReadBuffer(void *Buffer, const __int64 Count, const __int64 Position, int ErrorCode)/* overload */;
	bool __fastcall ReadBuffer(void *Buffer, const __int64 Count, const __int64 Position)/* overload */;
	void __fastcall WriteBuffer(const void *Buffer, const __int64 Count, const __int64 Position, int ErrorCode);
	void __fastcall FlushFileBuffers(void);
	bool __fastcall LockByte(__int64 Offset, int Count = 0x1);
	bool __fastcall UnlockByte(__int64 Offset, int Count = 0x1);
	bool __fastcall IsByteLocked(__int64 Offset);
	bool __fastcall IsRegionLocked(__int64 Offset, int Count);
	bool __fastcall FindSignature(__int64 &Offset);
	__property AnsiString FileName = {read=FFileName};
	__property __int64 Size = {read=GetSize, write=SetSize};
	__property bool IsOpened = {read=FIsOpened, nodefault};
	__property __int64 Position = {read=GetPosition, write=SetPosition};
};


class DELPHICLASS TABSDiskTablePagesCacheManager;
class DELPHICLASS TABSDTPCSessionInfo;
class PASCALIMPLEMENTATION TABSDiskTablePagesCacheManager : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	DynamicArray<TABSDTPCSessionInfo* >  FSessionInfo;
	TABSDTPCSessionInfo* __fastcall GetSessionInfo(int SessionID);
	
public:
	__fastcall TABSDiskTablePagesCacheManager(void);
	__fastcall virtual ~TABSDiskTablePagesCacheManager(void);
	void __fastcall TableIsSLocked(int SessionID, int TableID);
	void __fastcall TableIsSUnlocked(int SessionID, int TableID);
	void __fastcall TableIsRWLocked(int SessionID, int TableID);
	void __fastcall TableIsRWUnlocked(int SessionID, int TableID);
	bool __fastcall GetIsMostUpdatedLoaded(int SessionID, int TableID);
	void __fastcall SetIsMostUpdatedLoaded(int SessionID, int TableID, int TableState);
	void __fastcall BeginWorkWithTable(int SessionID, int TableID);
	void __fastcall EndWorkWithTable(int SessionID, int TableID);
	bool __fastcall GetWorkTableState(int SessionID, int &WorkTableState);
};


class PASCALIMPLEMENTATION TABSDiskPageManager : public Abspage::TABSPageManager 
{
	typedef Abspage::TABSPageManager inherited;
	
private:
	TABSDatabaseFreeSpaceManager* FDatabaseFreeSpaceManager;
	TABSDatabaseFile* FDatabaseFile;
	#pragma pack(push,1)
	Abstypes::TABSDBHeader FDBHeader;
	#pragma pack(pop)
	#pragma pack(push,1)
	Abstypes::TABSCryptoHeader FCryptoHeader;
	#pragma pack(pop)
	Abssecurity::TABSPassword FPassword;
	#pragma pack(push,1)
	Abstypes::TABSLockedBytes FLockedBytes;
	#pragma pack(pop)
	int FLockDBHeaderCount;
	bool FExclusive;
	TABSDiskTablePagesCacheManager* FTablePagesCacheManager;
	__int64 FOffsetToDBHeader;
	__int64 FOffsetToCryptoHeader;
	__int64 FOffsetToLockedBytes;
	__int64 FOffsetToLastObjectID;
	__int64 FOffsetToFirstPage;
	void __fastcall InitHeaders(void);
	void __fastcall LoadDBHeader(void);
	void __fastcall SaveDBHeader(bool PerformExternalAppUpdateCheck = true);
	Abstypes::PABSDBHeader __fastcall GetDbHeader(void);
	void __fastcall LoadCryptoHeader(void);
	void __fastcall SaveCryptoHeader(void);
	void __fastcall LoadLockedBytes(void);
	void __fastcall SaveLockedBytes(void);
	Abssecurity::PABSPassword __fastcall GetPassword(void);
	bool __fastcall GetEncrypted(void);
	bool __fastcall GetIsOpened(void);
	bool __fastcall IsFileReadOnly(AnsiString DatabaseFileName, bool &MultiUser);
	__int64 __fastcall GetPageOffset(int PageNo);
	void __fastcall OpenFileForDesignTime(void);
	void __fastcall CloseFileForDesignTime(void);
	
protected:
	virtual int __fastcall GetPageCount(void);
	virtual bool __fastcall IsSafeNotToSyncPage(int SessionID, Abspage::TABSPage* Page);
	virtual void __fastcall UpdatePageTableState(int SessionID, Abspage::TABSPage* Page);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -