Skip to content
Browse files

hide defines

  • Loading branch information...
1 parent 1ac46fc commit 581f0fd06f62791d5c2e31b4a8c7b1f07a82d313 @epico committed Mar 21, 2013
Showing with 29 additions and 27 deletions.
  1. +29 −0 src/pinyin.cpp
  2. +0 −27 src/pinyin.h
View
29 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);
View
27 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.

0 comments on commit 581f0fd

Please sign in to comment.
Something went wrong with that request. Please try again.