mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-07 03:49:43 -05:00
Update Ghoul repository to have the factory return unique_ptrs
Adjust accordingly
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
||||
Overlay = 8
|
||||
};
|
||||
|
||||
static Renderable* createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
static std::unique_ptr<Renderable> createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
|
||||
// constructors & destructor
|
||||
Renderable();
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <ghoul/opengl/texture.h>
|
||||
#include <ghoul/opengl/textureunit.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
namespace documentation { struct Documentation; }
|
||||
@@ -49,7 +51,7 @@ namespace documentation { struct Documentation; }
|
||||
*/
|
||||
class ScreenSpaceRenderable : public properties::PropertyOwner {
|
||||
public:
|
||||
static ScreenSpaceRenderable* createFromDictionary(
|
||||
static std::unique_ptr<ScreenSpaceRenderable> createFromDictionary(
|
||||
const ghoul::Dictionary& dictionary);
|
||||
|
||||
ScreenSpaceRenderable(const ghoul::Dictionary& dictionary);
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ghoul { class Dictionary; }
|
||||
|
||||
namespace openspace {
|
||||
@@ -37,7 +39,7 @@ namespace documentation { struct Documentation; }
|
||||
|
||||
class Rotation : public properties::PropertyOwner {
|
||||
public:
|
||||
static Rotation* createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
static std::unique_ptr<Rotation> createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
|
||||
Rotation(const ghoul::Dictionary& dictionary);
|
||||
virtual ~Rotation();
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace documentation { struct Documentation; };
|
||||
|
||||
class Scale : public properties::PropertyOwner {
|
||||
public:
|
||||
static Scale* createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
static std::unique_ptr<Scale> createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
|
||||
virtual ~Scale();
|
||||
virtual bool initialize();
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
const PerformanceRecord& performanceRecord() const { return _performanceRecord; }
|
||||
|
||||
void setRenderable(Renderable* renderable);
|
||||
void setRenderable(std::unique_ptr<Renderable> renderable);
|
||||
const Renderable* renderable() const;
|
||||
Renderable* renderable();
|
||||
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
|
||||
PerformanceRecord _performanceRecord;
|
||||
|
||||
Renderable* _renderable;
|
||||
std::unique_ptr<Renderable> _renderable;
|
||||
bool _renderableVisible;
|
||||
|
||||
bool _boundingSphereVisible;
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <openspace/util/updatestructures.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ghoul { class Dictionary; }
|
||||
|
||||
namespace openspace {
|
||||
@@ -37,7 +39,7 @@ namespace documentation { struct Documentation; }
|
||||
|
||||
class Translation : public properties::PropertyOwner {
|
||||
public:
|
||||
static Translation* createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
static std::unique_ptr<Translation> createFromDictionary(const ghoul::Dictionary& dictionary);
|
||||
|
||||
virtual ~Translation();
|
||||
virtual bool initialize();
|
||||
|
||||
Reference in New Issue
Block a user