Update Ghoul repository to have the factory return unique_ptrs

Adjust accordingly
This commit is contained in:
Alexander Bock
2017-03-01 22:03:48 -05:00
parent 2b07cf8c05
commit 2f2fa3b031
26 changed files with 69 additions and 52 deletions
+1 -1
View File
@@ -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);
+3 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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;
+3 -1
View File
@@ -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();