From 9d583dafe987ff118fa042dc56e90dab5abf892a Mon Sep 17 00:00:00 2001 From: Ylva Selling Date: Thu, 12 May 2022 10:10:14 -0400 Subject: [PATCH] Make Engine a Property Owner --- include/openspace/engine/openspaceengine.h | 3 ++- src/engine/openspaceengine.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 89bc1a28f7..3203bd1474 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -25,6 +25,7 @@ #ifndef __OPENSPACE_CORE___OPENSPACEENGINE___H__ #define __OPENSPACE_CORE___OPENSPACEENGINE___H__ +#include #include #include #include @@ -63,7 +64,7 @@ struct CommandlineArguments { std::string configurationOverride; }; -class OpenSpaceEngine { +class OpenSpaceEngine : public properties::PropertyOwner { public: // A mode that specifies which part of the system is currently in control. // The mode can be used to limit certain features, like setting time, navigation diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 5b792ba85a..23385d4db6 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -118,7 +118,7 @@ namespace { } } - openspace::properties::Property::PropertyInfo PrintEventsInfo = { + constexpr openspace::properties::Property::PropertyInfo PrintEventsInfo = { "PrintEvents", "Print Events", "If this is enabled, all events that are propagated through the system are " @@ -131,7 +131,8 @@ namespace openspace { class Scene; OpenSpaceEngine::OpenSpaceEngine() - : _printEvents(PrintEventsInfo, false) + : properties::PropertyOwner({ "OpenSpaceEngine" }) + , _printEvents(PrintEventsInfo, false) { FactoryManager::initialize(); FactoryManager::ref().addFactory("Renderable"); @@ -146,6 +147,8 @@ OpenSpaceEngine::OpenSpaceEngine() SpiceManager::initialize(); TransformationManager::initialize(); + + addProperty(_printEvents); } OpenSpaceEngine::~OpenSpaceEngine() {} // NOLINT