Make Engine a Property Owner

This commit is contained in:
Ylva Selling
2022-05-12 10:10:14 -04:00
parent b2110dfada
commit 9d583dafe9
2 changed files with 7 additions and 3 deletions

View File

@@ -25,6 +25,7 @@
#ifndef __OPENSPACE_CORE___OPENSPACEENGINE___H__
#define __OPENSPACE_CORE___OPENSPACEENGINE___H__
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/stringproperty.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/scene/profile.h>
@@ -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

View File

@@ -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>("Renderable");
@@ -146,6 +147,8 @@ OpenSpaceEngine::OpenSpaceEngine()
SpiceManager::initialize();
TransformationManager::initialize();
addProperty(_printEvents);
}
OpenSpaceEngine::~OpenSpaceEngine() {} // NOLINT