Add documentation to Ephemeris classes

Remove unused "Reference" specification from mod files
Add osirisrex files to gitgnore
Make Ephemeris values into properties
This commit is contained in:
Alexander Bock
2016-09-20 19:24:14 +02:00
parent 329986c0c6
commit 428f488bb6
81 changed files with 307 additions and 827 deletions

View File

@@ -51,6 +51,22 @@ namespace std {
std::string to_string(std::string value) {
return value;
}
std::string to_string(openspace::documentation::TestResult::Offense::Reason reason) {
switch (reason) {
case openspace::documentation::TestResult::Offense::Reason::ExtraKey:
return "Extra key";
case openspace::documentation::TestResult::Offense::Reason::MissingKey:
return "Missing key";
case openspace::documentation::TestResult::Offense::Reason::UnknownIdentifier:
return "Unknown identifier";
case openspace::documentation::TestResult::Offense::Reason::Verification:
return "Verification failed";
case openspace::documentation::TestResult::Offense::Reason::WrongType:
return "Wrong type";
}
}
} // namespace std
namespace openspace {

View File

@@ -51,7 +51,8 @@ Documentation Ephemeris::Documentation() {
"on application startup into the FactoryDocumentation.",
Optional::No
}
}
},
Exhaustive::No
};
}
@@ -74,10 +75,6 @@ Ephemeris* Ephemeris::createFromDictionary(const ghoul::Dictionary& dictionary)
return result;
}
Ephemeris::Ephemeris() {}
Ephemeris::Ephemeris(const ghoul::Dictionary& dictionary) {}
Ephemeris::~Ephemeris() {}
bool Ephemeris::initialize() {

View File

@@ -51,7 +51,8 @@ Documentation Scale::Documentation() {
"application startup into the FactoryDocumentation.",
Optional::No
}
}
},
Exhaustive::No
};
}
@@ -71,10 +72,6 @@ Scale* Scale::createFromDictionary(const ghoul::Dictionary& dictionary) {
return result;
}
Scale::Scale() {}
Scale::Scale(const ghoul::Dictionary& dictionary) {}
Scale::~Scale() {}
bool Scale::initialize() {

View File

@@ -345,8 +345,17 @@ bool SceneGraph::loadFromFile(const std::string& sceneDescription) {
};
for (const ModuleInformation& i : moduleDictionaries) {
LINFO("Adding module: " << i.moduleName);
addModule(i);
try {
LINFO("Adding module: " << i.moduleName);
addModule(i);
}
catch (const documentation::SpecificationError& specError) {
LERROR("Error loading module: " << i.moduleName);
LERRORC(specError.component, specError.message);
for (const auto& offense : specError.result.offenses) {
LERRORC(offense.offender, std::to_string(offense.reason));
}
}
}
}
// ghoul::lua::destroyLuaState(state);