Home
last modified time | relevance | path

Searched refs:terminalId (Results 1 – 20 of 20) sorted by relevance

/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/shortcut/
Dver4_shortcut_list_policy.h56 bool addNewShortcut(const int terminalId, const int *const codePoints, const int codePointCount, in addNewShortcut() argument
58 const int shortcutListPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
61 if (!mShortcutDictContent->createNewShortcutList(terminalId)) { in addNewShortcut()
62 AKLOGE("Cannot create new shortcut list. terminal id: %d", terminalId); in addNewShortcut()
65 const int writingPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
74 if (!mShortcutDictContent->createNewShortcutList(terminalId)) { in addNewShortcut()
75 AKLOGE("Cannot create new shortcut list. terminal id: %d", terminalId); in addNewShortcut()
78 int writingPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
81 AKLOGE("Cannot write shortcut entry. terminal id: %d, pos: %d", terminalId, in addNewShortcut()
93 AKLOGE("Cannot overwrite shortcut entry. terminal id: %d, pos: %d", terminalId, in addNewShortcut()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/shortcut/
Dver4_shortcut_list_policy.h66 bool addNewShortcut(const int terminalId, const int *const codePoints, const int codePointCount, in addNewShortcut() argument
68 const int shortcutListPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
71 if (!mShortcutDictContent->createNewShortcutList(terminalId)) { in addNewShortcut()
72 AKLOGE("Cannot create new shortcut list. terminal id: %d", terminalId); in addNewShortcut()
75 const int writingPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
84 if (!mShortcutDictContent->createNewShortcutList(terminalId)) { in addNewShortcut()
85 AKLOGE("Cannot create new shortcut list. terminal id: %d", terminalId); in addNewShortcut()
88 int writingPos = mShortcutDictContent->getShortcutListHeadPos(terminalId); in addNewShortcut()
91 AKLOGE("Cannot write shortcut entry. terminal id: %d, pos: %d", terminalId, in addNewShortcut()
103 AKLOGE("Cannot overwrite shortcut entry. terminal id: %d, pos: %d", terminalId, in addNewShortcut()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/content/
Dprobability_dict_content.cpp35 const ProbabilityEntry ProbabilityDictContent::getProbabilityEntry(const int terminalId) const { in getProbabilityEntry()
36 if (terminalId < 0 || terminalId >= mSize) { in getProbabilityEntry()
41 int entryPos = getEntryPos(terminalId); in getProbabilityEntry()
61 bool ProbabilityDictContent::setProbabilityEntry(const int terminalId, in setProbabilityEntry() argument
63 if (terminalId < 0) { in setProbabilityEntry()
66 const int entryPos = getEntryPos(terminalId); in setProbabilityEntry()
67 if (terminalId >= mSize) { in setProbabilityEntry()
79 mSize = terminalId + 1; in setProbabilityEntry()
129 int ProbabilityDictContent::getEntryPos(const int terminalId) const { in getEntryPos()
130 return terminalId * getEntrySize(); in getEntryPos()
Dterminal_position_lookup_table.cpp33 int TerminalPositionLookupTable::getTerminalPtNodePosition(const int terminalId) const { in getTerminalPtNodePosition()
34 if (terminalId < 0 || terminalId >= mSize) { in getTerminalPtNodePosition()
38 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(terminalId)); in getTerminalPtNodePosition()
44 const int terminalId, const int terminalPtNodePos) { in setTerminalPtNodePosition() argument
45 if (terminalId < 0) { in setTerminalPtNodePosition()
48 while (terminalId >= mSize) { in setTerminalPtNodePosition()
59 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(terminalId)); in setTerminalPtNodePosition()
Dbigram_dict_content.h62 int getBigramListHeadPos(const int terminalId) const { in getBigramListHeadPos() argument
64 if (!addressLookupTable->contains(terminalId)) { in getBigramListHeadPos()
67 return addressLookupTable->get(terminalId); in getBigramListHeadPos()
83 bool createNewBigramList(const int terminalId) { in createNewBigramList() argument
85 return getUpdatableAddressLookupTable()->set(terminalId, bigramListPos); in createNewBigramList()
Dterminal_position_lookup_table.h49 int getTerminalPtNodePosition(const int terminalId) const;
51 bool setTerminalPtNodePosition(const int terminalId, const int terminalPtNodePos);
64 int getEntryPos(const int terminalId) const { in getEntryPos() argument
65 return terminalId * Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE; in getEntryPos()
Dshortcut_dict_content.cpp63 int ShortcutDictContent::getShortcutListHeadPos(const int terminalId) const { in getShortcutListHeadPos()
65 if (!addressLookupTable->contains(terminalId)) { in getShortcutListHeadPos()
68 return addressLookupTable->get(terminalId); in getShortcutListHeadPos()
105 bool ShortcutDictContent::createNewShortcutList(const int terminalId) { in createNewShortcutList() argument
107 return getUpdatableAddressLookupTable()->set(terminalId, shortcutListListPos); in createNewShortcutList()
Dprobability_dict_content.h50 const ProbabilityEntry getProbabilityEntry(const int terminalId) const;
52 bool setProbabilityEntry(const int terminalId, const ProbabilityEntry *const probabilityEntry);
64 int getEntryPos(const int terminalId) const;
Dshortcut_dict_content.h63 int getShortcutListHeadPos(const int terminalId) const;
70 bool createNewShortcutList(const int terminalId);
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/bigram/
Dver4_bigram_list_policy.cpp62 bool Ver4BigramListPolicy::addNewEntry(const int terminalId, const int newTargetTerminalId, in addNewEntry() argument
72 const int bigramListPos = mBigramDictContent->getBigramListHeadPos(terminalId); in addNewEntry()
76 if (!mBigramDictContent->createNewBigramList(terminalId)) { in addNewEntry()
84 const int writingPos = mBigramDictContent->getBigramListHeadPos(terminalId); in addNewEntry()
102 if (!mBigramDictContent->createNewBigramList(terminalId)) { in addNewEntry()
105 const int destPos = mBigramDictContent->getBigramListHeadPos(terminalId); in addNewEntry()
145 bool Ver4BigramListPolicy::removeEntry(const int terminalId, const int targetTerminalId) { in removeEntry() argument
146 const int bigramListPos = mBigramDictContent->getBigramListHeadPos(terminalId); in removeEntry()
167 bool Ver4BigramListPolicy::updateAllBigramEntriesAndDeleteUselessEntries(const int terminalId, in updateAllBigramEntriesAndDeleteUselessEntries() argument
169 const int bigramListPos = mBigramDictContent->getBigramListHeadPos(terminalId); in updateAllBigramEntriesAndDeleteUselessEntries()
[all …]
Dver4_bigram_list_policy.h66 bool addNewEntry(const int terminalId, const int newTargetTerminalId,
69 bool removeEntry(const int terminalId, const int targetTerminalId);
71 bool updateAllBigramEntriesAndDeleteUselessEntries(const int terminalId,
74 int getBigramEntryConut(const int terminalId);
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/content/
Dterminal_position_lookup_table.cpp23 int TerminalPositionLookupTable::getTerminalPtNodePosition(const int terminalId) const { in getTerminalPtNodePosition()
24 if (terminalId < 0 || terminalId >= mSize) { in getTerminalPtNodePosition()
28 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(terminalId)); in getTerminalPtNodePosition()
34 const int terminalId, const int terminalPtNodePos) { in setTerminalPtNodePosition() argument
35 if (terminalId < 0) { in setTerminalPtNodePosition()
38 while (terminalId >= mSize) { in setTerminalPtNodePosition()
49 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(terminalId)); in setTerminalPtNodePosition()
Dterminal_position_lookup_table.h41 int getTerminalPtNodePosition(const int terminalId) const;
43 bool setTerminalPtNodePosition(const int terminalId, const int terminalPtNodePos);
56 int getEntryPos(const int terminalId) const { in getEntryPos() argument
57 return terminalId * Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE; in getEntryPos()
Dshortcut_dict_content.cpp54 int ShortcutDictContent::getShortcutListHeadPos(const int terminalId) const { in getShortcutListHeadPos()
56 if (!addressLookupTable->contains(terminalId)) { in getShortcutListHeadPos()
59 return addressLookupTable->get(terminalId); in getShortcutListHeadPos()
90 bool ShortcutDictContent::createNewShortcutList(const int terminalId) { in createNewShortcutList() argument
92 return getUpdatableAddressLookupTable()->set(terminalId, shortcutListListPos); in createNewShortcutList()
Dshortcut_dict_content.h54 int getShortcutListHeadPos(const int terminalId) const;
63 bool createNewShortcutList(const int terminalId);
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_patricia_trie_node_writer.cpp193 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in writeNewTerminalPtNodeAndAdvancePosition() local
194 if (!writePtNodeAndGetTerminalIdAndAdvancePosition(ptNodeParams, &terminalId, in writeNewTerminalPtNodeAndAdvancePosition()
202 terminalId, &probabilityEntryOfUnigramProperty); in writeNewTerminalPtNodeAndAdvancePosition()
305 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in writePtNodeAndGetTerminalIdAndAdvancePosition() local
308 terminalId = ptNodeParams->getTerminalId(); in writePtNodeAndGetTerminalIdAndAdvancePosition()
312 terminalId = mBuffers->getTerminalPositionLookupTable()->getNextTerminalId(); in writePtNodeAndGetTerminalIdAndAdvancePosition()
315 const int isTerminal = terminalId != Ver4DictConstants::NOT_A_TERMINAL_ID; in writePtNodeAndGetTerminalIdAndAdvancePosition()
319 terminalId, nodePos)) { in writePtNodeAndGetTerminalIdAndAdvancePosition()
323 if (!mTrieBuffer->writeUintAndAdvancePosition(terminalId, in writePtNodeAndGetTerminalIdAndAdvancePosition()
328 *outTerminalId = terminalId; in writePtNodeAndGetTerminalIdAndAdvancePosition()
Dver4_patricia_trie_node_reader.cpp58 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
64 terminalId = Ver4PatriciaTrieReadingUtils::getTerminalIdAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
86 terminalIdFieldPos, terminalId, NOT_A_PROBABILITY, childrenPosFieldPos, childrenPos, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_patricia_trie_node_writer.cpp221 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in writeNewTerminalPtNodeAndAdvancePosition() local
222 if (!writePtNodeAndGetTerminalIdAndAdvancePosition(ptNodeParams, &terminalId, in writeNewTerminalPtNodeAndAdvancePosition()
230 return mBuffers->getMutableProbabilityDictContent()->setProbabilityEntry(terminalId, in writeNewTerminalPtNodeAndAdvancePosition()
358 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in writePtNodeAndGetTerminalIdAndAdvancePosition() local
361 terminalId = ptNodeParams->getTerminalId(); in writePtNodeAndGetTerminalIdAndAdvancePosition()
365 terminalId = mBuffers->getTerminalPositionLookupTable()->getNextTerminalId(); in writePtNodeAndGetTerminalIdAndAdvancePosition()
368 const int isTerminal = terminalId != Ver4DictConstants::NOT_A_TERMINAL_ID; in writePtNodeAndGetTerminalIdAndAdvancePosition()
372 terminalId, nodePos)) { in writePtNodeAndGetTerminalIdAndAdvancePosition()
376 if (!mTrieBuffer->writeUintAndAdvancePosition(terminalId, in writePtNodeAndGetTerminalIdAndAdvancePosition()
381 *outTerminalId = terminalId; in writePtNodeAndGetTerminalIdAndAdvancePosition()
Dver4_patricia_trie_node_reader.cpp66 int terminalId = Ver4DictConstants::NOT_A_TERMINAL_ID; in fetchPtNodeInfoFromBufferAndProcessMovedPtNode() local
73 terminalId = Ver4PatriciaTrieReadingUtils::getTerminalIdAndAdvancePosition(dictBuf, &pos); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
75 mProbabilityDictContent->getProbabilityEntry(terminalId); in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
103 terminalIdFieldPos, terminalId, probability, childrenPosFieldPos, childrenPos, in fetchPtNodeInfoFromBufferAndProcessMovedPtNode()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/
Dpt_node_params.h77 const int terminalIdFieldPos, const int terminalId, const int probability, in PtNodeParams() argument
81 mTerminalIdFieldPos(terminalIdFieldPos), mTerminalId(terminalId), in PtNodeParams()
84 mBigramLinkedNodePos(NOT_A_DICT_POS), mShortcutPos(terminalId), in PtNodeParams()
85 mBigramPos(terminalId), mSiblingPos(siblingPos) { in PtNodeParams()