17#ifndef __XB_XBMEMO_H__
18#define __XB_XBMEMO_H__
55class XBDLLEXPORT xbMemo :
public xbFile {
58 xbMemo(
xbDbf *dbf, xbString
const &sFileName );
62 virtual xbInt16 Abort () = 0;
63 virtual xbInt16 CloseMemoFile ();
64 virtual xbInt16 Commit () = 0;
65 virtual xbInt16 CreateMemoFile () = 0;
67 virtual xbInt16 DumpMemoHeader () = 0;
70 virtual xbInt16 GetMemoField ( xbInt16 iFieldNo, xbString &sMemoData ) = 0;
71 virtual xbInt16 GetMemoFieldLen ( xbInt16 iFieldNo, xbUInt32 &ulMemoFieldLen ) = 0;
72 virtual xbInt16 OpenMemoFile () = 0;
73 virtual xbInt16 GetMemoFileType ();
74 virtual xbInt16 PackMemo (
void (*memoStatusFunc)(xbUInt32 ulItemNum, xbUInt32 ulNumItems)) = 0;
75 virtual xbInt16 UpdateMemoField ( xbInt16 iFieldNo,
const xbString &sMemoData ) = 0;
77 #ifdef XB_DEBUG_SUPPORT
78 virtual xbInt16 DumpMemoFreeChain() = 0;
81 #ifdef XB_LOCKING_SUPPORT
82 virtual xbInt16 LockMemo ( xbInt16 iLockFunction );
83 virtual xbBool GetMemoLocked ()
const;
91 virtual xbInt16 CalcLastDataBlock ( xbUInt32 &lLastDataBlock );
92 virtual xbInt16 GetHdrNextBlock ( xbUInt32 &ulBlockNo );
97 virtual xbInt16 ReadDbtHeader ( xbInt16 iOption ) = 0;
98 virtual xbInt16 UpdateHeaderName () = 0;
99 virtual xbInt16 UpdateHeadNextNode();
100 virtual xbInt16 Zap () = 0;
104 xbInt16 iMemoFileType;
105 xbUInt32 ulHdrNextBlock;
111 #ifdef XB_LOCKING_SUPPORT
119#ifdef XB_DBF3_SUPPORT
133class XBDLLEXPORT xbMemoDbt3 :
public xbMemo {
135 xbMemoDbt3(
xbDbf *dbf, xbString
const &sFileName );
137 virtual xbInt16 Abort ();
138 virtual xbInt16 Commit ();
139 virtual xbInt16 CreateMemoFile ();
140 virtual xbInt16 DumpMemoHeader ();
141 virtual xbInt16 GetMemoField ( xbInt16 iFieldNo, xbString &sMemoData );
142 virtual xbInt16 GetMemoFieldLen( xbInt16 iFieldNo, xbUInt32 &ulMemoFieldLen );
143 virtual xbInt16 OpenMemoFile ();
144 virtual xbInt16 PackMemo (
void (*memoStatusFunc) (xbUInt32 ulItemNum, xbUInt32 ulNumItems));
145 virtual xbInt16 UpdateMemoField( xbInt16 iFieldNo,
const xbString &sMemoData );
147 #ifdef XB_DEBUG_SUPPORT
148 virtual xbInt16 DumpMemoFreeChain();
152 virtual xbInt16 ReadDbtHeader( xbInt16 iOption );
153 virtual xbInt16 UpdateHeaderName();
154 virtual xbInt16 Zap();
161#ifdef XB_DBF4_SUPPORT
174class XBDLLEXPORT xbMemoDbt4 :
public xbMemo {
176 xbMemoDbt4(
xbDbf *dbf, xbString
const &sFileName );
178 virtual xbInt16 Abort ();
179 virtual xbInt16 Commit ();
180 virtual xbInt16 CreateMemoFile ();
181 virtual xbInt16 DumpMemoHeader ();
182 virtual xbInt16 GetMemoField ( xbInt16 iFieldNo, xbString &sMemoData );
183 virtual xbInt16 GetMemoFieldLen ( xbInt16 iFieldNo, xbUInt32 &ulMemoFieldLen );
184 virtual xbInt16 GetMemoFieldLen ( xbInt16 iFieldNo, xbUInt32 &ulMemoFieldLen, xbUInt32 &lBlockNo );
185 virtual xbInt16 OpenMemoFile ();
186 virtual xbInt16 PackMemo (
void (*memoStatusFunc) (xbUInt32 ulItemNum, xbUInt32 ulNumItems));
187 virtual xbInt16 UpdateMemoField ( xbInt16 iFieldNo,
const xbString &sMemoData );
189 #ifdef XB_DEBUG_SUPPORT
190 virtual xbInt16 DumpMemoFreeChain ();
191 virtual xbInt16 DumpMemoInternals ();
192 virtual xbInt16 ReadFreeBlockHeader( xbUInt32 ulBlockNo, xbUInt32 &ulNextBlock, xbUInt32 &ulFreeBlockCnt );
196 virtual xbInt16 FindBlockSetInChain( xbUInt32 ulBlocksNeeded, xbUInt32 &ulLastDataBlock, xbUInt32 &ulLocation, xbUInt32 &ulPrevNode,
xbBool &bFound );
197 virtual xbInt16 FreeMemoBlockChain( xbUInt32 ulBlockNo );
198 virtual xbInt16 FreeMemoBlockChain( xbUInt32 ulBlockNo, xbUInt32 &ulLastDataBlock );
199 virtual xbInt16 GetBlockSetFromChain( xbUInt32 ulBlocksNeeded, xbUInt32 ulLocation, xbUInt32 ulPrevNode );
200 virtual xbInt16 ReadDbtHeader( xbInt16 iOption );
201 virtual xbInt16 ReadBlockHeader( xbUInt32 ulBlockNo, xbInt16 iOption );
202 virtual xbInt16 UpdateHeaderName ();
203 virtual xbInt16 WriteBlockHeader( xbUInt32 ulBlockNo, xbInt16 iOption );
204 virtual xbInt16 Zap();
207 xbString sDbfFileNameWoExt;
208 xbUInt32 ulNextFreeBlock;
209 xbUInt32 ulFreeBlockCnt;
214 xbLinkList<xbUInt32> llOldBlocks;
215 xbLinkList<xbUInt32> llNewBlocks;
Definition: xbdate.cpp:19
short int xbBool
Definition: xbtypes.h:24
class XBDLLEXPORT xbDbf
Definition: xbtblmgr.h:28