#include <utf8.h>
Collaboration diagram for Greek:

Public Types | |
| enum | Letter { Alpha = 1, Beta = 2, Gamma = 3, Delta = 4, Epsilon = 5, Zeta = 6, Eta = 7, Theta = 8, Iota = 9, Kappa = 10, Lambda = 11, Mu = 12, Nu = 13, Xi = 14, Omicron = 15, Pi = 16, Rho = 17, Sigma = 18, Tau = 19, Upsilon = 20, Phi = 21, Chi = 22, Psi = 23, Omega = 24 } |
Static Public Member Functions | |
| static const std::string & | canonicalAbbreviation (const std::string &) |
Public Attributes | |
| std::string * | abbrevs |
| std::string * | names |
| int | nLetters |
Static Public Attributes | |
| static Greek * | instance = NULL |
Private Member Functions | |
| Greek () | |
| ~Greek () | |
|
|
Definition at line 74 of file utf8.h. 00074 {
00075 Alpha = 1,
00076 Beta = 2,
00077 Gamma = 3,
00078 Delta = 4,
00079 Epsilon = 5,
00080 Zeta = 6,
00081 Eta = 7,
00082 Theta = 8,
00083 Iota = 9,
00084 Kappa = 10,
00085 Lambda = 11,
00086 Mu = 12,
00087 Nu = 13,
00088 Xi = 14,
00089 Omicron = 15,
00090 Pi = 16,
00091 Rho = 17,
00092 Sigma = 18,
00093 Tau = 19,
00094 Upsilon = 20,
00095 Phi = 21,
00096 Chi = 22,
00097 Psi = 23,
00098 Omega = 24,
00099 };
|
|
|
Definition at line 709 of file utf8.cpp. References abbrevs, canonicalAbbrevs, greekAlphabet, names, and nLetters. Referenced by canonicalAbbreviation(). 00710 {
00711 nLetters = sizeof(greekAlphabet) / sizeof(greekAlphabet[0]);
00712 names = new std::string[nLetters];
00713 abbrevs = new std::string[nLetters];
00714
00715 for (int i = 0; i < nLetters; i++)
00716 {
00717 names[i] = std::string(greekAlphabet[i]);
00718 abbrevs[i] = std::string(canonicalAbbrevs[i]);
00719 }
00720 }
|
|
|
Definition at line 722 of file utf8.cpp. References abbrevs, and names.
|
|
|
Definition at line 728 of file utf8.cpp. References abbrevs, compareIgnoringCase(), Greek(), greekAlphabetUTF8, instance, names, nLetters, and noAbbrev(). Referenced by StarNameDatabase::findCatalogNumberByName(). 00729 {
00730 if (instance == NULL)
00731 instance = new Greek();
00732
00733 int i;
00734 for (i = 0; i < Greek::instance->nLetters; i++)
00735 {
00736 if (compareIgnoringCase(letter, instance->names[i]) == 0)
00737 return instance->abbrevs[i];
00738 }
00739
00740 for (i = 0; i < Greek::instance->nLetters; i++)
00741 {
00742 if (compareIgnoringCase(letter, instance->abbrevs[i]) == 0)
00743 return instance->abbrevs[i];
00744 }
00745
00746 if (letter.length() == 2)
00747 {
00748 for (i = 0; i < Greek::instance->nLetters; i++)
00749 {
00750 if (letter[0] == greekAlphabetUTF8[i][0] &&
00751 letter[1] == greekAlphabetUTF8[i][1])
00752 {
00753 return instance->abbrevs[i];
00754 }
00755 }
00756 }
00757
00758 return noAbbrev;
00759 }
|
|
|
Definition at line 107 of file utf8.h. Referenced by canonicalAbbreviation(), Greek(), ReplaceGreekLetterAbbr(), and ~Greek(). |
|
|
Definition at line 707 of file utf8.cpp. Referenced by canonicalAbbreviation(). |
|
|
Definition at line 106 of file utf8.h. Referenced by canonicalAbbreviation(), Greek(), and ~Greek(). |
|
|
Definition at line 105 of file utf8.h. Referenced by canonicalAbbreviation(), and Greek(). |
1.4.1