Added <<ostream operator for GalaxyType

This commit is contained in:
Chris Laurel 2001-04-22 22:39:12 +00:00
parent ccd60eeda4
commit 92bbdb35db
2 changed files with 8 additions and 0 deletions

View file

@ -307,3 +307,9 @@ GalaxyList* ReadGalaxyList(istream& in)
return galaxies;
}
ostream& operator<<(ostream& s, const Galaxy::GalaxyType& sc)
{
return s << GalaxyTypeNames[static_cast<int>(sc)].name;
}

View file

@ -75,4 +75,6 @@ typedef std::vector<Galaxy*> GalaxyList;
GalaxyList* ReadGalaxyList(std::istream& in);
std::ostream& operator<<(std::ostream& s, const Galaxy::GalaxyType& sc);
#endif // _GALAXY_H_