Xbase64 Class Library 3.1.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
xbNdx Class Reference

xbNdx class More...

#include <xbndx.h>

Inheritance diagram for xbNdx:
xbIndex xbFile

Public Member Functions

 xbNdx ()
 
 xbNdx (xbDbf *)
 
virtual ~xbNdx ()
 
xbShort CreateIndex (const char *IxName, const char *Exp, xbShort Unique, xbShort OverLay)
 
xbLong GetTotalNodes ()
 
xbULong GetCurDbfRec ()
 
xbShort CreateKey (xbShort, xbShort)
 
xbShort GetCurrentKey (char *key)
 
xbShort AddKey (xbLong)
 
xbShort UniqueIndex ()
 
xbShort DeleteKey (xbLong)
 
xbShort KeyWasChanged ()
 
xbShort FindKey (const char *Key)
 
xbShort FindKey ()
 
xbShort FindKey (xbDouble)
 
xbShort GetNextKey ()
 Short description.
 
xbShort GetLastKey ()
 Short description.
 
xbShort GetFirstKey ()
 Short description.
 
xbShort GetPrevKey ()
 Short description.
 
xbShort ReIndex (void(*statusFunc)(xbLong itemNum, xbLong numItems)=0)
 
xbShort KeyExists (const char *Key)
 
xbShort KeyExists (xbDouble)
 
virtual void SetNodeSize (xbShort size)
 
virtual void GetExpression (char *buf, int len)
 
virtual const char * GetExtWithDot (bool lower)
 
- Public Member Functions inherited from xbIndex
 xbIndex ()
 
 xbIndex (xbDbf *)
 
virtual ~xbIndex ()
 
xbShort OpenIndex (const char *)
 
xbShort CloseIndex ()
 
virtual xbShort TouchIndex ()
 
virtual xbShort GetNodeSize ()
 
virtual void Flush ()
 
virtual const char * GetIxName ()
 
xbShort AllocKeyBufs ()
 
xbBool IsOpen ()
 

Protected Member Functions

virtual xbUShort GetKeyLen ()
 
virtual const char * GetKeyExpression ()
 
virtual void FreeNodesMemory ()
 
xbLong GetLeftNodeNo (xbShort, xbNdxNodeLink *)
 
xbShort CompareKey (const char *Key1, const char *Key2, xbShort Klen)
 Short description.
 
xbLong GetDbfNo (xbShort RecNo, xbNdxNodeLink *n)
 Short description.
 
char * GetKeyData (xbShort, xbNdxNodeLink *)
 
xbUShort GetKeysPerNode ()
 
virtual xbShort GetHeadNode ()
 
xbShort GetLeafNode (xbLong, xbShort)
 
xbNdxNodeLinkGetNodeMemory ()
 
void ReleaseNodeMemory (xbNdxNodeLink *n, xbBool doFree=false)
 
xbShort BSearchNode (const char *key, xbShort klen, const xbNdxNodeLink *node, xbShort *comp)
 
xbLong GetLeafFromInteriorNode (const char *Tkey, xbShort Klen)
 
xbShort CalcKeyLen ()
 
xbShort PutKeyData (xbShort, xbNdxNodeLink *)
 
xbShort PutLeftNodeNo (xbShort, xbNdxNodeLink *, xbLong)
 
xbShort PutLeafNode (xbLong, xbNdxNodeLink *)
 
xbShort PutHeadNode (xbNdxHeadNode *, FILE *, xbShort)
 
xbShort PutDbfNo (xbShort, xbNdxNodeLink *, xbLong)
 
xbShort PutKeyInNode (xbNdxNodeLink *, xbShort, xbLong, xbLong, xbShort)
 
xbShort SplitLeafNode (xbNdxNodeLink *, xbNdxNodeLink *, xbShort, xbLong)
 
xbShort SplitINode (xbNdxNodeLink *, xbNdxNodeLink *, xbLong)
 
xbShort AddToIxList ()
 
xbShort RemoveFromIxList ()
 
xbShort RemoveKeyFromNode (xbShort, xbNdxNodeLink *)
 
xbShort FindKey (const char *Tkey, xbShort Klen, xbShort RetrieveSw)
 
xbShort UpdateParentKey (xbNdxNodeLink *)
 
xbShort GetFirstKey (xbShort)
 
xbShort GetNextKey (xbShort)
 
xbShort GetLastKey (xbLong, xbShort)
 
xbShort GetPrevKey (xbShort)
 
void UpdateDeleteList (xbNdxNodeLink *)
 
void ProcessDeleteList ()
 
xbNdxNodeLinkLeftSiblingHasSpace (xbNdxNodeLink *)
 
xbNdxNodeLinkRightSiblingHasSpace (xbNdxNodeLink *)
 
xbShort DeleteSibling (xbNdxNodeLink *)
 
xbShort MoveToLeftNode (xbNdxNodeLink *, xbNdxNodeLink *)
 
xbShort MoveToRightNode (xbNdxNodeLink *, xbNdxNodeLink *)
 
xbShort FindKey (const char *Tkey, xbLong DbfRec)
 
- Protected Member Functions inherited from xbFile
void SetFileName (const char *filename)
 
 xbFile ()
 
const xbStringGetFileName ()
 
xbString MakeFileName (const char *filename)
 

Protected Attributes

xbNdxHeadNode HeadNode
 
xbNdxLeafNode LeafNode
 
xbLong xbNodeLinkCtr
 
xbLong ReusedxbNodeLinks
 
char Node [XB_MAX_NDX_NODE_SIZE]
 
xbNdxNodeLinkNodeChain
 
xbNdxNodeLinkFreeNodeChain
 
xbNdxNodeLinkCurNode
 
xbNdxNodeLinkDeleteChain
 
- Protected Attributes inherited from xbIndex
xbIndexindex
 
xbDbfdbf
 
xbExpn * IxExp
 
FILE * indexfp
 
xbULong CurDbfRec
 
char * KeyBuf
 
char * KeyBuf2
 
xbShort NodeSize
 

Detailed Description

xbNdx class

Constructor & Destructor Documentation

◆ xbNdx() [1/2]

xbNdx::xbNdx ( )

◆ xbNdx() [2/2]

xbNdx::xbNdx ( xbDbf * )

◆ ~xbNdx()

virtual xbNdx::~xbNdx ( )
virtual

Member Function Documentation

◆ AddKey()

xbShort xbNdx::AddKey ( xbLong )
virtual

Implements xbIndex.

◆ AddToIxList()

xbShort xbNdx::AddToIxList ( )
protected

◆ BSearchNode()

xbShort xbNdx::BSearchNode ( const char * key,
xbShort klen,
const xbNdxNodeLink * node,
xbShort * comp )
protected

◆ CalcKeyLen()

xbShort xbNdx::CalcKeyLen ( )
protected

◆ CompareKey()

xbShort xbNdx::CompareKey ( const char * Key1,
const char * Key2,
xbShort Klen )
inlineprotected

Short description.

◆ CreateIndex()

xbShort xbNdx::CreateIndex ( const char * IxName,
const char * Exp,
xbShort Unique,
xbShort OverLay )
virtual

Implements xbIndex.

◆ CreateKey()

xbShort xbNdx::CreateKey ( xbShort ,
xbShort  )
virtual

Implements xbIndex.

◆ DeleteKey()

xbShort xbNdx::DeleteKey ( xbLong )
virtual

Implements xbIndex.

◆ DeleteSibling()

xbShort xbNdx::DeleteSibling ( xbNdxNodeLink * )
protected

◆ FindKey() [1/5]

xbShort xbNdx::FindKey ( )
virtual

Implements xbIndex.

◆ FindKey() [2/5]

xbShort xbNdx::FindKey ( const char * Key)
virtual

Implements xbIndex.

◆ FindKey() [3/5]

xbShort xbNdx::FindKey ( const char * Tkey,
xbLong DbfRec )
protected

◆ FindKey() [4/5]

xbShort xbNdx::FindKey ( const char * Tkey,
xbShort Klen,
xbShort RetrieveSw )
protected

◆ FindKey() [5/5]

xbShort xbNdx::FindKey ( xbDouble )
virtual

Implements xbIndex.

◆ FreeNodesMemory()

virtual void xbNdx::FreeNodesMemory ( )
protectedvirtual

Implements xbIndex.

◆ GetCurDbfRec()

xbULong xbNdx::GetCurDbfRec ( )
inlinevirtual

Implements xbIndex.

◆ GetCurrentKey()

xbShort xbNdx::GetCurrentKey ( char * key)
virtual

Implements xbIndex.

◆ GetDbfNo()

xbLong xbNdx::GetDbfNo ( xbShort RecNo,
xbNdxNodeLink * n )
inlineprotected

Short description.

◆ GetExpression()

virtual void xbNdx::GetExpression ( char * buf,
int len )
virtual

Implements xbIndex.

◆ GetExtWithDot()

virtual const char * xbNdx::GetExtWithDot ( bool lower)
virtual

Implements xbFile.

◆ GetFirstKey() [1/2]

xbShort xbNdx::GetFirstKey ( )
inlinevirtual

Short description.

Implements xbIndex.

◆ GetFirstKey() [2/2]

xbShort xbNdx::GetFirstKey ( xbShort )
protected

◆ GetHeadNode()

virtual xbShort xbNdx::GetHeadNode ( )
protectedvirtual

Implements xbIndex.

◆ GetKeyData()

char * xbNdx::GetKeyData ( xbShort ,
xbNdxNodeLink *  )
protected

◆ GetKeyExpression()

virtual const char * xbNdx::GetKeyExpression ( )
protectedvirtual

Implements xbIndex.

◆ GetKeyLen()

virtual xbUShort xbNdx::GetKeyLen ( )
protectedvirtual

Implements xbIndex.

◆ GetKeysPerNode()

xbUShort xbNdx::GetKeysPerNode ( )
protected

◆ GetLastKey() [1/2]

xbShort xbNdx::GetLastKey ( )
inlinevirtual

Short description.

Implements xbIndex.

◆ GetLastKey() [2/2]

xbShort xbNdx::GetLastKey ( xbLong ,
xbShort  )
protected

◆ GetLeafFromInteriorNode()

xbLong xbNdx::GetLeafFromInteriorNode ( const char * Tkey,
xbShort Klen )
protected

◆ GetLeafNode()

xbShort xbNdx::GetLeafNode ( xbLong ,
xbShort  )
protected

◆ GetLeftNodeNo()

xbLong xbNdx::GetLeftNodeNo ( xbShort ,
xbNdxNodeLink *  )
protected

◆ GetNextKey() [1/2]

xbShort xbNdx::GetNextKey ( )
inlinevirtual

Short description.

Implements xbIndex.

◆ GetNextKey() [2/2]

xbShort xbNdx::GetNextKey ( xbShort )
protected

◆ GetNodeMemory()

xbNdxNodeLink * xbNdx::GetNodeMemory ( )
protected

◆ GetPrevKey() [1/2]

xbShort xbNdx::GetPrevKey ( )
inlinevirtual

Short description.

Implements xbIndex.

◆ GetPrevKey() [2/2]

xbShort xbNdx::GetPrevKey ( xbShort )
protected

◆ GetTotalNodes()

xbLong xbNdx::GetTotalNodes ( )
virtual

Implements xbIndex.

◆ KeyExists() [1/2]

xbShort xbNdx::KeyExists ( const char * Key)
inline

◆ KeyExists() [2/2]

xbShort xbNdx::KeyExists ( xbDouble )
virtual

Implements xbIndex.

◆ KeyWasChanged()

xbShort xbNdx::KeyWasChanged ( )
virtual

Implements xbIndex.

◆ LeftSiblingHasSpace()

xbNdxNodeLink * xbNdx::LeftSiblingHasSpace ( xbNdxNodeLink * )
protected

◆ MoveToLeftNode()

xbShort xbNdx::MoveToLeftNode ( xbNdxNodeLink * ,
xbNdxNodeLink *  )
protected

◆ MoveToRightNode()

xbShort xbNdx::MoveToRightNode ( xbNdxNodeLink * ,
xbNdxNodeLink *  )
protected

◆ ProcessDeleteList()

void xbNdx::ProcessDeleteList ( )
protected

◆ PutDbfNo()

xbShort xbNdx::PutDbfNo ( xbShort ,
xbNdxNodeLink * ,
xbLong  )
protected

◆ PutHeadNode()

xbShort xbNdx::PutHeadNode ( xbNdxHeadNode * ,
FILE * ,
xbShort  )
protected

◆ PutKeyData()

xbShort xbNdx::PutKeyData ( xbShort ,
xbNdxNodeLink *  )
protected

◆ PutKeyInNode()

xbShort xbNdx::PutKeyInNode ( xbNdxNodeLink * ,
xbShort ,
xbLong ,
xbLong ,
xbShort  )
protected

◆ PutLeafNode()

xbShort xbNdx::PutLeafNode ( xbLong ,
xbNdxNodeLink *  )
protected

◆ PutLeftNodeNo()

xbShort xbNdx::PutLeftNodeNo ( xbShort ,
xbNdxNodeLink * ,
xbLong  )
protected

◆ ReIndex()

xbShort xbNdx::ReIndex ( void(*)(xbLong itemNum, xbLong numItems) statusFunc = 0)
virtual

Implements xbIndex.

◆ ReleaseNodeMemory()

void xbNdx::ReleaseNodeMemory ( xbNdxNodeLink * n,
xbBool doFree = false )
protected

◆ RemoveFromIxList()

xbShort xbNdx::RemoveFromIxList ( )
protected

◆ RemoveKeyFromNode()

xbShort xbNdx::RemoveKeyFromNode ( xbShort ,
xbNdxNodeLink *  )
protected

◆ RightSiblingHasSpace()

xbNdxNodeLink * xbNdx::RightSiblingHasSpace ( xbNdxNodeLink * )
protected

◆ SetNodeSize()

virtual void xbNdx::SetNodeSize ( xbShort size)
virtual

Reimplemented from xbIndex.

◆ SplitINode()

xbShort xbNdx::SplitINode ( xbNdxNodeLink * ,
xbNdxNodeLink * ,
xbLong  )
protected

◆ SplitLeafNode()

xbShort xbNdx::SplitLeafNode ( xbNdxNodeLink * ,
xbNdxNodeLink * ,
xbShort ,
xbLong  )
protected

◆ UniqueIndex()

xbShort xbNdx::UniqueIndex ( )
inlinevirtual

Implements xbIndex.

◆ UpdateDeleteList()

void xbNdx::UpdateDeleteList ( xbNdxNodeLink * )
protected

◆ UpdateParentKey()

xbShort xbNdx::UpdateParentKey ( xbNdxNodeLink * )
protected

Member Data Documentation

◆ CurNode

xbNdxNodeLink* xbNdx::CurNode
protected

◆ DeleteChain

xbNdxNodeLink* xbNdx::DeleteChain
protected

◆ FreeNodeChain

xbNdxNodeLink* xbNdx::FreeNodeChain
protected

◆ HeadNode

xbNdxHeadNode xbNdx::HeadNode
protected

◆ LeafNode

xbNdxLeafNode xbNdx::LeafNode
protected

◆ Node

char xbNdx::Node[XB_MAX_NDX_NODE_SIZE]
protected

◆ NodeChain

xbNdxNodeLink* xbNdx::NodeChain
protected

◆ ReusedxbNodeLinks

xbLong xbNdx::ReusedxbNodeLinks
protected

◆ xbNodeLinkCtr

xbLong xbNdx::xbNodeLinkCtr
protected

The documentation for this class was generated from the following file: