mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 23:09:32 -05:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user