44 #ifdef __GNU_LesserG__
57 #define XB_INLINE_GETDBFNO
59 #define XB_NDX_NODE_BASESIZE 24
61 #define XB_VAR_NODESIZE
63 #ifndef XB_VAR_NODESIZE
64 #define XB_NDX_NODE_SIZE 2048
67 #define XB_DEFAULT_NDX_NODE_SIZE 512
68 #define XB_MAX_NDX_NODE_SIZE 4096
69 #define XB_NDX_NODE_SIZE NodeSize
70 #define XB_NDX_NODE_MULTIPLE 512
89 #ifndef XB_VAR_NODESIZE
102 #ifndef XB_VAR_NODESIZE
149 void DumpHdrNode(
xbShort Option );
150 void DumpNodeRec(
xbLong NodeNo );
151 void DumpNodeChain();
190 #ifndef XB_VAR_NODESIZE
215 if(!( Key1 && Key2 ))
return -1;
221 c = memcmp(Key1, Key2, Klen);
230 d1 = dbf->xbase->GetDouble( Key1 );
231 d2 = dbf->xbase->GetDouble( Key2 );
232 if( d1 == d2 )
return 0;
233 else if( d1 > d2 )
return 1;
238 #ifndef XB_INLINE_GETDBFNO
252 p += RecNo * ( 8 + HeadNode.
KeyLen );
253 return( dbf->xbase->GetLong( p ));
xbMH struct
Definition: xbdbf.h:190
xbIndex class
Definition: xbindex.h:63
xbNdx class
Definition: xbndx.h:126
virtual void GetExpression(char *buf, int len)
xbShort UpdateParentKey(xbNdxNodeLink *)
xbShort SplitLeafNode(xbNdxNodeLink *, xbNdxNodeLink *, xbShort, xbLong)
virtual xbShort GetHeadNode()
xbShort GetFirstKey()
Short description.
Definition: xbndx.h:165
xbShort PutLeafNode(xbLong, xbNdxNodeLink *)
xbLong ReusedxbNodeLinks
Definition: xbndx.h:188
xbShort RemoveFromIxList()
virtual const char * GetExtWithDot(bool lower)
char * GetKeyData(xbShort, xbNdxNodeLink *)
xbShort PutHeadNode(xbNdxHeadNode *, FILE *, xbShort)
xbShort KeyExists(const char *Key)
Definition: xbndx.h:171
xbShort FindKey(const char *Tkey, xbLong DbfRec)
xbShort GetLeafNode(xbLong, xbShort)
xbShort BSearchNode(const char *key, xbShort klen, const xbNdxNodeLink *node, xbShort *comp)
xbULong GetCurDbfRec()
Definition: xbndx.h:138
xbLong GetLeftNodeNo(xbShort, xbNdxNodeLink *)
void ReleaseNodeMemory(xbNdxNodeLink *n, xbBool doFree=false)
virtual const char * GetKeyExpression()
xbNdxNodeLink * NodeChain
Definition: xbndx.h:196
xbShort CreateKey(xbShort, xbShort)
xbShort FindKey(const char *Tkey, xbShort Klen, xbShort RetrieveSw)
xbLong GetDbfNo(xbShort RecNo, xbNdxNodeLink *n)
Short description.
Definition: xbndx.h:244
xbShort PutKeyData(xbShort, xbNdxNodeLink *)
xbUShort GetKeysPerNode()
xbShort KeyExists(xbDouble)
xbShort GetNextKey(xbShort)
xbShort GetPrevKey()
Short description.
Definition: xbndx.h:169
virtual void SetNodeSize(xbShort size)
xbNdxNodeLink * FreeNodeChain
Definition: xbndx.h:197
xbShort MoveToRightNode(xbNdxNodeLink *, xbNdxNodeLink *)
virtual void FreeNodesMemory()
xbLong GetLeafFromInteriorNode(const char *Tkey, xbShort Klen)
xbShort UniqueIndex()
Definition: xbndx.h:142
xbNdxNodeLink * CurNode
Definition: xbndx.h:198
void UpdateDeleteList(xbNdxNodeLink *)
xbShort FindKey(const char *Key)
xbShort GetNextKey()
Short description.
Definition: xbndx.h:157
xbNdxNodeLink * DeleteChain
Definition: xbndx.h:199
xbShort PutKeyInNode(xbNdxNodeLink *, xbShort, xbLong, xbLong, xbShort)
xbNdxNodeLink * RightSiblingHasSpace(xbNdxNodeLink *)
xbShort CreateIndex(const char *IxName, const char *Exp, xbShort Unique, xbShort OverLay)
xbShort MoveToLeftNode(xbNdxNodeLink *, xbNdxNodeLink *)
xbShort DeleteKey(xbLong)
xbShort SplitINode(xbNdxNodeLink *, xbNdxNodeLink *, xbLong)
xbLong xbNodeLinkCtr
Definition: xbndx.h:187
xbNdxLeafNode LeafNode
Definition: xbndx.h:186
xbShort PutLeftNodeNo(xbShort, xbNdxNodeLink *, xbLong)
xbShort GetFirstKey(xbShort)
xbShort FindKey(xbDouble)
xbShort GetCurrentKey(char *key)
xbShort GetPrevKey(xbShort)
xbNdxNodeLink * GetNodeMemory()
xbShort DeleteSibling(xbNdxNodeLink *)
virtual xbUShort GetKeyLen()
xbShort GetLastKey(xbLong, xbShort)
xbNdxNodeLink * LeftSiblingHasSpace(xbNdxNodeLink *)
xbShort CompareKey(const char *Key1, const char *Key2, xbShort Klen)
Short description.
Definition: xbndx.h:210
xbShort RemoveKeyFromNode(xbShort, xbNdxNodeLink *)
xbShort PutDbfNo(xbShort, xbNdxNodeLink *, xbLong)
xbNdxHeadNode HeadNode
Definition: xbndx.h:185
xbShort GetLastKey()
Short description.
Definition: xbndx.h:161
xbShort ReIndex(void(*statusFunc)(xbLong itemNum, xbLong numItems)=0)
xbNdxHeadnode struct
Definition: xbndx.h:77
xbLong TotalNodes
Definition: xbndx.h:79
xbUShort KeysPerNode
Definition: xbndx.h:83
xbLong NoOfKeys
Definition: xbndx.h:80
xbLong KeySize
Definition: xbndx.h:85
xbLong StartNode
Definition: xbndx.h:78
xbUShort KeyLen
Definition: xbndx.h:82
char Unknown2
Definition: xbndx.h:86
char Unique
Definition: xbndx.h:87
xbUShort KeyType
Definition: xbndx.h:84
xbNdxLeafNode struct
Definition: xbndx.h:100
xbLong NoOfKeysThisNode
Definition: xbndx.h:101
char KeyRecs[XB_MAX_NDX_NODE_SIZE - 4]
Definition: xbndx.h:105
xbNdxNodeLink struct
Definition: xbndx.h:113
struct xbNdxLeafNode Leaf
Definition: xbndx.h:118
xbNdxNodeLink * NextNode
Definition: xbndx.h:115
xbNdxNodeLink * PrevNode
Definition: xbndx.h:114
xbLong CurKeyNo
Definition: xbndx.h:116
#define XBDLLEXPORT
Definition: xbase64.h:86
#define XB_MAX_NDX_NODE_SIZE
Definition: xbndx.h:68
#define XB_NDX_NODE_SIZE
Definition: xbndx.h:69
long xbLong
Definition: xbtypes.h:61
short int xbBool
xbBool type
Definition: xbtypes.h:78
short int xbShort
xbShort type
Definition: xbtypes.h:60
unsigned short int xbUShort
xbUShort type
Definition: xbtypes.h:55
double xbDouble
xbDouble type
Definition: xbtypes.h:73
unsigned long int xbULong
xbULong type
Definition: xbtypes.h:50