LibreOffice Module editeng (master) 1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
editeng::TrieNode Struct Referencefinal

Public Member Functions

 TrieNode (sal_Unicode aCharacter='\0')
 
void markWord ()
 
TrieNodefindChild (sal_Unicode aCharacter)
 
TrieNodetraversePath (std::u16string_view sPath)
 
void addNewChild (TrieNode *pChild)
 
void collectSuggestions (std::u16string_view sPath, std::vector< OUString > &rSuggestionList)
 

Static Public Member Functions

static void collectSuggestionsForCurrentNode (TrieNode *pCurrent, std::u16string_view sPath, std::vector< OUString > &rSuggestionList)
 

Public Attributes

sal_Unicode mCharacter
 
bool mMarker
 
std::vector< std::unique_ptr< TrieNode > > mChildren
 
std::unique_ptr< TrieNodemLatinArray [LATIN_ARRAY_SIZE]
 

Static Public Attributes

static const int LATIN_ARRAY_SIZE = 26
 

Detailed Description

Definition at line 21 of file Trie.cxx.

Constructor & Destructor Documentation

◆ TrieNode()

editeng::TrieNode::TrieNode ( sal_Unicode  aCharacter = '\0')
explicit

Definition at line 40 of file Trie.cxx.

References i, and mLatinArray.

Member Function Documentation

◆ addNewChild()

void editeng::TrieNode::addNewChild ( TrieNode pChild)

Definition at line 55 of file Trie.cxx.

References mCharacter, mChildren, mLatinArray, and u.

Referenced by editeng::Trie::insert().

◆ collectSuggestions()

void editeng::TrieNode::collectSuggestions ( std::u16string_view  sPath,
std::vector< OUString > &  rSuggestionList 
)

◆ collectSuggestionsForCurrentNode()

void editeng::TrieNode::collectSuggestionsForCurrentNode ( TrieNode pCurrent,
std::u16string_view  sPath,
std::vector< OUString > &  rSuggestionList 
)
static

Definition at line 102 of file Trie.cxx.

References collectSuggestions(), mCharacter, and mMarker.

Referenced by collectSuggestions().

◆ findChild()

TrieNode * editeng::TrieNode::findChild ( sal_Unicode  aCharacter)

Definition at line 68 of file Trie.cxx.

References mChildren, mLatinArray, and u.

Referenced by editeng::Trie::insert(), and traversePath().

◆ markWord()

void editeng::TrieNode::markWord ( )

Definition at line 50 of file Trie.cxx.

References mMarker.

Referenced by editeng::Trie::insert().

◆ traversePath()

TrieNode * editeng::TrieNode::traversePath ( std::u16string_view  sPath)

Definition at line 113 of file Trie.cxx.

References findChild().

Member Data Documentation

◆ LATIN_ARRAY_SIZE

const int editeng::TrieNode::LATIN_ARRAY_SIZE = 26
static

Definition at line 23 of file Trie.cxx.

◆ mCharacter

sal_Unicode editeng::TrieNode::mCharacter

Definition at line 25 of file Trie.cxx.

Referenced by addNewChild(), and collectSuggestionsForCurrentNode().

◆ mChildren

std::vector<std::unique_ptr<TrieNode> > editeng::TrieNode::mChildren

Definition at line 27 of file Trie.cxx.

Referenced by addNewChild(), collectSuggestions(), and findChild().

◆ mLatinArray

std::unique_ptr<TrieNode> editeng::TrieNode::mLatinArray[LATIN_ARRAY_SIZE]

Definition at line 28 of file Trie.cxx.

Referenced by addNewChild(), collectSuggestions(), findChild(), and TrieNode().

◆ mMarker

bool editeng::TrieNode::mMarker

Definition at line 26 of file Trie.cxx.

Referenced by collectSuggestionsForCurrentNode(), and markWord().


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