summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-06-22 18:54:16 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-06-22 18:56:53 +0200
commit30e5a445254dac571d0b3ba2dc7a48e17ad58ec8 (patch)
treed6db9db0c3773eba4ea7473e354ac7b6a91af5ea /include
parentfix debug build on s390x (diff)
downloadcore-30e5a445254dac571d0b3ba2dc7a48e17ad58ec8.tar.gz
core-30e5a445254dac571d0b3ba2dc7a48e17ad58ec8.zip
Trie lookup tree code review fixes
Change-Id: Ib2d2b668f2ec17742a069d63506cdd2d25d10f0d
Diffstat (limited to 'include')
-rw-r--r--include/editeng/Trie.hxx23
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();