Xbase Class Library  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
xbNdx Class Reference

xbNdx class More...

#include <ndx.h>

Inheritance diagram for xbNdx:
xbIndex

Public Member Functions

 xbNdx ()
 
 xbNdx (xbDbf *)
 
 ~xbNdx ()
 
xbShort OpenIndex (const char *FileName)
 
xbShort CloseIndex ()
 
xbShort CreateIndex (const char *IxName, const char *Exp, xbShort Unique, xbShort OverLay)
 
xbLong GetTotalNodes ()
 
xbLong 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. More...
 
xbShort GetLastKey ()
 Short description. More...
 
xbShort GetFirstKey ()
 Short description. More...
 
xbShort GetPrevKey ()
 Short description. More...
 
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)
 
- Public Member Functions inherited from xbIndex
 xbIndex ()
 
 xbIndex (xbDbf *)
 
virtual ~xbIndex ()
 
virtual xbShort LockIndex (const xbShort, const xbShort) const
 
virtual xbShort TouchIndex (void)
 
virtual xbShort GetNodeSize (void)
 

Protected Member Functions

xbLong GetLeftNodeNo (xbShort, xbNdxNodeLink *)
 
xbShort CompareKey (const char *Key1, const char *Key2, xbShort Klen)
 Short description. More...
 
xbLong GetDbfNo (xbShort RecNo, xbNdxNodeLink *n)
 Short description. More...
 
char * GetKeyData (xbShort, xbNdxNodeLink *)
 
xbUShort GetKeysPerNode ()
 
xbShort GetHeadNode ()
 
xbShort GetLeafNode (xbLong, xbShort)
 
xbNdxNodeLinkGetNodeMemory ()
 
void ReleaseNodeMemory (xbNdxNodeLink *)
 
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)
 
xbShort CloneNodeChain ()
 
xbShort UncloneNodeChain ()
 

Protected Attributes

xbNdxHeadNode HeadNode
 
xbNdxLeafNode LeafNode
 
xbLong xbNodeLinkCtr
 
xbLong ReusedxbNodeLinks
 
xbString IndexName
 
char Node [XB_MAX_NDX_NODE_SIZE]
 
xbNdxNodeLinkNodeChain
 
xbNdxNodeLinkFreeNodeChain
 
xbNdxNodeLinkCurNode
 
xbNdxNodeLinkDeleteChain
 
xbNdxNodeLinkCloneChain
 
xbLong CurDbfRec
 
char * KeyBuf
 
char * KeyBuf2
 

Additional Inherited Members

- Public Attributes inherited from xbIndex
xbIndexindex
 
xbDbfdbf
 
xbExpNode * ExpressionTree
 
xbString IndexName
 
FILE * indexfp
 
int IndexStatus
 
xbLong CurDbfRec
 
char * KeyBuf
 
char * KeyBuf2
 
xbShort NodeSize
 

Detailed Description

xbNdx class

Constructor & Destructor Documentation

xbNdx::xbNdx ( )
inline
xbNdx::xbNdx ( xbDbf )
xbNdx::~xbNdx ( )
inline

Member Function Documentation

xbShort xbNdx::AddKey ( xbLong  )
virtual

Implements xbIndex.

xbShort xbNdx::AddToIxList ( )
protected
xbShort xbNdx::BSearchNode ( const char *  key,
xbShort  klen,
const xbNdxNodeLink node,
xbShort comp 
)
protected
xbShort xbNdx::CalcKeyLen ( )
protected
xbShort xbNdx::CloneNodeChain ( )
protected
xbShort xbNdx::CloseIndex ( )
virtual

Implements xbIndex.

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

Short description.

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

Implements xbIndex.

xbShort xbNdx::CreateKey ( xbShort  ,
xbShort   
)
virtual

Implements xbIndex.

xbShort xbNdx::DeleteKey ( xbLong  )
virtual

Implements xbIndex.

xbShort xbNdx::DeleteSibling ( xbNdxNodeLink )
protected
xbShort xbNdx::FindKey ( const char *  Key)
virtual

Implements xbIndex.

xbShort xbNdx::FindKey ( )
virtual

Implements xbIndex.

xbShort xbNdx::FindKey ( xbDouble  )
virtual

Implements xbIndex.

xbShort xbNdx::FindKey ( const char *  Tkey,
xbShort  Klen,
xbShort  RetrieveSw 
)
protected
xbShort xbNdx::FindKey ( const char *  Tkey,
xbLong  DbfRec 
)
protected
xbLong xbNdx::GetCurDbfRec ( void  )
inlinevirtual

Implements xbIndex.

xbShort xbNdx::GetCurrentKey ( char *  key)
virtual

Implements xbIndex.

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

Short description.

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

Implements xbIndex.

xbShort xbNdx::GetFirstKey ( void  )
inlinevirtual

Short description.

Implements xbIndex.

xbShort xbNdx::GetFirstKey ( xbShort  )
protected
xbShort xbNdx::GetHeadNode ( )
protected
char* xbNdx::GetKeyData ( xbShort  ,
xbNdxNodeLink  
)
protected
xbUShort xbNdx::GetKeysPerNode ( )
protected
xbShort xbNdx::GetLastKey ( void  )
inlinevirtual

Short description.

Implements xbIndex.

xbShort xbNdx::GetLastKey ( xbLong  ,
xbShort   
)
protected
xbLong xbNdx::GetLeafFromInteriorNode ( const char *  Tkey,
xbShort  Klen 
)
protected
xbShort xbNdx::GetLeafNode ( xbLong  ,
xbShort   
)
protected
xbLong xbNdx::GetLeftNodeNo ( xbShort  ,
xbNdxNodeLink  
)
protected
xbShort xbNdx::GetNextKey ( void  )
inlinevirtual

Short description.

Implements xbIndex.

xbShort xbNdx::GetNextKey ( xbShort  )
protected
xbNdxNodeLink* xbNdx::GetNodeMemory ( )
protected
xbShort xbNdx::GetPrevKey ( void  )
inlinevirtual

Short description.

Implements xbIndex.

xbShort xbNdx::GetPrevKey ( xbShort  )
protected
xbLong xbNdx::GetTotalNodes ( )
virtual

Implements xbIndex.

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

Implements xbIndex.

xbShort xbNdx::KeyWasChanged ( )
virtual

Implements xbIndex.

xbNdxNodeLink* xbNdx::LeftSiblingHasSpace ( xbNdxNodeLink )
protected
xbShort xbNdx::MoveToLeftNode ( xbNdxNodeLink ,
xbNdxNodeLink  
)
protected
xbShort xbNdx::MoveToRightNode ( xbNdxNodeLink ,
xbNdxNodeLink  
)
protected
xbShort xbNdx::OpenIndex ( const char *  FileName)
virtual

Implements xbIndex.

void xbNdx::ProcessDeleteList ( )
protected
xbShort xbNdx::PutDbfNo ( xbShort  ,
xbNdxNodeLink ,
xbLong   
)
protected
xbShort xbNdx::PutHeadNode ( xbNdxHeadNode ,
FILE *  ,
xbShort   
)
protected
xbShort xbNdx::PutKeyData ( xbShort  ,
xbNdxNodeLink  
)
protected
xbShort xbNdx::PutKeyInNode ( xbNdxNodeLink ,
xbShort  ,
xbLong  ,
xbLong  ,
xbShort   
)
protected
xbShort xbNdx::PutLeafNode ( xbLong  ,
xbNdxNodeLink  
)
protected
xbShort xbNdx::PutLeftNodeNo ( xbShort  ,
xbNdxNodeLink ,
xbLong   
)
protected
xbShort xbNdx::ReIndex ( void(*)(xbLong itemNum, xbLong numItems)  statusFunc = 0)
virtual

Implements xbIndex.

void xbNdx::ReleaseNodeMemory ( xbNdxNodeLink )
protected
xbShort xbNdx::RemoveFromIxList ( )
protected
xbShort xbNdx::RemoveKeyFromNode ( xbShort  ,
xbNdxNodeLink  
)
protected
xbNdxNodeLink* xbNdx::RightSiblingHasSpace ( xbNdxNodeLink )
protected
virtual void xbNdx::SetNodeSize ( xbShort  size)
virtual

Reimplemented from xbIndex.

xbShort xbNdx::SplitINode ( xbNdxNodeLink ,
xbNdxNodeLink ,
xbLong   
)
protected
xbShort xbNdx::SplitLeafNode ( xbNdxNodeLink ,
xbNdxNodeLink ,
xbShort  ,
xbLong   
)
protected
xbShort xbNdx::UncloneNodeChain ( )
protected
xbShort xbNdx::UniqueIndex ( void  )
inlinevirtual

Implements xbIndex.

void xbNdx::UpdateDeleteList ( xbNdxNodeLink )
protected
xbShort xbNdx::UpdateParentKey ( xbNdxNodeLink )
protected

Member Data Documentation

xbNdxNodeLink* xbNdx::CloneChain
protected
xbLong xbNdx::CurDbfRec
protected
xbNdxNodeLink* xbNdx::CurNode
protected
xbNdxNodeLink* xbNdx::DeleteChain
protected
xbNdxNodeLink* xbNdx::FreeNodeChain
protected
xbNdxHeadNode xbNdx::HeadNode
protected
xbString xbNdx::IndexName
protected
char* xbNdx::KeyBuf
protected
char* xbNdx::KeyBuf2
protected
xbNdxLeafNode xbNdx::LeafNode
protected
char xbNdx::Node[XB_MAX_NDX_NODE_SIZE]
protected
xbNdxNodeLink* xbNdx::NodeChain
protected
xbLong xbNdx::ReusedxbNodeLinks
protected
xbLong xbNdx::xbNodeLinkCtr
protected

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