Dillo v3.1.1-119-g140d9ebd
Loading...
Searching...
No Matches
dw::TrieBuilder Class Reference

#include <hyphenator.hh>

Classes

struct  DataEntry
 
struct  StackEntry
 

Public Member Functions

 TrieBuilder (int pack)
 
 ~TrieBuilder ()
 
void insert (const char *key, const char *value)
 
TriecreateTrie ()
 

Private Member Functions

void stateStackPush (unsigned char c)
 
int stateStackPop ()
 
int insertState (StackEntry *state, bool root)
 
void insertSorted (unsigned char *key, const char *value)
 

Static Private Member Functions

static int keyCompare (const void *p1, const void *p2)
 

Private Attributes

int pack
 
lout::misc::SimpleVector< Trie::TrieNode > * tree
 
lout::misc::SimpleVector< DataEntry > * dataList
 
lout::misc::SimpleVector< StackEntry > * stateStack
 
lout::misc::ZoneAllocatordataZone
 

Static Private Attributes

static Trie::TrieNode trieNodeNull = {'\0', 0, NULL}
 

Detailed Description

Definition at line 50 of file hyphenator.hh.

Constructor & Destructor Documentation

◆ TrieBuilder()

dw::TrieBuilder::TrieBuilder ( int  pack)

Definition at line 378 of file hyphenator.cc.

References dataList, dataZone, pack, stateStack, stateStackPush(), and tree.

◆ ~TrieBuilder()

dw::TrieBuilder::~TrieBuilder ( )

Definition at line 388 of file hyphenator.cc.

References dataList, dataZone, stateStack, and tree.

Member Function Documentation

◆ createTrie()

Trie * dw::TrieBuilder::createTrie ( )

◆ insert()

void dw::TrieBuilder::insert ( const char *  key,
const char *  value 
)

◆ insertSorted()

void dw::TrieBuilder::insertSorted ( unsigned char *  key,
const char *  value 
)
private

Definition at line 508 of file hyphenator.cc.

References stateStack, stateStackPop(), and stateStackPush().

Referenced by createTrie().

◆ insertState()

◆ keyCompare()

int dw::TrieBuilder::keyCompare ( const void *  p1,
const void *  p2 
)
staticprivate

Definition at line 403 of file hyphenator.cc.

References dw::TrieBuilder::DataEntry::key.

Referenced by createTrie().

◆ stateStackPop()

int dw::TrieBuilder::stateStackPop ( )
private

Definition at line 469 of file hyphenator.cc.

References insertState(), and stateStack.

Referenced by createTrie(), and insertSorted().

◆ stateStackPush()

void dw::TrieBuilder::stateStackPush ( unsigned char  c)
private

Definition at line 461 of file hyphenator.cc.

References dw::TrieBuilder::StackEntry::c, and stateStack.

Referenced by insertSorted(), and TrieBuilder().

Member Data Documentation

◆ dataList

lout::misc::SimpleVector<DataEntry>* dw::TrieBuilder::dataList
private

Definition at line 68 of file hyphenator.hh.

Referenced by createTrie(), insert(), TrieBuilder(), and ~TrieBuilder().

◆ dataZone

lout::misc::ZoneAllocator* dw::TrieBuilder::dataZone
private

Definition at line 70 of file hyphenator.hh.

Referenced by createTrie(), insert(), TrieBuilder(), and ~TrieBuilder().

◆ pack

int dw::TrieBuilder::pack
private

Definition at line 65 of file hyphenator.hh.

Referenced by insertState(), and TrieBuilder().

◆ stateStack

lout::misc::SimpleVector<StackEntry>* dw::TrieBuilder::stateStack
private

◆ tree

lout::misc::SimpleVector<Trie::TrieNode>* dw::TrieBuilder::tree
private

Definition at line 67 of file hyphenator.hh.

Referenced by createTrie(), insertState(), TrieBuilder(), and ~TrieBuilder().

◆ trieNodeNull

Trie::TrieNode dw::TrieBuilder::trieNodeNull = {'\0', 0, NULL}
staticprivate

Definition at line 66 of file hyphenator.hh.

Referenced by insertState().


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