diff options
author | 2013-04-17 19:38:58 -0700 | |
---|---|---|
committer | 2013-04-17 19:38:58 -0700 | |
commit | 0ca76c94f5c669a83483edd90c3e000c05edfaf0 (patch) | |
tree | 249e50ec11ccf71a8169373cf03d560368ec993d /native/jni/src/digraph_utils.h | |
parent | 6267ec688ef8f2a5fb6b338170b3f1342c35e93d (diff) | |
parent | 38a9e5a5bf1a45e87db9a4b03f670cf402321d45 (diff) | |
download | latinime-0ca76c94f5c669a83483edd90c3e000c05edfaf0.tar.gz latinime-0ca76c94f5c669a83483edd90c3e000c05edfaf0.tar.xz latinime-0ca76c94f5c669a83483edd90c3e000c05edfaf0.zip |
am 38a9e5a5: am b6e1777d: Merge "Add mechanism to handle digraphs in DicNode"
* commit '38a9e5a5bf1a45e87db9a4b03f670cf402321d45':
Add mechanism to handle digraphs in DicNode
Diffstat (limited to 'native/jni/src/digraph_utils.h')
-rw-r--r-- | native/jni/src/digraph_utils.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/native/jni/src/digraph_utils.h b/native/jni/src/digraph_utils.h index 6e364b67a..94435228e 100644 --- a/native/jni/src/digraph_utils.h +++ b/native/jni/src/digraph_utils.h @@ -27,21 +27,34 @@ class DigraphUtils { SECOND_DIGRAPH_CODEPOINT } DigraphCodePointIndex; + typedef enum { + DIGRAPH_TYPE_NONE, + DIGRAPH_TYPE_GERMAN_UMLAUT, + DIGRAPH_TYPE_FRENCH_LIGATURES + } DigraphType; + typedef struct { int first; int second; int compositeGlyph; } digraph_t; static bool hasDigraphForCodePoint(const int dictFlags, const int compositeGlyphCodePoint); static int getAllDigraphsForDictionaryAndReturnSize( - const int dictFlags, const digraph_t **digraphs); + const int dictFlags, const digraph_t **const digraphs); static int getDigraphCodePointForIndex(const int dictFlags, const int compositeGlyphCodePoint, const DigraphCodePointIndex digraphCodePointIndex); + static int getDigraphCodePointForIndex(const int compositeGlyphCodePoint, + const DigraphCodePointIndex digraphCodePointIndex); private: DISALLOW_IMPLICIT_CONSTRUCTORS(DigraphUtils); - static const digraph_t *getDigraphForCodePoint( - const int dictFlags, const int compositeGlyphCodePoint); + static DigraphType getDigraphTypeForDictionary(const int dictFlags); + static int getAllDigraphsForDigraphTypeAndReturnSize( + const DigraphType digraphType, const digraph_t **const digraphs); + static const digraph_t *getDigraphForCodePoint(const int compositeGlyphCodePoint); + static const digraph_t *getDigraphForDigraphTypeAndCodePoint( + const DigraphType digraphType, const int compositeGlyphCodePoint); static const digraph_t GERMAN_UMLAUT_DIGRAPHS[]; static const digraph_t FRENCH_LIGATURES_DIGRAPHS[]; + static const DigraphType USED_DIGRAPH_TYPES[]; }; } // namespace latinime #endif // DIGRAPH_UTILS_H |