\hypertarget{xbmemo_8h_source}{}\doxysection{xbmemo.\+h}
\label{xbmemo_8h_source}\index{/mnt/1Tdata/xbase/xbase64-\/4.0.3/src/include/xbmemo.h@{/mnt/1Tdata/xbase/xbase64-\/4.0.3/src/include/xbmemo.h}}
\mbox{\hyperlink{xbmemo_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{comment}{/*  xbmemo.h}}
\DoxyCodeLine{2 \textcolor{comment}{}}
\DoxyCodeLine{3 \textcolor{comment}{XBase64 Software Library}}
\DoxyCodeLine{4 \textcolor{comment}{}}
\DoxyCodeLine{5 \textcolor{comment}{Copyright (c) 1997,2003,2014,2022 Gary A Kunkel}}
\DoxyCodeLine{6 \textcolor{comment}{}}
\DoxyCodeLine{7 \textcolor{comment}{The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.}}
\DoxyCodeLine{8 \textcolor{comment}{}}
\DoxyCodeLine{9 \textcolor{comment}{Email Contact:}}
\DoxyCodeLine{10 \textcolor{comment}{}}
\DoxyCodeLine{11 \textcolor{comment}{    XDB-\/devel@lists.sourceforge.net}}
\DoxyCodeLine{12 \textcolor{comment}{    XDB-\/users@lists.sourceforge.net}}
\DoxyCodeLine{13 \textcolor{comment}{}}
\DoxyCodeLine{14 \textcolor{comment}{*/}}
\DoxyCodeLine{15 }
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{preprocessor}{\#ifndef \_\_XB\_XBMEMO\_H\_\_}}
\DoxyCodeLine{18 \textcolor{preprocessor}{\#define \_\_XB\_XBMEMO\_H\_\_}}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 }
\DoxyCodeLine{21 \textcolor{comment}{// dont use "{}\#pragma interface"{} with abstract classes}}
\DoxyCodeLine{22 \textcolor{comment}{// \#ifdef  CMAKE\_COMPILER\_IS\_GNUCC}}
\DoxyCodeLine{23 \textcolor{comment}{// \#pragma interface}}
\DoxyCodeLine{24 \textcolor{comment}{// \#endif}}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{preprocessor}{\#ifdef XB\_MEMO\_SUPPORT}}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 }
\DoxyCodeLine{29 }
\DoxyCodeLine{30 }
\DoxyCodeLine{31 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespacexb}{xb}}\{}
\DoxyCodeLine{32 }
\DoxyCodeLine{34 }
\DoxyCodeLine{55 \textcolor{keyword}{class }XBDLLEXPORT xbMemo : \textcolor{keyword}{public} xbFile \{}
\DoxyCodeLine{56  \textcolor{keyword}{public}:}
\DoxyCodeLine{57 }
\DoxyCodeLine{58   xbMemo( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *dbf, xbString \textcolor{keyword}{const} \&sFileName );}
\DoxyCodeLine{59 }
\DoxyCodeLine{60   \textcolor{comment}{/* virtual methods */}}
\DoxyCodeLine{61   \textcolor{keyword}{virtual} \string~xbMemo();}
\DoxyCodeLine{62   \textcolor{keyword}{virtual} xbInt16 Abort            () = 0;}
\DoxyCodeLine{63   \textcolor{keyword}{virtual} xbInt16 CloseMemoFile    ();}
\DoxyCodeLine{64   \textcolor{keyword}{virtual} xbInt16 Commit           () = 0;}
\DoxyCodeLine{65   \textcolor{keyword}{virtual} xbInt16 CreateMemoFile   () = 0;}
\DoxyCodeLine{66   }
\DoxyCodeLine{67   \textcolor{keyword}{virtual} xbInt16 DumpMemoHeader   () = 0;}
\DoxyCodeLine{68 }
\DoxyCodeLine{69 }
\DoxyCodeLine{70   \textcolor{keyword}{virtual} xbInt16 GetMemoField     ( xbInt16 iFieldNo, xbString \&sMemoData ) = 0;}
\DoxyCodeLine{71   \textcolor{keyword}{virtual} xbInt16 GetMemoFieldLen  ( xbInt16 iFieldNo, xbUInt32 \&ulMemoFieldLen ) = 0;}
\DoxyCodeLine{72   \textcolor{keyword}{virtual} xbInt16 OpenMemoFile     () = 0;}
\DoxyCodeLine{73   \textcolor{keyword}{virtual} xbInt16 GetMemoFileType  ();}
\DoxyCodeLine{74   \textcolor{keyword}{virtual} xbInt16 PackMemo         ( \textcolor{keywordtype}{void} (*memoStatusFunc)(xbUInt32 ulItemNum, xbUInt32 ulNumItems)) = 0;}
\DoxyCodeLine{75   \textcolor{keyword}{virtual} xbInt16 UpdateMemoField  ( xbInt16 iFieldNo, \textcolor{keyword}{const} xbString \&sMemoData ) = 0;}
\DoxyCodeLine{76 }
\DoxyCodeLine{77 \textcolor{preprocessor}{  \#ifdef XB\_DEBUG\_SUPPORT}}
\DoxyCodeLine{78   \textcolor{keyword}{virtual} xbInt16 DumpMemoFreeChain() = 0;}
\DoxyCodeLine{79 \textcolor{preprocessor}{  \#endif}}
\DoxyCodeLine{80 }
\DoxyCodeLine{81 \textcolor{preprocessor}{  \#ifdef XB\_LOCKING\_SUPPORT}}
\DoxyCodeLine{82   \textcolor{keyword}{virtual} xbInt16 LockMemo         ( xbInt16 iLockFunction );}
\DoxyCodeLine{83   \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}}  GetMemoLocked    () \textcolor{keyword}{const};}
\DoxyCodeLine{84 \textcolor{preprocessor}{  \#endif}}
\DoxyCodeLine{85 }
\DoxyCodeLine{86 }
\DoxyCodeLine{87 }
\DoxyCodeLine{88   \textcolor{comment}{// *********** FIXME *************}}
\DoxyCodeLine{89   \textcolor{comment}{// next two methods should be protected but are called in the xb\_test\_xxxx programs testing routines}}
\DoxyCodeLine{90   \textcolor{comment}{// so for now, they are kept as public}}
\DoxyCodeLine{91   \textcolor{keyword}{virtual} xbInt16 CalcLastDataBlock  ( xbUInt32 \&lLastDataBlock );}
\DoxyCodeLine{92   \textcolor{keyword}{virtual} xbInt16 GetHdrNextBlock    ( xbUInt32 \&ulBlockNo );}
\DoxyCodeLine{93 }
\DoxyCodeLine{94  \textcolor{keyword}{protected}:}
\DoxyCodeLine{95   \textcolor{keyword}{friend}  \textcolor{keyword}{class   }\mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}};}
\DoxyCodeLine{96 }
\DoxyCodeLine{97   \textcolor{keyword}{virtual} xbInt16 ReadDbtHeader     ( xbInt16 iOption ) = 0;}
\DoxyCodeLine{98   \textcolor{keyword}{virtual} xbInt16 UpdateHeaderName  () = 0;}
\DoxyCodeLine{99   \textcolor{keyword}{virtual} xbInt16 UpdateHeadNextNode();}
\DoxyCodeLine{100   \textcolor{keyword}{virtual} xbInt16 Zap            () = 0;}
\DoxyCodeLine{101 }
\DoxyCodeLine{102   \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}}    *dbf;                 \textcolor{comment}{/* pointer to related dbf instance                                   */}}
\DoxyCodeLine{103   \textcolor{keywordtype}{char}     cVersion;             \textcolor{comment}{/* byte 16 off the header block, 0x03 for V3, version IV -\/ ?         */}}
\DoxyCodeLine{104   xbInt16  iMemoFileType;        \textcolor{comment}{/* 3 = version  III, 4 = version IV                                  */}}
\DoxyCodeLine{105   xbUInt32 ulHdrNextBlock;       \textcolor{comment}{/* next available block , bytes 0-\/3 of the memo header               */}}
\DoxyCodeLine{106   \textcolor{keywordtype}{void} *   mbb;                  \textcolor{comment}{/* memo block buffer                                                 */}}
\DoxyCodeLine{107 }
\DoxyCodeLine{108 }
\DoxyCodeLine{109  \textcolor{keyword}{private}:}
\DoxyCodeLine{110 }
\DoxyCodeLine{111 \textcolor{preprocessor}{  \#ifdef XB\_LOCKING\_SUPPORT}}
\DoxyCodeLine{112   \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bFileLocked;           \textcolor{comment}{/* memo file locked */}}
\DoxyCodeLine{113 \textcolor{preprocessor}{  \#endif}}
\DoxyCodeLine{114 }
\DoxyCodeLine{115 \};}
\DoxyCodeLine{116 }
\DoxyCodeLine{117 }
\DoxyCodeLine{118 }
\DoxyCodeLine{119 \textcolor{preprocessor}{\#ifdef XB\_DBF3\_SUPPORT}}
\DoxyCodeLine{121 }
\DoxyCodeLine{133 \textcolor{keyword}{class }XBDLLEXPORT xbMemoDbt3 : \textcolor{keyword}{public} xbMemo \{}
\DoxyCodeLine{134  \textcolor{keyword}{public}:}
\DoxyCodeLine{135   xbMemoDbt3( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *dbf, xbString \textcolor{keyword}{const} \&sFileName );}
\DoxyCodeLine{136   \string~xbMemoDbt3();}
\DoxyCodeLine{137   \textcolor{keyword}{virtual} xbInt16 Abort          ();}
\DoxyCodeLine{138   \textcolor{keyword}{virtual} xbInt16 Commit         ();}
\DoxyCodeLine{139   \textcolor{keyword}{virtual} xbInt16 CreateMemoFile ();}
\DoxyCodeLine{140   \textcolor{keyword}{virtual} xbInt16 DumpMemoHeader ();}
\DoxyCodeLine{141   \textcolor{keyword}{virtual} xbInt16 GetMemoField   ( xbInt16 iFieldNo, xbString \&sMemoData );}
\DoxyCodeLine{142   \textcolor{keyword}{virtual} xbInt16 GetMemoFieldLen( xbInt16 iFieldNo, xbUInt32 \&ulMemoFieldLen );}
\DoxyCodeLine{143   \textcolor{keyword}{virtual} xbInt16 OpenMemoFile   ();}
\DoxyCodeLine{144   \textcolor{keyword}{virtual} xbInt16 PackMemo       ( \textcolor{keywordtype}{void} (*memoStatusFunc) (xbUInt32 ulItemNum, xbUInt32 ulNumItems));}
\DoxyCodeLine{145   \textcolor{keyword}{virtual} xbInt16 UpdateMemoField( xbInt16 iFieldNo, \textcolor{keyword}{const} xbString \&sMemoData );}
\DoxyCodeLine{146 }
\DoxyCodeLine{147 \textcolor{preprocessor}{  \#ifdef XB\_DEBUG\_SUPPORT}}
\DoxyCodeLine{148   \textcolor{keyword}{virtual} xbInt16 DumpMemoFreeChain();}
\DoxyCodeLine{149 \textcolor{preprocessor}{  \#endif}}
\DoxyCodeLine{150 }
\DoxyCodeLine{151  \textcolor{keyword}{protected}:}
\DoxyCodeLine{152   \textcolor{keyword}{virtual} xbInt16 ReadDbtHeader( xbInt16 iOption );}
\DoxyCodeLine{153   \textcolor{keyword}{virtual} xbInt16 UpdateHeaderName();}
\DoxyCodeLine{154   \textcolor{keyword}{virtual} xbInt16 Zap();}
\DoxyCodeLine{155 }
\DoxyCodeLine{156  \textcolor{keyword}{private}:}
\DoxyCodeLine{157 \};}
\DoxyCodeLine{158 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{159 }
\DoxyCodeLine{160 }
\DoxyCodeLine{161 \textcolor{preprocessor}{\#ifdef XB\_DBF4\_SUPPORT}}
\DoxyCodeLine{162 }
\DoxyCodeLine{164 }
\DoxyCodeLine{174 \textcolor{keyword}{class }XBDLLEXPORT xbMemoDbt4 : \textcolor{keyword}{public} xbMemo \{}
\DoxyCodeLine{175  \textcolor{keyword}{public}:}
\DoxyCodeLine{176   xbMemoDbt4( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *dbf, xbString \textcolor{keyword}{const} \&sFileName );}
\DoxyCodeLine{177   \string~xbMemoDbt4();}
\DoxyCodeLine{178   \textcolor{keyword}{virtual} xbInt16 Abort              ();}
\DoxyCodeLine{179   \textcolor{keyword}{virtual} xbInt16 Commit             ();}
\DoxyCodeLine{180   \textcolor{keyword}{virtual} xbInt16 CreateMemoFile     ();}
\DoxyCodeLine{181   \textcolor{keyword}{virtual} xbInt16 DumpMemoHeader     ();}
\DoxyCodeLine{182   \textcolor{keyword}{virtual} xbInt16 GetMemoField       ( xbInt16 iFieldNo, xbString \&sMemoData );}
\DoxyCodeLine{183   \textcolor{keyword}{virtual} xbInt16 GetMemoFieldLen    ( xbInt16 iFieldNo, xbUInt32 \&ulMemoFieldLen );}
\DoxyCodeLine{184   \textcolor{keyword}{virtual} xbInt16 GetMemoFieldLen    ( xbInt16 iFieldNo, xbUInt32 \&ulMemoFieldLen, xbUInt32 \&lBlockNo );}
\DoxyCodeLine{185   \textcolor{keyword}{virtual} xbInt16 OpenMemoFile       ();}
\DoxyCodeLine{186   \textcolor{keyword}{virtual} xbInt16 PackMemo           ( \textcolor{keywordtype}{void} (*memoStatusFunc) (xbUInt32 ulItemNum, xbUInt32 ulNumItems));}
\DoxyCodeLine{187   \textcolor{keyword}{virtual} xbInt16 UpdateMemoField    ( xbInt16 iFieldNo, \textcolor{keyword}{const} xbString \&sMemoData );}
\DoxyCodeLine{188 }
\DoxyCodeLine{189 \textcolor{preprocessor}{  \#ifdef XB\_DEBUG\_SUPPORT}}
\DoxyCodeLine{190   \textcolor{keyword}{virtual} xbInt16 DumpMemoFreeChain  ();}
\DoxyCodeLine{191   \textcolor{keyword}{virtual} xbInt16 DumpMemoInternals  ();}
\DoxyCodeLine{192   \textcolor{keyword}{virtual} xbInt16 ReadFreeBlockHeader( xbUInt32 ulBlockNo, xbUInt32 \&ulNextBlock, xbUInt32 \&ulFreeBlockCnt );}
\DoxyCodeLine{193 \textcolor{preprocessor}{  \#endif}}
\DoxyCodeLine{194 }
\DoxyCodeLine{195  \textcolor{keyword}{protected}:}
\DoxyCodeLine{196   \textcolor{keyword}{virtual} xbInt16 FindBlockSetInChain( xbUInt32 ulBlocksNeeded, xbUInt32 \&ulLastDataBlock, xbUInt32 \&ulLocation, xbUInt32 \&ulPrevNode, \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} \&bFound );}
\DoxyCodeLine{197   \textcolor{keyword}{virtual} xbInt16 FreeMemoBlockChain( xbUInt32 ulBlockNo );}
\DoxyCodeLine{198   \textcolor{keyword}{virtual} xbInt16 FreeMemoBlockChain( xbUInt32 ulBlockNo, xbUInt32 \&ulLastDataBlock );}
\DoxyCodeLine{199   \textcolor{keyword}{virtual} xbInt16 GetBlockSetFromChain( xbUInt32 ulBlocksNeeded, xbUInt32 ulLocation, xbUInt32 ulPrevNode );}
\DoxyCodeLine{200   \textcolor{keyword}{virtual} xbInt16 ReadDbtHeader( xbInt16 iOption );}
\DoxyCodeLine{201   \textcolor{keyword}{virtual} xbInt16 ReadBlockHeader( xbUInt32 ulBlockNo, xbInt16 iOption );}
\DoxyCodeLine{202   \textcolor{keyword}{virtual} xbInt16 UpdateHeaderName   ();}
\DoxyCodeLine{203   \textcolor{keyword}{virtual} xbInt16 WriteBlockHeader( xbUInt32 ulBlockNo, xbInt16 iOption );}
\DoxyCodeLine{204   \textcolor{keyword}{virtual} xbInt16 Zap();}
\DoxyCodeLine{205 }
\DoxyCodeLine{206  \textcolor{keyword}{private}:}
\DoxyCodeLine{207   xbString sDbfFileNameWoExt;}
\DoxyCodeLine{208   xbUInt32 ulNextFreeBlock;}
\DoxyCodeLine{209   xbUInt32 ulFreeBlockCnt;}
\DoxyCodeLine{210   xbInt16  iField1;}
\DoxyCodeLine{211   xbInt16  iStartPos;}
\DoxyCodeLine{212   xbUInt32 ulFieldLen;}
\DoxyCodeLine{213 }
\DoxyCodeLine{214   xbLinkList<xbUInt32> llOldBlocks;   \textcolor{comment}{// list of previously used memo blocks for field, used by Commit() / Abort()}}
\DoxyCodeLine{215   xbLinkList<xbUInt32> llNewBlocks;   \textcolor{comment}{// list of newly updated memo blocks for field, used by Commit() / Abort()}}
\DoxyCodeLine{216 }
\DoxyCodeLine{217 \};}
\DoxyCodeLine{218 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{219 }
\DoxyCodeLine{220 }
\DoxyCodeLine{221 \}        \textcolor{comment}{/* namespace xb   */}}
\DoxyCodeLine{222 \textcolor{preprocessor}{\#endif   }\textcolor{comment}{/* XB\_MEMO\_SUPPORT */}\textcolor{preprocessor}{}}
\DoxyCodeLine{223 \textcolor{preprocessor}{\#endif   }\textcolor{comment}{/* \_\_XB\_MEMO\_H\_\_  */}\textcolor{preprocessor}{}}
\DoxyCodeLine{224 }

\end{DoxyCode}
