summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-03-21 09:55:59 +0800
committerPeng Wu <alexepico@gmail.com>2013-03-21 09:55:59 +0800
commit581f0fd06f62791d5c2e31b4a8c7b1f07a82d313 (patch)
tree9b0268012e9dc63d58a0d11a040545350c90a7b8
parent1ac46fc96bbdbd1c15d3fd5b3057ae606999d933 (diff)
downloadlibpinyin-581f0fd06f62791d5c2e31b4a8c7b1f07a82d313.tar.gz
libpinyin-581f0fd06f62791d5c2e31b4a8c7b1f07a82d313.tar.xz
libpinyin-581f0fd06f62791d5c2e31b4a8c7b1f07a82d313.zip
hide defines
-rw-r--r--src/pinyin.cpp29
-rw-r--r--src/pinyin.h27
2 files changed, 29 insertions, 27 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 35a7dc8..6d6ff84 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -51,11 +51,40 @@ struct _pinyin_context_t{
bool m_modified;
};
+struct _pinyin_instance_t{
+ pinyin_context_t * m_context;
+ gchar * m_raw_full_pinyin;
+ TokenVector m_prefixes;
+ ChewingKeyVector m_pinyin_keys;
+ ChewingKeyRestVector m_pinyin_key_rests;
+ CandidateConstraints m_constraints;
+ MatchResults m_match_results;
+ CandidateVector m_candidates;
+};
+
+struct _lookup_candidate_t{
+ enum lookup_candidate_type_t m_candidate_type;
+ gchar * m_phrase_string;
+ phrase_token_t m_token;
+ ChewingKeyRest m_orig_rest;
+ gchar * m_new_pinyins;
+ guint32 m_freq; /* the amplifed gfloat numerical value. */
+public:
+ _lookup_candidate_t() {
+ m_candidate_type = NORMAL_CANDIDATE;
+ m_phrase_string = NULL;
+ m_token = null_token;
+ m_new_pinyins = NULL;
+ m_freq = 0;
+ }
+};
+
struct _import_iterator_t{
pinyin_context_t * m_context;
guint8 m_phrase_index;
};
+
static bool check_format(const char * userdir){
gchar * filename = g_build_filename
(userdir, "version", NULL);
diff --git a/src/pinyin.h b/src/pinyin.h
index 40d9d3d..e8c46bf 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -63,33 +63,6 @@ enum lookup_candidate_type_t{
ZOMBIE_CANDIDATE
};
-struct _lookup_candidate_t{
- enum lookup_candidate_type_t m_candidate_type;
- gchar * m_phrase_string;
- phrase_token_t m_token;
- ChewingKeyRest m_orig_rest;
- gchar * m_new_pinyins;
- guint32 m_freq; /* the amplifed gfloat numerical value. */
-public:
- _lookup_candidate_t() {
- m_candidate_type = NORMAL_CANDIDATE;
- m_phrase_string = NULL;
- m_token = null_token;
- m_new_pinyins = NULL;
- m_freq = 0;
- }
-};
-
-struct _pinyin_instance_t{
- pinyin_context_t * m_context;
- gchar * m_raw_full_pinyin;
- TokenVector m_prefixes;
- ChewingKeyVector m_pinyin_keys;
- ChewingKeyRestVector m_pinyin_key_rests;
- CandidateConstraints m_constraints;
- MatchResults m_match_results;
-};
-
/**
* pinyin_init:
* @systemdir: the system wide language model data directory.