\hypertarget{xbindex_8h_source}{}\doxysection{xbindex.\+h} \label{xbindex_8h_source}\index{/mnt/1Tdata/xbase/xbase64-\/4.0.2/src/include/xbindex.h@{/mnt/1Tdata/xbase/xbase64-\/4.0.2/src/include/xbindex.h}} \mbox{\hyperlink{xbindex_8h}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{1 \textcolor{comment}{/* xbindex.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, 2018, 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\_INDEX\_H\_\_}} \DoxyCodeLine{18 \textcolor{preprocessor}{\#define \_\_XB\_INDEX\_H\_\_}} \DoxyCodeLine{19 } \DoxyCodeLine{20 \textcolor{preprocessor}{\#ifdef XB\_INDEX\_SUPPORT}} \DoxyCodeLine{21 } \DoxyCodeLine{22 } \DoxyCodeLine{23 \textcolor{preprocessor}{\#define XB\_ADD\_KEY 1}} \DoxyCodeLine{24 \textcolor{preprocessor}{\#define XB\_UPD\_KEY 2}} \DoxyCodeLine{25 \textcolor{preprocessor}{\#define XB\_DEL\_KEY 3}} \DoxyCodeLine{26 } \DoxyCodeLine{27 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespacexb}{xb}}\{} \DoxyCodeLine{28 } \DoxyCodeLine{29 } \DoxyCodeLine{30 } \DoxyCodeLine{32 \textcolor{comment}{// structure for index nodes, each node contains information regarding one block}} \DoxyCodeLine{33 \textcolor{keyword}{struct }XBDLLEXPORT xbIxNode \{} \DoxyCodeLine{34 xbIxNode *npPrev; \textcolor{comment}{// pointer to previous node in chain}} \DoxyCodeLine{35 xbIxNode *npNext; \textcolor{comment}{// pointer to next node in chain}} \DoxyCodeLine{36 xbUInt32 iCurKeyNo; \textcolor{comment}{// current key number in the node, 0 offset}} \DoxyCodeLine{37 xbUInt32 ulBlockNo; \textcolor{comment}{// this block number}} \DoxyCodeLine{38 xbUInt32 ulBufSize; \textcolor{comment}{// size of cpBlockData}} \DoxyCodeLine{39 \textcolor{keywordtype}{char} *cpBlockData; \textcolor{comment}{// pointer to memory version of block data stored in file}} \DoxyCodeLine{40 \};} \DoxyCodeLine{42 } \DoxyCodeLine{43 } \DoxyCodeLine{45 } \DoxyCodeLine{120 \textcolor{keyword}{class }XBDLLEXPORT xbIx : \textcolor{keyword}{public} xbFile \{} \DoxyCodeLine{121 \textcolor{keyword}{public}:} \DoxyCodeLine{122 xbIx( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} * d );} \DoxyCodeLine{123 \textcolor{keyword}{virtual} \string~xbIx();} \DoxyCodeLine{124 } \DoxyCodeLine{125 \textcolor{keyword}{virtual} xbInt16 CheckTagIntegrity( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt ) = 0;} \DoxyCodeLine{126 \textcolor{keyword}{virtual} xbInt16 Close();} \DoxyCodeLine{127 \textcolor{keyword}{virtual} xbInt16 CreateTag( \textcolor{keyword}{const} xbString \&sName, \textcolor{keyword}{const} xbString \&sKey, \textcolor{keyword}{const} xbString \&sFilter, xbInt16 iDescending, xbInt16 iUnique, xbInt16 iOverlay, \textcolor{keywordtype}{void} **vpTag ) = 0;} \DoxyCodeLine{128 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} xbString \&sKey, xbInt16 iRetrieveSw );} \DoxyCodeLine{129 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} \textcolor{keywordtype}{char} * cKey, xbInt32 lKeyLen, xbInt16 iRetrieveSw );} \DoxyCodeLine{130 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} xbBcd \&bcd, xbInt16 iRetrieveSw );} \DoxyCodeLine{131 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} xbDate \&dtKey, xbInt16 iRetrieveSw );} \DoxyCodeLine{132 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \mbox{\hyperlink{namespacexb_a25f47b226ce924a5c78f97989b0744a2}{xbDouble}} dKey, xbInt16 iRetrieveSw );} \DoxyCodeLine{133 \textcolor{keyword}{virtual} xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vKey, xbInt32 lKeyLen, xbInt16 iRetrieveSw ) = 0;} \DoxyCodeLine{134 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} *GetCurTag() \textcolor{keyword}{const};} \DoxyCodeLine{135 \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *GetDbf() \textcolor{keyword}{const};} \DoxyCodeLine{136 } \DoxyCodeLine{137 \textcolor{keyword}{virtual} xbString \&GetKeyExpression( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{138 \textcolor{keyword}{virtual} xbString \&GetKeyFilter( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{139 \textcolor{keyword}{virtual} \textcolor{keywordtype}{char} GetKeyType( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{140 \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetLocked() \textcolor{keyword}{const};} \DoxyCodeLine{141 } \DoxyCodeLine{142 \textcolor{keyword}{virtual} xbInt16 GetFirstKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw ) = 0;} \DoxyCodeLine{143 \textcolor{keyword}{virtual} xbInt16 GetFirstKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{144 \textcolor{keyword}{virtual} xbInt16 GetFirstKey();} \DoxyCodeLine{145 } \DoxyCodeLine{146 \textcolor{keyword}{virtual} xbInt16 GetLastKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw ) = 0;} \DoxyCodeLine{147 \textcolor{keyword}{virtual} xbInt16 GetLastKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{148 \textcolor{keyword}{virtual} xbInt16 GetLastKey();} \DoxyCodeLine{149 } \DoxyCodeLine{150 \textcolor{keyword}{virtual} xbInt16 GetNextKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw ) = 0;} \DoxyCodeLine{151 \textcolor{keyword}{virtual} xbInt16 GetNextKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{152 \textcolor{keyword}{virtual} xbInt16 GetNextKey();} \DoxyCodeLine{153 } \DoxyCodeLine{154 \textcolor{keyword}{virtual} xbInt16 GetPrevKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw ) = 0;} \DoxyCodeLine{155 \textcolor{keyword}{virtual} xbInt16 GetPrevKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{156 \textcolor{keyword}{virtual} xbInt16 GetPrevKey();} \DoxyCodeLine{157 } \DoxyCodeLine{158 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} *GetTag( xbInt16 iTagNo ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{159 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} *GetTag( xbString \&sTagName ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{160 \textcolor{keyword}{virtual} xbInt16 GetTagCount() \textcolor{keyword}{const} = 0;} \DoxyCodeLine{161 } \DoxyCodeLine{162 \textcolor{keyword}{virtual} xbString \&GetTagName( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{163 \textcolor{keyword}{virtual} \textcolor{keyword}{const} \textcolor{keywordtype}{char} * GetTagName( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{164 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} GetTagName( \textcolor{keywordtype}{void} *vpTag, xbString \&sTagName ) \{\};} \DoxyCodeLine{165 } \DoxyCodeLine{166 \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetUnique( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{167 \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetSortOrder( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{168 } \DoxyCodeLine{169 \textcolor{keyword}{virtual} xbInt16 Open( \textcolor{keyword}{const} xbString \&sFileName );} \DoxyCodeLine{170 \textcolor{keyword}{virtual} xbInt16 Reindex( \textcolor{keywordtype}{void} **vpTag ) = 0;} \DoxyCodeLine{171 \textcolor{keyword}{virtual} xbInt16 SetCurTag( xbInt16 iTagNo ) = 0;} \DoxyCodeLine{172 \textcolor{keyword}{virtual} xbInt16 SetCurTag( xbString \&sTagName ) = 0;} \DoxyCodeLine{173 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} SetCurTag( \textcolor{keywordtype}{void} * vpCurTag );} \DoxyCodeLine{174 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} SetLocked( \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bLocked );} \DoxyCodeLine{175 } \DoxyCodeLine{176 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} TestStub( \textcolor{keywordtype}{char} *s, \textcolor{keywordtype}{void} *vpTag ) \{\};} \DoxyCodeLine{177 } \DoxyCodeLine{178 } \DoxyCodeLine{179 \textcolor{preprocessor}{ \#ifdef XB\_DEBUG\_SUPPORT}} \DoxyCodeLine{180 \textcolor{keyword}{virtual} xbInt16 DumpFreeBlocks( xbInt16 iOpt = 0 ) \{ \textcolor{keywordflow}{return} \mbox{\hyperlink{xbretcod_8h_ac720d5b4ec45bfd606f5865d40816e23}{XB\_NO\_ERROR}}; \}} \DoxyCodeLine{181 \textcolor{keyword}{virtual} xbInt16 DumpHeader( xbInt16 iDestOpt = 0, xbInt16 iFmtOpt = 0 ) = 0;} \DoxyCodeLine{182 \textcolor{keyword}{virtual} xbInt16 DumpIxForTag( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt ) = 0;} \DoxyCodeLine{183 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} DumpIxNodeChain( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{184 \textcolor{keyword}{virtual} xbInt16 DumpNode( \textcolor{keywordtype}{void} * vpTag, xbIxNode * pNode, xbInt16 iOption ) \textcolor{keyword}{const};} \DoxyCodeLine{185 \textcolor{keyword}{virtual} xbInt16 DumpTagBlocks( xbInt16 iOpt = 1, \textcolor{keywordtype}{void} *vpTag = NULL ) = 0;} \DoxyCodeLine{186 } \DoxyCodeLine{187 \textcolor{preprocessor}{ \#endif}} \DoxyCodeLine{188 } \DoxyCodeLine{189 \textcolor{keyword}{protected}:} \DoxyCodeLine{190 \textcolor{keyword}{friend} \textcolor{keyword}{class }\mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}};} \DoxyCodeLine{191 } \DoxyCodeLine{192 \textcolor{keyword}{virtual} xbInt16 AddKey( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo ) = 0;} \DoxyCodeLine{193 \textcolor{keyword}{virtual} xbInt16 AddKeys( xbUInt32 ulRecNo );} \DoxyCodeLine{194 \textcolor{keyword}{virtual} xbIxNode *AllocateIxNode( xbUInt32 ulBufSize = 0, xbInt16 iOption = 0 );} \DoxyCodeLine{195 \textcolor{keyword}{virtual} xbInt16 BSearchBlock( \textcolor{keywordtype}{char} cKeyType, xbIxNode *npNode, xbInt32 lKeyLen, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpKey, xbInt32 lSearchKeyLen, xbInt16 \&iCompRc, \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bDescending = \mbox{\hyperlink{xbtypes_8h_adc4b6ca5ad299f63675136d9e03938cc}{xbFalse}} ) \textcolor{keyword}{const};} \DoxyCodeLine{196 \textcolor{keyword}{virtual} xbInt16 CheckForDupKeys();} \DoxyCodeLine{197 \textcolor{keyword}{virtual} xbInt16 CheckForDupKey( \textcolor{keywordtype}{void} *vpTag ) = 0;} \DoxyCodeLine{198 \textcolor{keyword}{virtual} xbInt16 CompareKey( \textcolor{keywordtype}{char} cKeyType, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *v1, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *v2, \textcolor{keywordtype}{size\_t} lKeyLen ) \textcolor{keyword}{const};} \DoxyCodeLine{199 \textcolor{keyword}{virtual} xbInt16 CreateKeys( xbInt16 iOpt );} \DoxyCodeLine{200 \textcolor{keyword}{virtual} xbInt16 CreateKey( \textcolor{keywordtype}{void} * vpTag, xbInt16 iOpt ) = 0;} \DoxyCodeLine{201 \textcolor{keyword}{virtual} xbInt16 DeleteFromNode( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo ) = 0;} \DoxyCodeLine{202 \textcolor{comment}{// virtual xbInt16 DeleteKeys( xbUInt32 ulRecNo );}} \DoxyCodeLine{203 \textcolor{keyword}{virtual} xbInt16 DeleteKeys();} \DoxyCodeLine{204 \textcolor{keyword}{virtual} xbInt16 DeleteKey( \textcolor{keywordtype}{void} *vpTag ) = 0;} \DoxyCodeLine{205 } \DoxyCodeLine{206 \textcolor{keyword}{virtual} xbInt16 DeleteTag( \textcolor{keywordtype}{void} *vpTag ) = 0;} \DoxyCodeLine{207 } \DoxyCodeLine{208 } \DoxyCodeLine{209 \textcolor{keyword}{virtual} xbInt16 FindKeyForCurRec( \textcolor{keywordtype}{void} *vpTag ) = 0;} \DoxyCodeLine{210 \textcolor{keyword}{virtual} xbIxNode *FreeNodeChain( xbIxNode *np );} \DoxyCodeLine{211 \textcolor{keyword}{virtual} xbInt16 GetBlock( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulBlockNo, xbInt16 iOpt, xbUInt32 ulAddlBuf = 0 );} \DoxyCodeLine{212 \textcolor{comment}{// virtual xbBool GetIndexUpdated() const = 0;}} \DoxyCodeLine{213 \textcolor{keyword}{virtual} xbInt32 GetKeyCount( xbIxNode *npNode ) \textcolor{keyword}{const};} \DoxyCodeLine{214 \textcolor{keyword}{virtual} \textcolor{keywordtype}{char} *GetKeyData( xbIxNode *npNode, xbInt16 iKeyNo, xbInt16 iKeyItemLen ) \textcolor{keyword}{const};} \DoxyCodeLine{215 \textcolor{keyword}{virtual} xbInt16 GetKeySts( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{216 \textcolor{keyword}{virtual} xbInt16 GetLastKey( xbUInt32 ulNodeNo, \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw ) = 0;} \DoxyCodeLine{217 \textcolor{keyword}{virtual} xbInt16 InsertNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo, \textcolor{keywordtype}{char} * cpKeyBuf, xbUInt32 uiPtr ) = 0;} \DoxyCodeLine{218 \textcolor{keyword}{virtual} xbInt16 InsertNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo, xbUInt32 uiPtr ) = 0;} \DoxyCodeLine{219 \textcolor{keyword}{virtual} xbInt16 KeyExists( \textcolor{keywordtype}{void} * ) = 0;} \DoxyCodeLine{220 \textcolor{comment}{// virtual xbInt16 KeyUpdated( void *vpTag ) const = 0;}} \DoxyCodeLine{221 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} NodeFree( xbIxNode * ixNode );} \DoxyCodeLine{222 \textcolor{keyword}{virtual} xbInt16 ReadHeadBlock( xbInt16 iOpt = 0 ) = 0;} \DoxyCodeLine{223 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} SetDbf( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *dbf );} \DoxyCodeLine{224 \textcolor{keyword}{virtual} xbInt16 SplitNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, \textcolor{keywordtype}{char} *cpKeyBuf, xbUInt32 uiPtr ) = 0;} \DoxyCodeLine{225 \textcolor{keyword}{virtual} xbInt16 SplitNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, xbUInt32 uiPtr ) = 0;} \DoxyCodeLine{226 \textcolor{keyword}{virtual} xbInt16 UpdateTagKey( \textcolor{keywordtype}{char} cAction, \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo = 0 ) = 0;} \DoxyCodeLine{227 \textcolor{keyword}{virtual} xbInt16 WriteHeadBlock( xbInt16 iOption ) = 0;} \DoxyCodeLine{228 } \DoxyCodeLine{229 \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} *dbf;} \DoxyCodeLine{230 \textcolor{keywordtype}{char} *cNodeBuf; \textcolor{comment}{// pointer to memory for processing in a block of index data}} \DoxyCodeLine{231 \textcolor{keywordtype}{void} *vpCurTag; \textcolor{comment}{// pointer to active tag. Single index files have only one tag}} \DoxyCodeLine{232 } \DoxyCodeLine{233 \textcolor{keyword}{private}:} \DoxyCodeLine{234 \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} AppendNodeChain( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode ) = 0;} \DoxyCodeLine{235 \textcolor{keyword}{virtual} xbInt16 GetKeyPtr( \textcolor{keywordtype}{void} *vpTag, xbInt16 iKeyNo, xbIxNode *npNode, xbUInt32 \&ulKeyPtr ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{236 \textcolor{keyword}{virtual} \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} IsLeaf( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode ) \textcolor{keyword}{const} = 0;} \DoxyCodeLine{237 \textcolor{comment}{// virtual void SetCurNode( void *vpTag, xbIxNode *npNode ) = 0;}} \DoxyCodeLine{238 } \DoxyCodeLine{239 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bLocked; \textcolor{comment}{// index file locked?}} \DoxyCodeLine{240 \};} \DoxyCodeLine{241 } \DoxyCodeLine{242 \textcolor{preprocessor}{\#ifdef XB\_NDX\_SUPPORT}} \DoxyCodeLine{243 } \DoxyCodeLine{244 \textcolor{preprocessor}{\#define XB\_NDX\_BLOCK\_SIZE 512}} \DoxyCodeLine{245 } \DoxyCodeLine{246 } \DoxyCodeLine{248 \textcolor{keyword}{struct }XBDLLEXPORT xbNdxTag \{} \DoxyCodeLine{249 } \DoxyCodeLine{250 \textcolor{comment}{// NDX File Header Fields}} \DoxyCodeLine{251 xbUInt32 ulRootBlock; \textcolor{comment}{// header node is 0}} \DoxyCodeLine{252 xbUInt32 ulTotalBlocks; \textcolor{comment}{// includes header node}} \DoxyCodeLine{253 \textcolor{keywordtype}{char} cKeyType; \textcolor{comment}{// C = Char, F = Numeric, D = Date}} \DoxyCodeLine{254 xbInt16 iKeyLen; \textcolor{comment}{// length of key data}} \DoxyCodeLine{255 xbInt16 iKeysPerBlock; \textcolor{comment}{// max number keys per block <=100}} \DoxyCodeLine{256 xbInt16 iKeyType; \textcolor{comment}{// 00 = Char, 01 = Numeric}} \DoxyCodeLine{257 xbInt16 iKeyItemLen; \textcolor{comment}{// KeyLen + 8 bytes}} \DoxyCodeLine{258 \textcolor{keywordtype}{char} cSerNo; \textcolor{comment}{// rolling incrementing serial number +1 on each index update}} \DoxyCodeLine{259 xbInt16 iUnique; \textcolor{comment}{// True if unique}} \DoxyCodeLine{260 xbString sKeyExpression; \textcolor{comment}{// index expression}} \DoxyCodeLine{261 \textcolor{comment}{// end of NDX Header field}} \DoxyCodeLine{262 } \DoxyCodeLine{263 xbExp *exp; \textcolor{comment}{// pointer to expression for expression keys}} \DoxyCodeLine{264 time\_t tNodeChainTs; \textcolor{comment}{// node chain time stamp}} \DoxyCodeLine{265 xbIxNode *npNodeChain;} \DoxyCodeLine{266 xbIxNode *npCurNode;} \DoxyCodeLine{267 \textcolor{keywordtype}{char} *cpKeyBuf; \textcolor{comment}{// key buffer, for searches and adds}} \DoxyCodeLine{268 \textcolor{keywordtype}{char} *cpKeyBuf2; \textcolor{comment}{// key buffer, for deletes}} \DoxyCodeLine{269 xbString sTagName; \textcolor{comment}{// tag name -\/ is the file name without the extension}} \DoxyCodeLine{270 \textcolor{comment}{// xbInt16 iKeyUpdated; // key updated? set in method KeyUpdated, checked in AddKey and DeleteKey routines}} \DoxyCodeLine{271 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bFoundSts; \textcolor{comment}{// key found? used to determine if new key should be added in XB\_EMULATE\_DBASE mode in AddKey}} \DoxyCodeLine{272 } \DoxyCodeLine{273 } \DoxyCodeLine{274 xbInt16 iKeySts; \textcolor{comment}{// key updated? set in method CreateKey, checked in AddKey and DeleteKey routines}} \DoxyCodeLine{275 \textcolor{comment}{// old key filtered new key filtered iKeySts}} \DoxyCodeLine{276 \textcolor{comment}{// Y Y XB\_UPD\_KEY 2 -\/ update key if changed (delete and add)}} \DoxyCodeLine{277 \textcolor{comment}{// Y N XB\_DEL\_KEY 3 -\/ delete key}} \DoxyCodeLine{278 \textcolor{comment}{// N Y XB\_ADD\_KEY 1 -\/ add key}} \DoxyCodeLine{279 \textcolor{comment}{// N N 0 -\/ no update}} \DoxyCodeLine{280 } \DoxyCodeLine{281 \};} \DoxyCodeLine{283 } \DoxyCodeLine{285 } \DoxyCodeLine{304 \textcolor{keyword}{class }XBDLLEXPORT xbIxNdx : \textcolor{keyword}{public} xbIx \{} \DoxyCodeLine{305 \textcolor{keyword}{public}:} \DoxyCodeLine{306 xbIxNdx( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} * d );} \DoxyCodeLine{307 \string~xbIxNdx();} \DoxyCodeLine{308 xbInt16 CheckTagIntegrity( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt );} \DoxyCodeLine{309 xbInt16 CreateTag( \textcolor{keyword}{const} xbString \&sName, \textcolor{keyword}{const} xbString \&sKey, \textcolor{keyword}{const} xbString \&sFilter, xbInt16 iDescending, xbInt16 iUnique, xbInt16 iOverlay, \textcolor{keywordtype}{void} **vpTag );} \DoxyCodeLine{310 \textcolor{comment}{// xbInt16 DeleteTag( void *vpTag );}} \DoxyCodeLine{311 xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpKey, xbInt32 lKeyLen, xbInt16 iRetrieveSw );} \DoxyCodeLine{312 xbInt16 GetFirstKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw );} \DoxyCodeLine{313 } \DoxyCodeLine{314 xbInt16 GetLastKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw = 1 );} \DoxyCodeLine{315 xbInt16 GetNextKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw = 1 );} \DoxyCodeLine{316 xbInt16 GetPrevKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw = 1 );} \DoxyCodeLine{317 xbInt32 GetKeyLen ( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{318 \textcolor{keywordtype}{char} GetKeyType ( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{319 xbString \&GetKeyExpression( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{320 xbString \&GetKeyFilter( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{321 \textcolor{keywordtype}{void} *GetTag( xbInt16 iTagNo ) \textcolor{keyword}{const};} \DoxyCodeLine{322 \textcolor{keywordtype}{void} *GetTag( xbString \&sTagName ) \textcolor{keyword}{const};} \DoxyCodeLine{323 xbString \&GetTagName( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{324 \textcolor{keyword}{const} \textcolor{keywordtype}{char} * GetTagName( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt ) \textcolor{keyword}{const};} \DoxyCodeLine{325 } \DoxyCodeLine{326 xbInt16 GetTagCount() \textcolor{keyword}{const};} \DoxyCodeLine{327 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetUnique( \textcolor{keywordtype}{void} *vpTag = NULL ) \textcolor{keyword}{const};} \DoxyCodeLine{328 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetSortOrder( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{329 xbInt16 Reindex( \textcolor{keywordtype}{void} **vpTag );} \DoxyCodeLine{330 xbInt16 SetCurTag( xbInt16 iTagNo );} \DoxyCodeLine{331 xbInt16 SetCurTag( xbString \&sTagName );} \DoxyCodeLine{332 } \DoxyCodeLine{333 } \DoxyCodeLine{334 } \DoxyCodeLine{335 \textcolor{preprocessor}{ \#ifdef XB\_DEBUG\_SUPPORT}} \DoxyCodeLine{336 xbInt16 DumpTagBlocks( xbInt16 iOpt = 1, \textcolor{keywordtype}{void} *vpTag = NULL );} \DoxyCodeLine{337 xbInt16 DumpHeader( xbInt16 iOpt = 0, xbInt16 iFmt = 0 );} \DoxyCodeLine{338 xbInt16 DumpIxForTag( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt );} \DoxyCodeLine{339 \textcolor{keywordtype}{void} DumpIxNodeChain( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt ) \textcolor{keyword}{const};} \DoxyCodeLine{340 xbInt16 DumpNode( \textcolor{keywordtype}{void} * vpTag, xbIxNode * pNode, xbInt16 iOption ) \textcolor{keyword}{const};} \DoxyCodeLine{341 \textcolor{preprocessor}{ \#endif}} \DoxyCodeLine{342 } \DoxyCodeLine{343 \textcolor{keyword}{protected}:} \DoxyCodeLine{344 \textcolor{keyword}{friend} \textcolor{keyword}{class }\mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}};} \DoxyCodeLine{345 xbInt16 AddKey( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo );} \DoxyCodeLine{346 xbIxNode *AllocateIxNode( xbUInt32 ulBufSize = 0, xbInt16 iOption = 0 );} \DoxyCodeLine{347 xbInt16 CheckForDupKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{348 xbIxNode *CreateIxNode( xbUInt32 ulBufSize );} \DoxyCodeLine{349 xbInt16 CreateKey( \textcolor{keywordtype}{void} * vpTag, xbInt16 iOpt );} \DoxyCodeLine{350 xbInt16 DeleteFromNode( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo );} \DoxyCodeLine{351 xbInt16 DeleteKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{352 } \DoxyCodeLine{353 xbInt16 DeleteTag( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{354 } \DoxyCodeLine{355 xbInt16 FindKeyForCurRec( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{356 \textcolor{comment}{// xbBool GetIndexUpdated() const;}} \DoxyCodeLine{357 xbInt16 GetKeyTypeN( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{358 xbInt16 GetKeySts( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{359 xbInt16 GetLastKey( xbUInt32 ulNodeNo, \textcolor{keywordtype}{void} *vpTag, xbInt16 iRetrieveSw = 1 );} \DoxyCodeLine{360 xbInt16 InsertNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo, xbUInt32 uiPtr );} \DoxyCodeLine{361 xbInt16 InsertNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo, \textcolor{keywordtype}{char} * cpKeyBuf, xbUInt32 uiPtr );} \DoxyCodeLine{362 xbInt16 KeyExists( \textcolor{keywordtype}{void} *vpTag = NULL );} \DoxyCodeLine{363 \textcolor{comment}{// xbBool KeyFiltered( void *vpTag ) const;}} \DoxyCodeLine{364 \textcolor{comment}{// xbInt16 KeyUpdated( void *vpTag ) const;}} \DoxyCodeLine{365 xbInt16 ReadHeadBlock(xbInt16 iOpt); \textcolor{comment}{// read the header node of the disk NDX file}} \DoxyCodeLine{366 xbInt16 SplitNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, xbUInt32 uiPtr );} \DoxyCodeLine{367 xbInt16 SplitNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, \textcolor{keywordtype}{char} *cpKeyBuf, xbUInt32 uiPtr );} \DoxyCodeLine{368 xbInt16 UpdateTagKey( \textcolor{keywordtype}{char} cAction, \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo = 0 );} \DoxyCodeLine{369 xbInt16 WriteHeadBlock( xbInt16 iOption );} \DoxyCodeLine{370 } \DoxyCodeLine{371 \textcolor{keyword}{private}:} \DoxyCodeLine{372 xbInt16 AddKeyNewRoot( xbNdxTag *npTag, xbIxNode *npLeft, xbIxNode *npRight );} \DoxyCodeLine{373 \textcolor{keywordtype}{void} AppendNodeChain( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode );} \DoxyCodeLine{374 xbInt16 GetDbfPtr( \textcolor{keywordtype}{void} *vpTag, xbInt16 iKeyNo, xbIxNode *npNode, xbUInt32 \&ulDbfPtr ) \textcolor{keyword}{const};} \DoxyCodeLine{375 xbInt16 GetKeyPtr( \textcolor{keywordtype}{void} *vpTag, xbInt16 iKeyNo, xbIxNode *npNode, xbUInt32 \&ulKeyPtr ) \textcolor{keyword}{const};} \DoxyCodeLine{376 xbInt16 GetLastKeyForBlockNo( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulBlockNo, \textcolor{keywordtype}{char} *cpKeyBuf );} \DoxyCodeLine{377 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} IsLeaf( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode ) \textcolor{keyword}{const};} \DoxyCodeLine{378 xbInt16 KeySetPosAdd( xbNdxTag *npTag, xbUInt32 ulAddKeyRecNo );} \DoxyCodeLine{379 xbInt16 KeySetPosDel( xbNdxTag *npTag );} \DoxyCodeLine{380 \textcolor{comment}{// void SetCurNode( void *vpTag, xbIxNode *np );}} \DoxyCodeLine{381 xbNdxTag *ndxTag;} \DoxyCodeLine{382 \};} \DoxyCodeLine{383 } \DoxyCodeLine{384 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* XB\_NDX\_SUPPORT */}\textcolor{preprocessor}{}} \DoxyCodeLine{385 } \DoxyCodeLine{386 } \DoxyCodeLine{387 \textcolor{preprocessor}{\#ifdef XB\_MDX\_SUPPORT}} \DoxyCodeLine{388 \textcolor{comment}{//\#define XB\_MDX\_BLOCK\_SIZE 1024}} \DoxyCodeLine{389 } \DoxyCodeLine{390 \textcolor{keyword}{struct }XBDLLEXPORT xbMdxTag \{} \DoxyCodeLine{391 } \DoxyCodeLine{392 \textcolor{comment}{// next 7 fields comprise the tag table entry}} \DoxyCodeLine{393 xbUInt32 ulTagHdrPageNo; \textcolor{comment}{// 512 byte page number, NOT block number}} \DoxyCodeLine{394 \textcolor{keywordtype}{char} cTagName[11];} \DoxyCodeLine{395 \textcolor{keywordtype}{char} cKeyFmt; \textcolor{comment}{// always 0x10 w/ DBase V7}} \DoxyCodeLine{396 \textcolor{keywordtype}{char} cLeftChild; \textcolor{comment}{// cFwdTagThread}} \DoxyCodeLine{397 \textcolor{keywordtype}{char} cRightChild; \textcolor{comment}{// cFwdTagThread2}} \DoxyCodeLine{398 \textcolor{keywordtype}{char} cParent; \textcolor{comment}{// cBwdTagThread}} \DoxyCodeLine{399 \textcolor{keywordtype}{char} c2;} \DoxyCodeLine{400 \textcolor{keywordtype}{char} cKeyType; \textcolor{comment}{// C,D,N}} \DoxyCodeLine{401 } \DoxyCodeLine{402 xbUInt32 ulRootPage; \textcolor{comment}{// 512 byte page number, NOT block number}} \DoxyCodeLine{403 xbUInt32 ulTagSize; \textcolor{comment}{// Number of 512 byte pages allocated to the tag. Tag size of two is a single 1024 block}} \DoxyCodeLine{404 } \DoxyCodeLine{405 \textcolor{keywordtype}{char} cKeyFmt2; \textcolor{comment}{// 0x10 -\/ base}} \DoxyCodeLine{406 \textcolor{comment}{// 0x08 -\/ descending}} \DoxyCodeLine{407 \textcolor{comment}{// 0x40 -\/ unique}} \DoxyCodeLine{408 \textcolor{keywordtype}{char} cKeyType2;} \DoxyCodeLine{409 \textcolor{comment}{// one unused byte fits here}} \DoxyCodeLine{410 } \DoxyCodeLine{411 \textcolor{keywordtype}{char} cTag11; \textcolor{comment}{// dbase sets to 0x1B}} \DoxyCodeLine{412 } \DoxyCodeLine{413 xbInt16 iKeyLen;} \DoxyCodeLine{414 xbInt16 iKeysPerBlock;} \DoxyCodeLine{415 xbInt16 iSecKeyType;} \DoxyCodeLine{416 xbInt16 iKeyItemLen; \textcolor{comment}{// iKeyLen + 4}} \DoxyCodeLine{417 } \DoxyCodeLine{418 \textcolor{keywordtype}{char} cSerialNo; \textcolor{comment}{// Increments +1 for each tag update}} \DoxyCodeLine{419 \textcolor{keywordtype}{char} cUnique;} \DoxyCodeLine{420 xbString *sKeyExp; \textcolor{comment}{// Key expression}} \DoxyCodeLine{421 } \DoxyCodeLine{422 \textcolor{keywordtype}{char} cHasFilter; \textcolor{comment}{// 0x00 or 0x01}} \DoxyCodeLine{423 \textcolor{keywordtype}{char} cHasKeys; \textcolor{comment}{// 0x00 or 0x01}} \DoxyCodeLine{424 } \DoxyCodeLine{425 xbUInt32 ulLeftChild; \textcolor{comment}{// dbase 7 sets this to the root page on tag creation}} \DoxyCodeLine{426 xbUInt32 ulRightChild; \textcolor{comment}{// dbase 7 sets this to the root page on tag creation}} \DoxyCodeLine{427 } \DoxyCodeLine{428 \textcolor{keywordtype}{char} cTagYY;} \DoxyCodeLine{429 \textcolor{keywordtype}{char} cTagMM;} \DoxyCodeLine{430 \textcolor{keywordtype}{char} cTagDD;} \DoxyCodeLine{431 } \DoxyCodeLine{432 \textcolor{keywordtype}{char} cKeyFmt3; \textcolor{comment}{// dbase 7 sets this 0x01 if discreet field or 0x00 if calculated or combination field key expression on tag creation}} \DoxyCodeLine{433 } \DoxyCodeLine{434 xbString *sFiltExp; \textcolor{comment}{// Filter expression}} \DoxyCodeLine{435 } \DoxyCodeLine{436 time\_t tNodeChainTs;} \DoxyCodeLine{437 xbIxNode *npNodeChain;} \DoxyCodeLine{438 xbIxNode *npCurNode;} \DoxyCodeLine{439 xbExp *exp; \textcolor{comment}{// pointer to expression for expression based tags}} \DoxyCodeLine{440 xbExp *filter; \textcolor{comment}{// pointer to expression for index filter}} \DoxyCodeLine{441 } \DoxyCodeLine{442 \textcolor{keywordtype}{char} *cpKeyBuf; \textcolor{comment}{// key buffer}} \DoxyCodeLine{443 \textcolor{keywordtype}{char} *cpKeyBuf2; \textcolor{comment}{// key buffer}} \DoxyCodeLine{444 \textcolor{comment}{// xbBool iKeyUpdated; // key updated? set in method CreateKey, checked in AddKey and DeleteKey routines}} \DoxyCodeLine{445 \textcolor{comment}{// 0 -\/ no update}} \DoxyCodeLine{446 \textcolor{comment}{// 1 -\/ Add}} \DoxyCodeLine{447 \textcolor{comment}{// 2 -\/ Update}} \DoxyCodeLine{448 \textcolor{comment}{// 3 -\/ Delete}} \DoxyCodeLine{449 \textcolor{comment}{// xbBool bKeyFiltered; // key filtered? True if included key, False if excluded key. Set in method CreateKey, checked in AddKey and DeleteKey routines}} \DoxyCodeLine{450 xbString *sTagName; \textcolor{comment}{// string tag name}} \DoxyCodeLine{451 } \DoxyCodeLine{452 } \DoxyCodeLine{453 xbMdxTag *next;} \DoxyCodeLine{454 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bFoundSts; \textcolor{comment}{// key found? used to determine if new key should be added in XB\_EMULATE\_DBASE mode in AddKey}} \DoxyCodeLine{455 } \DoxyCodeLine{456 } \DoxyCodeLine{457 xbInt16 iKeySts; \textcolor{comment}{// key updated? set in method CreateKey, checked in AddKey and DeleteKey routines}} \DoxyCodeLine{458 \textcolor{comment}{// old key filtered new key filtered iKeySts}} \DoxyCodeLine{459 \textcolor{comment}{// Y Y XB\_UPD\_KEY 2 -\/ update key if changed (delete and add)}} \DoxyCodeLine{460 \textcolor{comment}{// Y N XB\_DEL\_KEY 3 -\/ delete key}} \DoxyCodeLine{461 \textcolor{comment}{// N Y XB\_ADD\_KEY 1 -\/ add key}} \DoxyCodeLine{462 \textcolor{comment}{// N N 0 -\/ no update}} \DoxyCodeLine{463 } \DoxyCodeLine{464 } \DoxyCodeLine{465 \};} \DoxyCodeLine{466 } \DoxyCodeLine{467 } \DoxyCodeLine{468 \textcolor{keyword}{class }XBDLLEXPORT xbIxMdx : \textcolor{keyword}{public} xbIx \{} \DoxyCodeLine{469 \textcolor{keyword}{public}:} \DoxyCodeLine{470 xbIxMdx( \mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}} * d );} \DoxyCodeLine{471 \string~xbIxMdx();} \DoxyCodeLine{472 xbInt16 CheckTagIntegrity( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt );} \DoxyCodeLine{473 xbInt16 CreateTag( \textcolor{keyword}{const} xbString \&sName, \textcolor{keyword}{const} xbString \&sKey, \textcolor{keyword}{const} xbString \&sFilter, xbInt16 iDescending, xbInt16 iUnique, xbInt16 iOverlay, \textcolor{keywordtype}{void} **vpTag );} \DoxyCodeLine{474 \textcolor{comment}{// xbInt16 DeleteTag( void *vpTag );}} \DoxyCodeLine{475 xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vKey, xbInt32 lKeyLen, xbInt16 iRetrieveSw );} \DoxyCodeLine{476 xbInt16 FindKey( \textcolor{keywordtype}{void} *vpTag, \mbox{\hyperlink{namespacexb_a25f47b226ce924a5c78f97989b0744a2}{xbDouble}} dKey, xbInt16 iRetrieveSw );} \DoxyCodeLine{477 xbInt16 GetFirstKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw );} \DoxyCodeLine{478 xbString \&GetKeyExpression( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{479 xbString \&GetKeyFilter( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{480 \textcolor{keywordtype}{char} GetKeyType( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{481 xbInt16 GetLastKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw );} \DoxyCodeLine{482 xbInt16 GetNextKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw );} \DoxyCodeLine{483 xbInt16 GetPrevKey( \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw );} \DoxyCodeLine{484 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetReuseEmptyNodesSw() \textcolor{keyword}{const};} \DoxyCodeLine{485 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} GetSortOrder( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{486 \textcolor{keywordtype}{void} *GetTag( xbInt16 iTagNo ) \textcolor{keyword}{const};} \DoxyCodeLine{487 \textcolor{keywordtype}{void} *GetTag( xbString \&sTagName ) \textcolor{keyword}{const};} \DoxyCodeLine{488 xbInt16 GetTagCount() \textcolor{keyword}{const};} \DoxyCodeLine{489 } \DoxyCodeLine{490 xbString \&GetTagName( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{491 \textcolor{keyword}{const} \textcolor{keywordtype}{char} * GetTagName( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOpt ) \textcolor{keyword}{const};} \DoxyCodeLine{492 \textcolor{keywordtype}{void} GetTagName( \textcolor{keywordtype}{void} *vpTag, xbString \&sTagName );} \DoxyCodeLine{493 } \DoxyCodeLine{494 xbInt16 GetUnique( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{495 xbInt16 Reindex( \textcolor{keywordtype}{void} **vpTag );} \DoxyCodeLine{496 xbInt16 SetCurTag( xbInt16 iTagNo );} \DoxyCodeLine{497 xbInt16 SetCurTag( xbString \&sTagName );} \DoxyCodeLine{498 \textcolor{keywordtype}{void} SetReuseEmptyNodesSw( \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bReuse );} \DoxyCodeLine{499 } \DoxyCodeLine{500 \textcolor{keywordtype}{void} TestStub( \textcolor{keywordtype}{char} *s, \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{501 } \DoxyCodeLine{502 \textcolor{keyword}{protected}:} \DoxyCodeLine{503 \textcolor{keyword}{friend} \textcolor{keyword}{class }\mbox{\hyperlink{namespacexb_ab2eae4b4732466698a7fdd89d77ba53b}{xbDbf}};} \DoxyCodeLine{504 } \DoxyCodeLine{505 xbInt16 AddKey( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo );} \DoxyCodeLine{506 xbIxNode *AllocateIxNode( xbMdxTag * mpTag, xbUInt32 ulBufSize, xbUInt32 ulBlock2 );} \DoxyCodeLine{507 xbInt16 CheckForDupKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{508 xbInt16 Close();} \DoxyCodeLine{509 xbInt16 CreateKey( \textcolor{keywordtype}{void} * vpTag, xbInt16 iOpt );} \DoxyCodeLine{510 xbInt16 DeleteFromNode( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npNode, xbInt16 iSlotNo );} \DoxyCodeLine{511 xbInt16 DeleteKey( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{512 } \DoxyCodeLine{513 xbInt16 DeleteTag( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{514 } \DoxyCodeLine{515 xbInt16 FindKeyForCurRec( \textcolor{keywordtype}{void} *vpTag );} \DoxyCodeLine{516 xbInt16 GetKeySts( \textcolor{keywordtype}{void} *vpTag ) \textcolor{keyword}{const};} \DoxyCodeLine{517 xbInt16 GetLastKey( xbUInt32 ulBlockNo, \textcolor{keywordtype}{void} *vpTag, xbInt16 lRetrieveSw );} \DoxyCodeLine{518 \textcolor{keywordtype}{void} *GetTagTblPtr() \textcolor{keyword}{const};} \DoxyCodeLine{519 \textcolor{keywordtype}{void} Init( xbInt16 iOpt = 0 );} \DoxyCodeLine{520 xbInt16 InsertNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode, xbInt16 iSlotNo, xbUInt32 uiPtr );} \DoxyCodeLine{521 xbInt16 InsertNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode, xbInt16 iSlotNo, \textcolor{keywordtype}{char} *cpKeyBuf, xbUInt32 uiPtr );} \DoxyCodeLine{522 xbInt16 KeyExists( \textcolor{keywordtype}{void} * );} \DoxyCodeLine{523 xbInt16 LoadTagTable();} \DoxyCodeLine{524 xbInt16 ReadHeadBlock(xbInt16 iOpt); \textcolor{comment}{// read the header node of the disk file}} \DoxyCodeLine{525 xbInt16 SplitNodeI( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, xbUInt32 uiPtr );} \DoxyCodeLine{526 xbInt16 SplitNodeL( \textcolor{keywordtype}{void} *vpTag, xbIxNode * npLeft, xbIxNode *npRight, xbInt16 iSlotNo, \textcolor{keywordtype}{char} *cpKeyBuf, xbUInt32 uiPtr );} \DoxyCodeLine{527 xbInt16 UpdateTagKey( \textcolor{keywordtype}{char} cAction, \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulRecNo = 0 );} \DoxyCodeLine{528 xbInt16 WriteHeadBlock( xbInt16 iOption );} \DoxyCodeLine{529 } \DoxyCodeLine{530 \textcolor{preprocessor}{ \#ifdef XB\_DEBUG\_SUPPORT}} \DoxyCodeLine{531 xbInt16 DumpTagBlocks( xbInt16 iOpt = 1, \textcolor{keywordtype}{void} *vpTag = NULL );} \DoxyCodeLine{532 xbInt16 DumpFreeBlocks( xbInt16 iOpt = 0 );} \DoxyCodeLine{533 xbInt16 DumpHeader( xbInt16 iOpt = 0, xbInt16 iFmtOpt = 0 );} \DoxyCodeLine{534 xbInt16 DumpIxForTag( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt );} \DoxyCodeLine{535 \textcolor{keywordtype}{void} DumpIxNodeChain( \textcolor{keywordtype}{void} *vpTag, xbInt16 iOutputOpt ) \textcolor{keyword}{const};} \DoxyCodeLine{536 \textcolor{preprocessor}{ \#endif}} \DoxyCodeLine{537 } \DoxyCodeLine{538 \textcolor{keyword}{private}:} \DoxyCodeLine{539 xbInt16 AddKeyNewRoot( xbMdxTag *npTag, xbIxNode *npLeft, xbIxNode *npRight );} \DoxyCodeLine{540 \textcolor{keywordtype}{void} AppendNodeChain( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode );} \DoxyCodeLine{541 xbUInt32 BlockToPage( xbUInt32 ulBlockNo );} \DoxyCodeLine{542 \textcolor{keywordtype}{void} CalcBtreePointers();} \DoxyCodeLine{543 \textcolor{keywordtype}{char} CalcTagKeyFmt( xbExp \&exp );} \DoxyCodeLine{544 \textcolor{keywordtype}{char} CalcTagFwdThread1();} \DoxyCodeLine{545 \textcolor{keywordtype}{char} CalcTagFwdThread2();} \DoxyCodeLine{546 xbMdxTag *ClearTagTable();} \DoxyCodeLine{547 xbInt16 DumpBlock( xbInt16 iOpt, xbUInt32 ulBlockNo, xbMdxTag * mpTag );} \DoxyCodeLine{548 xbInt16 GetDbfPtr( \textcolor{keywordtype}{void} *vpTag, xbInt16 iKeyNo, xbIxNode *npNode, xbUInt32 \&ulDbfPtr ) \textcolor{keyword}{const};} \DoxyCodeLine{549 xbInt16 GetKeyPtr( \textcolor{keywordtype}{void} *vpTag, xbInt16 iKeyNo, xbIxNode *npNode, xbUInt32 \&ulKeyPtr ) \textcolor{keyword}{const};} \DoxyCodeLine{550 xbInt16 GetLastKeyForBlockNo( \textcolor{keywordtype}{void} *vpTag, xbUInt32 ulBlockNo, \textcolor{keywordtype}{char} *cpKeyBuf );} \DoxyCodeLine{551 xbInt16 HarvestEmptyNode( xbMdxTag *mpTag, xbIxNode *npNode, xbInt16 iOpt, \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bHarvestRoot = \mbox{\hyperlink{xbtypes_8h_adc4b6ca5ad299f63675136d9e03938cc}{xbFalse}} );} \DoxyCodeLine{552 xbInt16 HarvestTagNodes( xbMdxTag *mpTag, \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bRecycleRoot = \mbox{\hyperlink{xbtypes_8h_adc4b6ca5ad299f63675136d9e03938cc}{xbFalse}} );} \DoxyCodeLine{553 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} IsLeaf( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode ) \textcolor{keyword}{const};} \DoxyCodeLine{554 xbInt16 KeySetPosAdd( xbMdxTag *mpTag, xbUInt32 ulAddKeyRecNo );} \DoxyCodeLine{555 xbInt16 KeySetPosDel( xbMdxTag *mpTag );} \DoxyCodeLine{556 xbInt16 LoadTagDetail( xbInt16 iOption, xbMdxTag *tte );} \DoxyCodeLine{557 xbUInt32 PageToBlock( xbUInt32 ulPageNo );} \DoxyCodeLine{558 xbInt16 TagSerialNo( xbInt16 iOption, xbMdxTag *mpTag );} \DoxyCodeLine{559 xbInt16 UpdateTagSize( xbMdxTag *mpTag, xbUInt32 ulTagSz );} \DoxyCodeLine{560 } \DoxyCodeLine{561 \textcolor{preprocessor}{ \#ifdef XB\_DEBUG\_SUPPORT}} \DoxyCodeLine{562 xbInt16 PrintKey( \textcolor{keywordtype}{void} *vpTag, xbIxNode *npNode, xbInt16 iKeyNo, xbInt16 iDepth, \textcolor{keywordtype}{char} cType, xbInt16 iOutputOpt );} \DoxyCodeLine{563 \textcolor{preprocessor}{ \#endif}} \DoxyCodeLine{564 } \DoxyCodeLine{565 \textcolor{comment}{// MDX File Header Fields}} \DoxyCodeLine{566 \textcolor{keywordtype}{char} cVersion;} \DoxyCodeLine{567 \textcolor{keywordtype}{char} cCreateYY;} \DoxyCodeLine{568 \textcolor{keywordtype}{char} cCreateMM;} \DoxyCodeLine{569 \textcolor{keywordtype}{char} cCreateDD;} \DoxyCodeLine{570 xbString sFileName;} \DoxyCodeLine{571 xbInt16 iBlockFactor; \textcolor{comment}{// 1-\/32 \#of 512 byte segments in a block}} \DoxyCodeLine{572 } \DoxyCodeLine{573 \textcolor{comment}{// use file version}} \DoxyCodeLine{574 \textcolor{comment}{// xbInt16 iBlockSize; // Stored at the xbFile level}} \DoxyCodeLine{575 } \DoxyCodeLine{576 \textcolor{keywordtype}{char} cProdIxFlag;} \DoxyCodeLine{577 \textcolor{keywordtype}{char} cTagEntryCnt;} \DoxyCodeLine{578 xbInt16 iTagLen;} \DoxyCodeLine{579 xbInt16 iTagUseCnt;} \DoxyCodeLine{580 \textcolor{keywordtype}{char} cNextTag; \textcolor{comment}{// byte 28 +1}} \DoxyCodeLine{581 \textcolor{keywordtype}{char} c1B; \textcolor{comment}{// always 0x1B}} \DoxyCodeLine{582 xbUInt32 ulPageCnt; \textcolor{comment}{// number of 512 byte pages in the mdx file}} \DoxyCodeLine{583 xbUInt32 ulFirstFreePage; \textcolor{comment}{// page number corresponding to the next free block}} \DoxyCodeLine{584 xbUInt32 ulNoOfBlockAvail; \textcolor{comment}{// might be improperly named?? not sure how it is used}} \DoxyCodeLine{585 \textcolor{keywordtype}{char} cUpdateYY;} \DoxyCodeLine{586 \textcolor{keywordtype}{char} cUpdateMM;} \DoxyCodeLine{587 \textcolor{keywordtype}{char} cUpdateDD;} \DoxyCodeLine{588 \textcolor{comment}{// end of MDX Header fields}} \DoxyCodeLine{589 } \DoxyCodeLine{590 } \DoxyCodeLine{591 } \DoxyCodeLine{592 xbMdxTag *mdxTagTbl;} \DoxyCodeLine{593 } \DoxyCodeLine{594 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bReuseEmptyNodes; \textcolor{comment}{// Reuese empty MDX nodes when all keys deleted?}} \DoxyCodeLine{595 \textcolor{comment}{// DBase 7.x and MS ODBC drivers do not reuse empty nodes, leaves them stranded in the file}} \DoxyCodeLine{596 \textcolor{comment}{// Codebase 6.x reuses empty nodes.}} \DoxyCodeLine{597 \textcolor{comment}{// Setting this to True will reuse empty nodes in the same manner Codebase 6.x reuses them.}} \DoxyCodeLine{598 } \DoxyCodeLine{599 \};} \DoxyCodeLine{600 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* XB\_MDX\_SUPPORT */}\textcolor{preprocessor}{}} \DoxyCodeLine{601 } \DoxyCodeLine{602 } \DoxyCodeLine{603 \} \textcolor{comment}{/* namespace xb */}} \DoxyCodeLine{604 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* XB\_INDEX\_SUPPORT */}\textcolor{preprocessor}{}} \DoxyCodeLine{605 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_\_XB\_INDEX\_H\_\_ */}\textcolor{preprocessor}{}} \end{DoxyCode}