mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 04:49:12 -06:00
Adapt to removal of Singleton
This commit is contained in:
@@ -25,8 +25,6 @@
|
||||
#ifndef __OPENSPACE_CORE___SPICEMANAGER___H__
|
||||
#define __OPENSPACE_CORE___SPICEMANAGER___H__
|
||||
|
||||
#include <ghoul/designpattern/singleton.h>
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/misc/boolean.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
@@ -40,9 +38,7 @@ namespace openspace {
|
||||
|
||||
namespace scripting { struct LuaLibrary; }
|
||||
|
||||
class SpiceManager : public ghoul::Singleton<SpiceManager> {
|
||||
friend class ghoul::Singleton<SpiceManager>;
|
||||
|
||||
class SpiceManager {
|
||||
public:
|
||||
BooleanType(UseException);
|
||||
|
||||
@@ -150,6 +146,11 @@ public:
|
||||
*/
|
||||
static TerminatorType terminatorTypeFromString(const std::string& type);
|
||||
|
||||
static void initialize();
|
||||
static void deinitialize();
|
||||
static bool isInitialized();
|
||||
static SpiceManager& ref();
|
||||
|
||||
/**
|
||||
* Loads one or more SPICE kernels into a program. The provided path can either be a
|
||||
* binary, text-kernel, or meta-kernel which gets loaded into the kernel pool. The
|
||||
@@ -1055,6 +1056,8 @@ private:
|
||||
|
||||
/// The last assigned kernel-id, used to determine the next free kernel id
|
||||
KernelHandle _lastAssignedKernel = KernelHandle(0);
|
||||
|
||||
static SpiceManager* _instance;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef __OPENSPACE_CORE___TRANSFORMATIONMANAGER___H__
|
||||
#define __OPENSPACE_CORE___TRANSFORMATIONMANAGER___H__
|
||||
|
||||
#include <ghoul/designpattern/singleton.h>
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
@@ -36,13 +34,17 @@ namespace ccmc { class Kameleon; }
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class TransformationManager : public ghoul::Singleton<TransformationManager> {
|
||||
friend class ghoul::Singleton<TransformationManager>;
|
||||
|
||||
class TransformationManager {
|
||||
public:
|
||||
TransformationManager();
|
||||
~TransformationManager();
|
||||
|
||||
static void initialize();
|
||||
static void deinitialize();
|
||||
static bool isInitialized();
|
||||
static TransformationManager& ref();
|
||||
|
||||
|
||||
glm::dmat3 frameTransformationMatrix(const std::string& from, const std::string& to,
|
||||
double ephemerisTime) const;
|
||||
|
||||
@@ -55,6 +57,8 @@ private:
|
||||
//#endif
|
||||
std::set<std::string> _kameleonFrames;
|
||||
std::set<std::string> _dipoleFrames;
|
||||
|
||||
static TransformationManager* _instance;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user