From fa82e9bdf2dfc8406b4309a0617efd4bb7f85774 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Mon, 28 Dec 2009 14:30:37 +0800 Subject: [PATCH] Add Some source files. --- src/CustomPhrase.cc | 2 ++ src/CustomPhrase.h | 17 +++++++++++++++++ src/HashTable.h | 23 +++++++++++++++++++++++ src/Makefile.am | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 src/CustomPhrase.cc create mode 100644 src/CustomPhrase.h create mode 100644 src/HashTable.h diff --git a/src/CustomPhrase.cc b/src/CustomPhrase.cc new file mode 100644 index 0000000..f532c7d --- /dev/null +++ b/src/CustomPhrase.cc @@ -0,0 +1,2 @@ +#include "CustomPhrase.h" + diff --git a/src/CustomPhrase.h b/src/CustomPhrase.h new file mode 100644 index 0000000..f876d65 --- /dev/null +++ b/src/CustomPhrase.h @@ -0,0 +1,17 @@ +#ifndef __PY_CUSTOM_PHRASE_H_ +#define __PY_CUSTOM_PHRASE_H_ + +#include + +namespace PY { + +class CustomPhrase { +public: + CustomPhrase (void) {} +private: + gboolean load (const gchar *file); +}; + +}; + +#endif diff --git a/src/HashTable.h b/src/HashTable.h new file mode 100644 index 0000000..fdb8d34 --- /dev/null +++ b/src/HashTable.h @@ -0,0 +1,23 @@ +#ifndef __PY_HASH_TABLE_H_ +#define __PY_HASH_TABLE_H_ +#include + +namespace PY { + +template +class HashTable { +public: + HashTable () { + m_table = g_hash_table_new_full (); + } + +private: + static guint hash (const T1 & v) { + return v.hash(); + } + +private: + GHashTable *m_table; + +}; +#endif diff --git a/src/Makefile.am b/src/Makefile.am index 6c91601..ca91ac5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,6 +35,7 @@ AM_CXXFLAGS = $(AM_CFLAGS) libexec_PROGRAMS = ibus-engine-pinyin ibus_engine_c_sources = \ Config.cc \ + CustomPhrase.cc \ Database.cc \ DoublePinyinEditor.cc \ Engine.cc \ @@ -56,12 +57,14 @@ ibus_engine_h_sources = \ Array.h \ Bus.h \ Config.h \ + CustomPhrase.h \ Database.h \ DoublePinyinEditor.h \ DoublePinyinTable.h \ Engine.h \ FullPinyinEditor.h \ HalfFullConverter.h \ + HashTable.h \ LookupTable.h \ Phrase.h \ PhraseArray.h \ -- 2.7.4