#include <constellation.h>
Public Member Functions | |
| std::string | getAbbreviation () |
| std::string | getGenitive () |
| std::string | getName () |
Static Public Member Functions | |
| static Constellation * | getConstellation (const std::string &) |
| static Constellation * | getConstellation (unsigned int) |
Private Member Functions | |
| Constellation (const char *_name, const char *_genitive, const char *_abbrev) | |
Static Private Member Functions | |
| static void | initialize () |
Private Attributes | |
| std::string | abbrev |
| std::string | genitive |
| std::string | name |
|
||||||||||||||||
|
Definition at line 118 of file constellation.cpp. References abbrev, genitive, and name. Referenced by initialize(). 00119 {
00120 name = string(_name);
00121 genitive = string(_genitive);
00122 abbrev = string(_abbrev);
00123 }
|
|
|
Definition at line 167 of file constellation.cpp. References abbrev. Referenced by StarNameDatabase::findCatalogNumberByName(). 00168 {
00169 return abbrev;
00170 }
|
|
|
Definition at line 137 of file constellation.cpp. References compareIgnoringCase(), constellationInfo, constellations, initialize(), and name. 00138 {
00139 if (constellations == NULL)
00140 initialize();
00141
00142 for (unsigned int i = 0;
00143 i < sizeof(constellationInfo) / sizeof(constellationInfo[0]);
00144 i++)
00145 {
00146 if (compareIgnoringCase(name, constellationInfo[i].abbr) == 0 ||
00147 compareIgnoringCase(name, constellationInfo[i].gen) == 0 ||
00148 compareIgnoringCase(name, constellationInfo[i].name) == 0)
00149 {
00150 return constellations[i];
00151 }
00152 }
00153
00154 return NULL;
00155 }
|
|
|
Definition at line 125 of file constellation.cpp. References constellationInfo, constellations, and initialize(). Referenced by StarNameDatabase::findCatalogNumberByName(). 00126 {
00127 if (constellations == NULL)
00128 initialize();
00129
00130 if (constellations == NULL ||
00131 n >= sizeof(constellationInfo) / sizeof(constellationInfo[0]))
00132 return NULL;
00133 else
00134 return constellations[n];
00135 }
|
|
|
Definition at line 162 of file constellation.cpp. References genitive. 00163 {
00164 return genitive;
00165 }
|
|
|
Definition at line 157 of file constellation.cpp. References name. 00158 {
00159 return name;
00160 }
|
|
|
Definition at line 172 of file constellation.cpp. References Constellation(), constellationInfo, constellations, and name. Referenced by getConstellation(). 00173 {
00174 int nConstellations = sizeof(constellationInfo) / sizeof(constellationInfo[0]);
00175 constellations = new Constellation* [nConstellations];
00176
00177 if (constellations != NULL)
00178 {
00179 for (int i = 0; i < nConstellations; i++)
00180 {
00181 constellations[i] = new Constellation(constellationInfo[i].name,
00182 constellationInfo[i].gen,
00183 constellationInfo[i].abbr);
00184 }
00185 }
00186 }
|
|
|
Definition at line 31 of file constellation.h. Referenced by Constellation(), and getAbbreviation(). |
|
|
Definition at line 30 of file constellation.h. Referenced by Constellation(), and getGenitive(). |
|
|
Definition at line 29 of file constellation.h. Referenced by Constellation(), getConstellation(), getName(), and initialize(). |
1.4.1