summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-08-08 15:24:51 +0800
committerPeng Wu <alexepico@gmail.com>2011-08-08 15:24:51 +0800
commit3de71392c23ff1012b9c38a03e6a53942eb704d5 (patch)
treeef197587359d76c182aaffb661d60a9bedcec239 /src/storage
parente44f8dc3df4766331b4d4296fd2cf7f88f70145a (diff)
downloadlibpinyin-3de71392c23ff1012b9c38a03e6a53942eb704d5.tar.gz
libpinyin-3de71392c23ff1012b9c38a03e6a53942eb704d5.tar.xz
libpinyin-3de71392c23ff1012b9c38a03e6a53942eb704d5.zip
refine namespace pinyin
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/ngram.cpp2
-rw-r--r--src/storage/ngram.h3
-rw-r--r--src/storage/phrase_index.cpp2
-rw-r--r--src/storage/phrase_index.h12
-rw-r--r--src/storage/phrase_large_table.h2
-rw-r--r--src/storage/pinyin_base.cpp2
-rw-r--r--src/storage/pinyin_base.h2
-rw-r--r--src/storage/pinyin_large_table.h1
-rw-r--r--src/storage/pinyin_phrase.h2
-rw-r--r--src/storage/tag_utility.cpp2
-rw-r--r--src/storage/tag_utility.h3
11 files changed, 13 insertions, 20 deletions
diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp
index 35aea0c..a4d72c2 100644
--- a/src/storage/ngram.cpp
+++ b/src/storage/ngram.cpp
@@ -26,6 +26,8 @@
#include "novel_types.h"
#include "ngram.h"
+using namespace pinyin;
+
struct SingleGramItem{
phrase_token_t m_token;
guint32 m_freq;
diff --git a/src/storage/ngram.h b/src/storage/ngram.h
index f8b59f1..1f891d0 100644
--- a/src/storage/ngram.h
+++ b/src/storage/ngram.h
@@ -132,7 +132,4 @@ public:
};
-using namespace pinyin;
-
-
#endif
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index 364601e..33da334 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -21,6 +21,8 @@
#include "phrase_index.h"
+using namespace pinyin;
+
bool PhraseItem::set_n_pronunciation(guint8 n_prouns){
m_chunk.set_content(sizeof(guint8), &n_prouns, sizeof(guint8));
return true;
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h
index d7fd4bc..ccabc9b 100644
--- a/src/storage/phrase_index.h
+++ b/src/storage/phrase_index.h
@@ -44,10 +44,10 @@
* ++++++++++++++++++++++++++++++++++++++++++
*/
-class PinyinLookup;
-
namespace pinyin{
+class PinyinLookup;
+
/* Because this is not large,
* Store this in user home directory.
*/
@@ -185,7 +185,7 @@ public:
};
class FacadePhraseIndex{
- friend class ::PinyinLookup;
+ friend class PinyinLookup;
private:
guint32 m_total_freq;
SubPhraseIndex * m_sub_phrase_indices[PHRASE_INDEX_LIBRARY_COUNT];
@@ -265,10 +265,4 @@ public:
};
-using namespace pinyin;
-
-
-
-
-
#endif
diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h
index 423c457..6e14d2e 100644
--- a/src/storage/phrase_large_table.h
+++ b/src/storage/phrase_large_table.h
@@ -106,6 +106,4 @@ public:
};
-using namespace pinyin;
-
#endif
diff --git a/src/storage/pinyin_base.cpp b/src/storage/pinyin_base.cpp
index e7715a0..7e2f805 100644
--- a/src/storage/pinyin_base.cpp
+++ b/src/storage/pinyin_base.cpp
@@ -25,6 +25,8 @@
#include "pinyin_phrase.h"
#include "pinyin_large_table.h"
+using namespace pinyin;
+
// Internal data definition
/**
diff --git a/src/storage/pinyin_base.h b/src/storage/pinyin_base.h
index 14d3a99..56b260f 100644
--- a/src/storage/pinyin_base.h
+++ b/src/storage/pinyin_base.h
@@ -723,6 +723,4 @@ int pinyin_compare_tone (const PinyinCustomSettings &custom,
PinyinTone rhs);
};
-using namespace pinyin;
-
#endif
diff --git a/src/storage/pinyin_large_table.h b/src/storage/pinyin_large_table.h
index 83f4de9..2ef862d 100644
--- a/src/storage/pinyin_large_table.h
+++ b/src/storage/pinyin_large_table.h
@@ -134,5 +134,4 @@ public:
};
-using namespace pinyin;
#endif
diff --git a/src/storage/pinyin_phrase.h b/src/storage/pinyin_phrase.h
index cbcb742..df6f26a 100644
--- a/src/storage/pinyin_phrase.h
+++ b/src/storage/pinyin_phrase.h
@@ -294,6 +294,4 @@ class PhraseExactLessThanWithToken
};
-using namespace pinyin;
-
#endif
diff --git a/src/storage/tag_utility.cpp b/src/storage/tag_utility.cpp
index 69b163b..a0179f3 100644
--- a/src/storage/tag_utility.cpp
+++ b/src/storage/tag_utility.cpp
@@ -7,6 +7,8 @@
#include "phrase_large_table.h"
#include "tag_utility.h"
+using namespace pinyin;
+
/* internal taglib structure */
struct tag_entry{
int m_line_type;
diff --git a/src/storage/tag_utility.h b/src/storage/tag_utility.h
index 67d8946..d52b2c4 100644
--- a/src/storage/tag_utility.h
+++ b/src/storage/tag_utility.h
@@ -54,7 +54,8 @@ bool taglib_pop_state();
bool taglib_fini();
namespace pinyin{
- class PhraseLargeTable;
+class PhraseLargeTable;
+class FacadePhraseIndex;
};
using namespace pinyin;