From 2660f83a123b54af02a829cf941a0348194aa3c5 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi <ksk@google.com> Date: Mon, 2 Sep 2013 17:17:54 +0900 Subject: [PATCH] Change name of extendable_buffer.h to buffer_with_... . Bug: 6669677 Change-Id: Id2bd79d8f86c690d5c16d1ab726c5f6fa28ba5e3 --- native/jni/Android.mk | 2 +- .../dictionary/bigram/dynamic_bigram_list_policy.h | 2 +- .../dictionary/dynamic_patricia_trie_node_reader.cpp | 2 +- .../policyimpl/dictionary/dynamic_patricia_trie_policy.h | 2 +- .../dictionary/dynamic_patricia_trie_reading_helper.cpp | 2 ++ .../dictionary/dynamic_patricia_trie_reading_helper.h | 5 ++++- .../dictionary/shortcut/dynamic_shortcut_list_policy.h | 2 +- ...tendable_buffer.cpp => buffer_with_extendable_buffer.cpp} | 2 +- .../{extendable_buffer.h => buffer_with_extendable_buffer.h} | 1 - 9 files changed, 12 insertions(+), 8 deletions(-) rename native/jni/src/suggest/policyimpl/dictionary/utils/{extendable_buffer.cpp => buffer_with_extendable_buffer.cpp} (91%) rename native/jni/src/suggest/policyimpl/dictionary/utils/{extendable_buffer.h => buffer_with_extendable_buffer.h} (98%) diff --git a/native/jni/Android.mk b/native/jni/Android.mk index e323742f3d..3aa9738b40 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -79,8 +79,8 @@ LATIN_IME_CORE_SRC_FILES := \ patricia_trie_policy.cpp \ patricia_trie_reading_utils.cpp) \ $(addprefix suggest/policyimpl/dictionary/utils/, \ + buffer_with_extendable_buffer.cpp \ byte_array_utils.cpp \ - extendable_buffer.cpp \ format_utils.cpp) \ suggest/policyimpl/gesture/gesture_suggest_policy_factory.cpp \ $(addprefix suggest/policyimpl/typing/, \ diff --git a/native/jni/src/suggest/policyimpl/dictionary/bigram/dynamic_bigram_list_policy.h b/native/jni/src/suggest/policyimpl/dictionary/bigram/dynamic_bigram_list_policy.h index 5fb3500d66..072e85ea76 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/bigram/dynamic_bigram_list_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/bigram/dynamic_bigram_list_policy.h @@ -22,7 +22,7 @@ #include "defines.h" #include "suggest/core/policy/dictionary_bigrams_structure_policy.h" #include "suggest/policyimpl/dictionary/bigram/bigram_list_reading_utils.h" -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" namespace latinime { diff --git a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_node_reader.cpp b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_node_reader.cpp index 2b5aa26b70..6bb90fc2d2 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_node_reader.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_node_reader.cpp @@ -19,7 +19,7 @@ #include "suggest/core/policy/dictionary_bigrams_structure_policy.h" #include "suggest/core/policy/dictionary_shortcuts_structure_policy.h" #include "suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_utils.h" -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" namespace latinime { diff --git a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_policy.h b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_policy.h index 63c5ac8745..a235ad7613 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_policy.h @@ -22,7 +22,7 @@ #include "suggest/policyimpl/dictionary/bigram/dynamic_bigram_list_policy.h" #include "suggest/policyimpl/dictionary/header/header_policy.h" #include "suggest/policyimpl/dictionary/shortcut/dynamic_shortcut_list_policy.h" -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" #include "suggest/policyimpl/dictionary/utils/mmapped_buffer.h" namespace latinime { diff --git a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.cpp b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.cpp index d5c8082c1c..2042fcbd22 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.cpp @@ -16,6 +16,8 @@ #include "suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" + namespace latinime { // To avoid infinite loop caused by invalid or malicious forward links. diff --git a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.h b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.h index 518b232fb3..b108ed5fb7 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.h +++ b/native/jni/src/suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_helper.h @@ -21,10 +21,13 @@ #include "suggest/policyimpl/dictionary/dynamic_patricia_trie_node_reader.h" #include "suggest/policyimpl/dictionary/dynamic_patricia_trie_reading_utils.h" #include "suggest/policyimpl/dictionary/patricia_trie_reading_utils.h" -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" namespace latinime { +class BufferWithExtendableBuffer; +class DictionaryBigramsStructurePolicy; +class DictionaryShortcutsStructurePolicy; + /* * This class is used for traversing dynamic patricia trie. This class supports iterating nodes and * dealing with additional buffer. This class counts nodes and node arrays to avoid infinite loop. diff --git a/native/jni/src/suggest/policyimpl/dictionary/shortcut/dynamic_shortcut_list_policy.h b/native/jni/src/suggest/policyimpl/dictionary/shortcut/dynamic_shortcut_list_policy.h index 0bc44dd4f7..4bf745fa37 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/shortcut/dynamic_shortcut_list_policy.h +++ b/native/jni/src/suggest/policyimpl/dictionary/shortcut/dynamic_shortcut_list_policy.h @@ -22,7 +22,7 @@ #include "defines.h" #include "suggest/core/policy/dictionary_shortcuts_structure_policy.h" #include "suggest/policyimpl/dictionary/shortcut/shortcut_list_reading_utils.h" -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" namespace latinime { diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp similarity index 91% rename from native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp rename to native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp index 7f74adc451..8582c4b819 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h" +#include "suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h" namespace latinime { diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.h b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h similarity index 98% rename from native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.h rename to native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h index 859894d989..f23f1dbc54 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.h +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.h @@ -26,7 +26,6 @@ namespace latinime { -// TODO: change file name according to the class name. // This is used as a buffer that can be extended for updatable dictionaries. // To optimize performance, raw pointer is directly used for reading buffer. The position has to be // adjusted to access additional buffer. On the other hand, this class does not provide writable -- GitLab