summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/chewing_key.h10
-rw-r--r--src/storage/pinyin_parser2.cpp1
-rw-r--r--src/storage/pinyin_parser2.h3
3 files changed, 14 insertions, 0 deletions
diff --git a/src/storage/chewing_key.h b/src/storage/chewing_key.h
index 970ed72..8234a4f 100644
--- a/src/storage/chewing_key.h
+++ b/src/storage/chewing_key.h
@@ -22,6 +22,8 @@
#ifndef CHEWING_KEY_H
#define CHEWING_KEY_H
+#include <glib.h>
+
/** @file chewing_key.h
* @brief the definitions of chewing key related classes and structs.
*/
@@ -137,6 +139,14 @@ struct ChewingKey
m_final = CHEWING_ZERO_FINAL;
m_tone = CHEWING_ZERO_TONE;
}
+
+ ChewingKey(ChewingInitial initial, ChewingMiddle middle,
+ ChewingFinal final) {
+ m_initial = initial;
+ m_middle = middle;
+ m_final = final;
+ m_tone = CHEWING_ZERO_TONE;
+ }
};
struct ChewingKeyRest
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp
index 7553ef6..0d68235 100644
--- a/src/storage/pinyin_parser2.cpp
+++ b/src/storage/pinyin_parser2.cpp
@@ -21,4 +21,5 @@
#include "pinyin_custom2.h"
#include "chewing_key.h"
+#include "pinyin_parser2.h"
#include "pinyin_parser_table.h"
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index e2c09a8..c2702cd 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -24,6 +24,8 @@
#include "chewing_key.h"
+namespace pinyin{
+
typedef struct {
const char * m_pinyin_str;
const char * m_chewing_str;
@@ -57,4 +59,5 @@ typedef struct {
gfloat m_benefit;
} resplit_table_item_t;
+};
#endif