Scid  4.6.5
Public Member Functions | Protected Attributes | List of all members
StrTree< C > Class Template Reference

#include <strtree.h>

Public Member Functions

 StrTree ()
 
 ~StrTree ()
 
void DestroyTree (nodeT< C > *node)
 
void DestroyList ()
 
void SetAllocateStrings (bool b)
 
bool GetAllocateStrings ()
 
uint Size ()
 
uint Height ()
 
uint FirstByteSize (byte b)
 
void IterateStart ()
 
nodeT< C > * Iterate ()
 
void MakeList ()
 
void MakeTree ()
 
void Rebalance ()
 
nodeT< C > * Lookup (const char *str)
 
errorT Insert (const char *str, nodeT< C > **returnNode)
 
errorT AddLast (const char *str, nodeT< C > **returnNode)
 
nodeT< C > * LongestPrefix (const char *str)
 
nodeT< C > * Delete (const char *str)
 
void FindMatches (const char *str, int strLen, nodeT< C > *node, uint *matches, uint maxMatches, nodeT< C > **array)
 
uint GetFirstMatches (const char *str, uint max, nodeT< C > **results)
 
void DumpStats (FILE *fp)
 
void DumpRecurse (FILE *fp, const nodeT< C > *node, int height)
 
void DumpTree (FILE *fp)
 

Protected Attributes

nodeT< C > * Root [NUM_StrTrees]
 
nodeT< C > * First
 
nodeT< C > * Last
 
nodeT< C > * Iterator
 

Detailed Description

template<class C>
class StrTree< C >

Definition at line 78 of file strtree.h.

Constructor & Destructor Documentation

template<class C >
StrTree< C >::StrTree ( )

Definition at line 177 of file strtree.h.

template<class C >
StrTree< C >::~StrTree ( )

Definition at line 201 of file strtree.h.

Member Function Documentation

template<class C>
errorT StrTree< C >::AddLast ( const char *  str,
nodeT< C > **  returnNode 
)

Definition at line 509 of file strtree.h.

template<class C >
nodeT< C > * StrTree< C >::Delete ( const char *  str)

Definition at line 673 of file strtree.h.

template<class C >
void StrTree< C >::DestroyList ( )

Definition at line 236 of file strtree.h.

template<class C>
void StrTree< C >::DestroyTree ( nodeT< C > *  node)

Definition at line 217 of file strtree.h.

template<class C>
void StrTree< C >::DumpRecurse ( FILE *  fp,
const nodeT< C > *  node,
int  height 
)

Definition at line 788 of file strtree.h.

template<class C >
void StrTree< C >::DumpStats ( FILE *  fp)

Definition at line 816 of file strtree.h.

template<class C >
void StrTree< C >::DumpTree ( FILE *  fp)

Definition at line 800 of file strtree.h.

template<class C>
void StrTree< C >::FindMatches ( const char *  str,
int  strLen,
nodeT< C > *  node,
uint matches,
uint  maxMatches,
nodeT< C > **  array 
)

Definition at line 564 of file strtree.h.

template<class C>
uint StrTree< C >::FirstByteSize ( byte  b)
inline

Definition at line 148 of file strtree.h.

template<class C>
bool StrTree< C >::GetAllocateStrings ( )
inline

Definition at line 144 of file strtree.h.

template<class C>
uint StrTree< C >::GetFirstMatches ( const char *  str,
uint  max,
nodeT< C > **  results 
)

Definition at line 608 of file strtree.h.

template<class C>
uint StrTree< C >::Height ( )
inline

Definition at line 147 of file strtree.h.

template<class C>
errorT StrTree< C >::Insert ( const char *  str,
nodeT< C > **  returnNode 
)

Definition at line 423 of file strtree.h.

template<class C >
nodeT< C > * StrTree< C >::Iterate ( )
inline

Definition at line 259 of file strtree.h.

template<class C>
void StrTree< C >::IterateStart ( )
inline

Definition at line 150 of file strtree.h.

template<class C >
nodeT< C > * StrTree< C >::LongestPrefix ( const char *  str)

Definition at line 632 of file strtree.h.

template<class C >
nodeT< C > * StrTree< C >::Lookup ( const char *  str)

Definition at line 389 of file strtree.h.

template<class C >
void StrTree< C >::MakeList ( )

Definition at line 299 of file strtree.h.

template<class C >
void StrTree< C >::MakeTree ( )

Definition at line 365 of file strtree.h.

template<class C>
void StrTree< C >::Rebalance ( )
inline

Definition at line 155 of file strtree.h.

template<class C>
void StrTree< C >::SetAllocateStrings ( bool  b)
inline

Definition at line 141 of file strtree.h.

template<class C>
uint StrTree< C >::Size ( )
inline

Definition at line 146 of file strtree.h.

Member Data Documentation

template<class C>
nodeT<C>* StrTree< C >::First
protected

Definition at line 102 of file strtree.h.

template<class C>
nodeT<C>* StrTree< C >::Iterator
protected

Definition at line 104 of file strtree.h.

template<class C>
nodeT<C>* StrTree< C >::Last
protected

Definition at line 103 of file strtree.h.

template<class C>
nodeT<C>* StrTree< C >::Root[NUM_StrTrees]
protected

Definition at line 101 of file strtree.h.


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