diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-22 18:54:16 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-22 18:56:53 +0200 |
commit | 30e5a445254dac571d0b3ba2dc7a48e17ad58ec8 (patch) | |
tree | d6db9db0c3773eba4ea7473e354ac7b6a91af5ea /include/editeng | |
parent | 0291994f133644683e5d4fdea91c61471531bc93 (diff) |
Trie lookup tree code review fixes
Change-Id: Ib2d2b668f2ec17742a069d63506cdd2d25d10f0d
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/Trie.hxx | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/include/editeng/Trie.hxx b/include/editeng/Trie.hxx index 2ac76aee380c..3ade079b3a91 100644 --- a/include/editeng/Trie.hxx +++ b/include/editeng/Trie.hxx @@ -14,34 +14,17 @@ #include <rtl/ustring.hxx> #include <vector> #include <editeng/editengdllapi.h> +#include <boost/scoped_ptr.hpp> namespace editeng { -struct TrieNode -{ - static const int LATIN_ARRAY_SIZE = 26; - - sal_Unicode mCharacter; - bool mMarker; - std::vector<TrieNode*> mChildren; - TrieNode* mLatinArray[LATIN_ARRAY_SIZE]; - - - TrieNode(sal_Unicode aCharacter = '\0'); - virtual ~TrieNode(); - - void markWord(); - TrieNode* findChild(sal_Unicode aCharacter); - TrieNode* traversePath(OUString sPath); - void addNewChild(TrieNode* pChild); - void collectSuggestions(OUString sPath, std::vector<OUString>& rSuggestionList); -}; +struct TrieNode; class EDITENG_DLLPUBLIC Trie { private: - TrieNode* mRoot; + boost::scoped_ptr<TrieNode> mRoot; public: Trie(); |