aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/digraph_utils.h
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-04-10 22:52:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-10 22:52:25 +0000
commitb6e1777d4b78fd425f1960299fd28a685c41aaeb (patch)
tree7d9b20717370e6f8e054162062aa6cc3eb1197e0 /native/jni/src/digraph_utils.h
parent099dd3f277bcf43326b9e23642edf77a35b5dd94 (diff)
parent25e8eda9afb5c36703bd50b263ab0dd3a3b38d31 (diff)
downloadlatinime-b6e1777d4b78fd425f1960299fd28a685c41aaeb.tar.gz
latinime-b6e1777d4b78fd425f1960299fd28a685c41aaeb.tar.xz
latinime-b6e1777d4b78fd425f1960299fd28a685c41aaeb.zip
Merge "Add mechanism to handle digraphs in DicNode"
Diffstat (limited to 'native/jni/src/digraph_utils.h')
-rw-r--r--native/jni/src/digraph_utils.h19
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