Add the ability to the FactoryManager to write documentation about all registered classes

Enable this feature on default in openspace.cfg
Move all generated documentations into a documentation folder
Adapt gitignore accordingly
This commit is contained in:
Alexander Bock
2016-09-16 17:37:02 +02:00
parent 2c164a1098
commit a25a9b4a2d
11 changed files with 190 additions and 30 deletions
+18 -2
View File
@@ -152,10 +152,12 @@ OpenSpaceEngine::OpenSpaceEngine(std::string programName,
FactoryManager::initialize();
FactoryManager::ref().addFactory(
std::make_unique<ghoul::TemplateFactory<Renderable>>()
std::make_unique<ghoul::TemplateFactory<Renderable>>(),
"Renderable"
);
FactoryManager::ref().addFactory(
std::make_unique<ghoul::TemplateFactory<Ephemeris>>()
std::make_unique<ghoul::TemplateFactory<Ephemeris>>(),
"Ephemeris"
);
SpiceManager::initialize();
Time::initialize();
@@ -445,6 +447,20 @@ bool OpenSpaceEngine::initialize() {
_documentationEngine->writeDocumentation(documentationFile, documentationType);
}
const std::string FactoryDocumentationType =
ConfigurationManager::KeyFactoryDocumentation + '.' + ConfigurationManager::PartType;
const std::string FactoryDocumentationFile =
ConfigurationManager::KeyFactoryDocumentation + '.' + ConfigurationManager::PartFile;
bool hasFactoryDocumentationType = configurationManager().hasKey(FactoryDocumentationType);
bool hasFactoryDocumentationFile = configurationManager().hasKey(FactoryDocumentationFile);
if (hasFactoryDocumentationType && hasFactoryDocumentationFile) {
std::string type = configurationManager().value<std::string>(FactoryDocumentationType);
std::string file = configurationManager().value<std::string>(FactoryDocumentationFile);
FactoryManager::ref().writeDocumentation(absPath(file), type);
}
bool disableMasterRendering = false;
configurationManager().getValue(
ConfigurationManager::KeyDisableMasterRendering, disableMasterRendering);