Added StarCatalogCrossReferences field.
This commit is contained in:
parent
7dbe1e33d4
commit
364ce6cc91
|
@ -98,6 +98,36 @@ CelestiaConfig* ReadCelestiaConfig(string filename)
|
|||
}
|
||||
}
|
||||
|
||||
Value* xrefsVal = configParams->getValue("StarCatalogCrossReferences");
|
||||
if (xrefsVal != NULL)
|
||||
{
|
||||
if (xrefsVal->getType() != Value::ArrayType)
|
||||
{
|
||||
DPRINTF("%s: StarCatalogCrossReferences must be an array.\n", filename.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
Array* xrefs = xrefsVal->getArray();
|
||||
// assert(xrefs != NULL);
|
||||
|
||||
for (Array::iterator iter = xrefs->begin(); iter != xrefs->end(); iter++)
|
||||
{
|
||||
Value* xrefNameVal = *iter;
|
||||
// assert(xrefNameVal != NULL);
|
||||
if (xrefNameVal->getType() == Value::StringType)
|
||||
{
|
||||
config->catalogXrefFiles.insert(config->catalogXrefFiles.end(),
|
||||
xrefNameVal->getString());
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINTF("%s: Catalog cross reference name must be a string.\n",
|
||||
filename.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Value* labelledStarsVal = configParams->getValue("LabelledStars");
|
||||
if (labelledStarsVal != NULL)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ struct CelestiaConfig
|
|||
{
|
||||
std::string starDatabaseFile;
|
||||
std::string starNamesFile;
|
||||
std::vector<std::string> catalogXrefFiles;
|
||||
std::vector<std::string> solarSystemFiles;
|
||||
std::string galaxyCatalog;
|
||||
std::vector<std::string> labelledStars;
|
||||
|
@ -31,6 +32,6 @@ struct CelestiaConfig
|
|||
};
|
||||
|
||||
|
||||
CelestiaConfig* ReadCelestiaConfig(string filename);
|
||||
CelestiaConfig* ReadCelestiaConfig(std::string filename);
|
||||
|
||||
#endif // _CONFIG_H_
|
||||
|
|
Loading…
Reference in a new issue