diff options
author | 2013-04-10 15:55:22 -0700 | |
---|---|---|
committer | 2013-04-10 15:55:22 -0700 | |
commit | 38a9e5a5bf1a45e87db9a4b03f670cf402321d45 (patch) | |
tree | 7d9b20717370e6f8e054162062aa6cc3eb1197e0 /native/jni/src/digraph_utils.h | |
parent | 3e1f652c2c39351d306b3a930340948a46104de0 (diff) | |
parent | b6e1777d4b78fd425f1960299fd28a685c41aaeb (diff) | |
download | latinime-38a9e5a5bf1a45e87db9a4b03f670cf402321d45.tar.gz latinime-38a9e5a5bf1a45e87db9a4b03f670cf402321d45.tar.xz latinime-38a9e5a5bf1a45e87db9a4b03f670cf402321d45.zip |
am b6e1777d: Merge "Add mechanism to handle digraphs in DicNode"
* commit 'b6e1777d4b78fd425f1960299fd28a685c41aaeb':
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 |