Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <galaxy_xml.h>
Public Member Functions | |
SGalaxy () | |
SGalaxy (const char *configfile) | |
SGalaxy (const SGalaxy &g) | |
void | writeGalaxy (VSFileSystem::VSFile &f) const |
void | writeSector (VSFileSystem::VSFile &f, int tabs, const string §orType, SGalaxy *planet_types) const |
void | processGalaxy (const string &sys) |
void | processSystem (const string &sys, const QVector &suggested_coordinates) |
~SGalaxy () | |
const string & | getVariable (const std::vector< string > §ion, const string &name, const string &default_value) const |
const string & | getRandSystem (const string §ion, const string &default_value) const |
const string & | getVariable (const string §ion, const string &name, const string &defaultvalue) const |
const string & | getVariable (const string §ion, const string &subsection, const string &name, const string &defaultvalue) const |
bool | setVariable (const string §ion, const string &name, const string &value) |
bool | setVariable (const string §ion, const string &subsection, const string &name, const string &value) |
void | addSection (const std::vector< string > §ion) |
void | setVariable (const std::vector< string > §ion, const string &name, const string &value) |
SubHeirarchy & | getHeirarchy () |
const std::string & | operator[] (const std::string &s) const |
Protected Member Functions | |
SGalaxy & | operator= (const SGalaxy &a) |
Protected Attributes | |
class SubHeirarchy * | subheirarchy |
StringMap | data |
Friends | |
class | Galaxy |
Definition at line 17 of file galaxy_xml.h.
|
inline |
Definition at line 25 of file galaxy_xml.h.
References subheirarchy.
SGalaxy::SGalaxy | ( | const char * | configfile) |
Definition at line 262 of file galaxy_xml.cpp.
References GalaxyXML::beginElement(), GalaxyXML::endElement(), f, GalaxyXML::XML::g, VSFileSystem::Ok, SERVER, subheirarchy, VSFileSystem::UniverseFile, and x.
SGalaxy::SGalaxy | ( | const SGalaxy & | g) |
SGalaxy::~SGalaxy | ( | ) |
Definition at line 164 of file galaxy_xml.cpp.
void SGalaxy::addSection | ( | const std::vector< string > & | section) |
Definition at line 315 of file galaxy_xml.cpp.
References getHeirarchy(), and i.
Referenced by GalaxyXML::beginElement().
SubHeirarchy & SGalaxy::getHeirarchy | ( | ) |
Definition at line 285 of file galaxy_xml.cpp.
References subheirarchy.
Referenced by addSection(), StarIter::Done(), NearestSystem(), NumStarsInGalaxy(), setVariable(), and StarIter::StarIter().
const string & SGalaxy::getRandSystem | ( | const string & | section, |
const string & | default_value | ||
) | const |
const string & SGalaxy::getVariable | ( | const std::vector< string > & | section, |
const string & | name, | ||
const string & | default_value | ||
) | const |
Definition at line 294 of file galaxy_xml.cpp.
References data, g, i, and subheirarchy.
Referenced by getVarEitherSectionOrSub(), MakeStarSystem(), and processSystem().
const string & SGalaxy::getVariable | ( | const string & | section, |
const string & | name, | ||
const string & | defaultvalue | ||
) | const |
const string & SGalaxy::getVariable | ( | const string & | section, |
const string & | subsection, | ||
const string & | name, | ||
const string & | defaultvalue | ||
) | const |
Definition at line 361 of file galaxy_xml.cpp.
References blah, data, g, i, j, processGalaxy(), subheirarchy, and writeGalaxy().
|
inline |
Definition at line 48 of file galaxy_xml.h.
References data.
void SGalaxy::processGalaxy | ( | const string & | sys) |
Definition at line 201 of file galaxy_xml.cpp.
References NavigationSystem::SystemIterator::done(), NavigationSystem::SystemIterator::Position(), and processSystem().
Referenced by getVariable().
void SGalaxy::processSystem | ( | const string & | sys, |
const QVector & | suggested_coordinates | ||
) |
Definition at line 191 of file galaxy_xml.cpp.
References getStarSystemName(), getStarSystemSector(), getVariable(), and setVariable().
Referenced by processGalaxy().
bool SGalaxy::setVariable | ( | const string & | section, |
const string & | name, | ||
const string & | value | ||
) |
Definition at line 331 of file galaxy_xml.cpp.
References getHeirarchy().
Referenced by GalaxyXML::beginElement(), and processSystem().
bool SGalaxy::setVariable | ( | const string & | section, |
const string & | subsection, | ||
const string & | name, | ||
const string & | value | ||
) |
void SGalaxy::setVariable | ( | const std::vector< string > & | section, |
const string & | name, | ||
const string & | value | ||
) |
Definition at line 321 of file galaxy_xml.cpp.
References data, g, getHeirarchy(), and i.
void SGalaxy::writeGalaxy | ( | VSFileSystem::VSFile & | f) | const |
Definition at line 241 of file galaxy_xml.cpp.
References VSFileSystem::VSFile::Fprintf(), and writeSector().
Referenced by getVariable().
void SGalaxy::writeSector | ( | VSFileSystem::VSFile & | f, |
int | tabs, | ||
const string & | sectorType, | ||
SGalaxy * | planet_types | ||
) | const |
Definition at line 217 of file galaxy_xml.cpp.
References data, dotabs(), VSFileSystem::VSFile::Fprintf(), and subheirarchy.
Referenced by writeGalaxy(), and GalaxyXML::Galaxy::writeGalaxy().
|
friend |
Definition at line 20 of file galaxy_xml.h.
|
protected |
Definition at line 22 of file galaxy_xml.h.
Referenced by GalaxyXML::Galaxy::getPlanetVariable(), getVariable(), operator=(), operator[](), setVariable(), and writeSector().
|
protected |
Definition at line 21 of file galaxy_xml.h.
Referenced by GalaxyXML::Galaxy::Galaxy(), getHeirarchy(), GalaxyXML::Galaxy::getPlanetVariable(), getRandSystem(), getVariable(), operator=(), SGalaxy(), and writeSector().