Document kana_table.*

Originally committed to SVN as r3368.
This commit is contained in:
Amar Takhar 2009-08-06 01:55:24 +00:00
parent 6b8ac0d0ea
commit d899c816b8
2 changed files with 15 additions and 33 deletions

View File

@ -41,13 +41,11 @@
/// @brief DOCME /// @brief Constructor
///
KanaTable::KanaTable() KanaTable::KanaTable()
{ {
// Regular kana usage and combinations // Regular kana usage and combinations
Insert(L"\u3042",L"\u30a2",L"a"); Insert(L"\u3042",L"\u30a2",L"a");
Insert(L"\u3044",L"\u30a4",L"i"); Insert(L"\u3044",L"\u30a4",L"i");
Insert(L"\u3046",L"\u30a6",L"u"); Insert(L"\u3046",L"\u30a6",L"u");
@ -142,7 +140,7 @@ KanaTable::KanaTable()
Insert(L"\u3057\u3083",L"\u30b7\u30e3",L"sha"); Insert(L"\u3057\u3083",L"\u30b7\u30e3",L"sha");
Insert(L"\u3057\u3085",L"\u30b7\u30e5",L"shu"); Insert(L"\u3057\u3085",L"\u30b7\u30e5",L"shu");
Insert(L"\u3057\u3087",L"\u30b7\u30e7",L"sho"); Insert(L"\u3057\u3087",L"\u30b7\u30e7",L"sho");
Insert(L"\u3061\u3083",L"\u30c1\u30e3",L"cha"); Insert(L"\u3061\u3083",L"\u30c1\u30e3",L"cha");
Insert(L"\u3061\u3085",L"\u30c1\u30e5",L"chu"); Insert(L"\u3061\u3085",L"\u30c1\u30e5",L"chu");
Insert(L"\u3061\u3087",L"\u30c1\u30e7",L"cho"); Insert(L"\u3061\u3087",L"\u30c1\u30e7",L"cho");
@ -170,7 +168,7 @@ KanaTable::KanaTable()
Insert(L"\u3058\u3083",L"\u30b8\u30e3",L"ja"); Insert(L"\u3058\u3083",L"\u30b8\u30e3",L"ja");
Insert(L"\u3058\u3085",L"\u30b8\u30e5",L"ju"); Insert(L"\u3058\u3085",L"\u30b8\u30e5",L"ju");
Insert(L"\u3058\u3087",L"\u30b8\u30e7",L"jo"); Insert(L"\u3058\u3087",L"\u30b8\u30e7",L"jo");
Insert(L"\u3062\u3083",L"\u30c2\u30e3",L"ja"); Insert(L"\u3062\u3083",L"\u30c2\u30e3",L"ja");
Insert(L"\u3062\u3085",L"\u30c2\u30e5",L"ju"); Insert(L"\u3062\u3085",L"\u30c2\u30e5",L"ju");
Insert(L"\u3062\u3087",L"\u30c2\u30e7",L"jo"); Insert(L"\u3062\u3087",L"\u30c2\u30e7",L"jo");
@ -269,8 +267,7 @@ KanaTable::KanaTable()
} }
/// @brief DOCME /// @brief Destructor
///
KanaTable::~KanaTable() KanaTable::~KanaTable()
{ {
// Do nothing // Do nothing
@ -278,14 +275,12 @@ KanaTable::~KanaTable()
/// @brief DOCME /// @brief Add Hiragana, Katakana and hepburn romaji tuple.
/// @param hira /// @param hira Hiragana to add.
/// @param kata /// @param kata Katakana to add.
/// @param hep /// @param hep Hepburn romaji to add.
/// ///
void KanaTable::Insert(const wchar_t *hira, const wchar_t *kata, const wchar_t *hep) void KanaTable::Insert(const wchar_t *hira, const wchar_t *kata, const wchar_t *hep)
{ {
entries.push_back(KanaEntry(hira,kata,hep)); entries.push_back(KanaEntry(hira,kata,hep));
} }

View File

@ -43,33 +43,24 @@
/// DOCME
/// @class KanaEntry /// @class KanaEntry
/// @brief DOCME /// @brief Base class for Kana + Romaji tuples.
///
/// DOCME
class KanaEntry { class KanaEntry {
public: public:
/// DOCME /// Hiragana
wxString hiragana; wxString hiragana;
/// DOCME /// Katakana
wxString katakana; wxString katakana;
/// DOCME /// Hepburn romaji.
wxString hepburn; wxString hepburn;
/// @brief DOCME /// @brief Constructor
///
KanaEntry() {} KanaEntry() {}
/// @brief DOCME
/// @param hira
/// @param kata
/// @param hep
///
KanaEntry(const wxString &hira, const wxString &kata, const wxString &hep) { KanaEntry(const wxString &hira, const wxString &kata, const wxString &hep) {
hiragana = hira; hiragana = hira;
katakana = kata; katakana = kata;
@ -79,21 +70,17 @@ public:
/// DOCME
/// @class KanaTable /// @class KanaTable
/// @brief DOCME /// @brief Table of Hiragana, Katakana and Hepburn romaji tuples.
/// ///
/// DOCME
class KanaTable { class KanaTable {
private: private:
void Insert(const wchar_t *hira, const wchar_t *kata, const wchar_t *hep); void Insert(const wchar_t *hira, const wchar_t *kata, const wchar_t *hep);
public: public:
/// DOCME /// Memory list.
std::list<KanaEntry> entries; std::list<KanaEntry> entries;
KanaTable(); KanaTable();
~KanaTable(); ~KanaTable();
}; };