mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-18 10:59:18 -06:00
Update ghoul to account for removed boost dependency
This commit is contained in:
Submodule ext/ghoul updated: a9b5025618...93f4d4afac
@@ -312,7 +312,7 @@ bool NumericalProperty<T>::setStringValue(std::string value) {
|
||||
bool success = false;
|
||||
T thisValue = PropertyDelegate<NumericalProperty<T>>::template fromString<T>(value, success);
|
||||
if (success)
|
||||
TemplateProperty<T>::set(boost::any(thisValue));
|
||||
TemplateProperty<T>::set(ghoul::any(thisValue));
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <openspace/properties/propertydelegate.h>
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <boost/any.hpp>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
@@ -92,11 +91,11 @@ public:
|
||||
/**
|
||||
* This method returns the encapsulated value of the Property to the caller. The type
|
||||
* that is returned is determined by the type function and is up to the developer of
|
||||
* the derived class. The default implementation returns an empty boost::any object.
|
||||
* \return The value that is encapsulated by this Property, or an empty boost::any
|
||||
* the derived class. The default implementation returns an empty ghoul::any object.
|
||||
* \return The value that is encapsulated by this Property, or an empty ghoul::any
|
||||
* object if the method was not overritten.
|
||||
*/
|
||||
virtual boost::any get() const;
|
||||
virtual ghoul::any get() const;
|
||||
|
||||
/**
|
||||
* Sets the value encapsulated by this Property to the <code>value</code> passed to
|
||||
@@ -106,7 +105,7 @@ public:
|
||||
* implementation of this method ignores the input.
|
||||
* \param value The new value that should be stored in this Property
|
||||
*/
|
||||
virtual void set(boost::any value);
|
||||
virtual void set(ghoul::any value);
|
||||
|
||||
/**
|
||||
* This method returns the type that is requested by this Property for the set method.
|
||||
|
||||
@@ -83,22 +83,22 @@ public:
|
||||
virtual std::string className() const override;
|
||||
|
||||
/**
|
||||
* Returns the stored value packed into a <code>boost::any</code> object.
|
||||
* \return The stored value packed into a <code>boost::any</code> object
|
||||
* Returns the stored value packed into a ghoul::any object.
|
||||
* \return The stored value packed into a ghoul::any object
|
||||
*/
|
||||
virtual boost::any get() const override;
|
||||
virtual ghoul::any get() const override;
|
||||
|
||||
/**
|
||||
* Sets the value fro the provided <code>boost::any</code> object. If the types
|
||||
* between <code>T</code> and <code>value</code> disagree, an error is logged and the
|
||||
* stored value remains unchanged.
|
||||
* Sets the value fro the provided ghoul::any object. If the types between
|
||||
* <code>T</code> and <code>value</code> disagree, an error is logged and the stored
|
||||
* value remains unchanged.
|
||||
*/
|
||||
virtual void set(boost::any value) override;
|
||||
virtual void set(ghoul::any value) override;
|
||||
|
||||
/**
|
||||
* Returns the <code>std::type_info</code> describing the template parameter
|
||||
* <code>T</code>. It can be used to test against a <code>boost::any</code> value
|
||||
* before trying to assign it.
|
||||
* <code>T</code>. It can be used to test against a ghoul::any value before trying to
|
||||
* assign it.
|
||||
* \return The type info object describing the template parameter <code>T</code>
|
||||
*/
|
||||
virtual const std::type_info& type() const override;
|
||||
|
||||
@@ -212,20 +212,20 @@ std::ostream& operator<<(std::ostream& os, const TemplateProperty<T>& obj) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
boost::any TemplateProperty<T>::get() const {
|
||||
return boost::any(_value);
|
||||
ghoul::any TemplateProperty<T>::get() const {
|
||||
return ghoul::any(_value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void TemplateProperty<T>::set(boost::any value) {
|
||||
void TemplateProperty<T>::set(ghoul::any value) {
|
||||
try {
|
||||
T v = boost::any_cast<T>(std::move(value));
|
||||
T v = ghoul::any_cast<T>(std::move(value));
|
||||
if (v != _value) {
|
||||
_value = std::move(v);
|
||||
notifyListener();
|
||||
}
|
||||
}
|
||||
catch (boost::bad_any_cast&) {
|
||||
catch (ghoul::bad_any_cast&) {
|
||||
LERRORC("TemplateProperty", "Illegal cast from '" << value.type().name()
|
||||
<< "' to '" << typeid(T).name() << "'");
|
||||
}
|
||||
@@ -247,7 +247,7 @@ bool TemplateProperty<T>::setLuaValue(lua_State* state) {
|
||||
bool success = false;
|
||||
T thisValue = PropertyDelegate<TemplateProperty<T>>::template fromLuaValue<T>(state, success);
|
||||
if (success)
|
||||
set(boost::any(thisValue));
|
||||
set(ghoul::any(thisValue));
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ bool TemplateProperty<T>::setStringValue(std::string value) {
|
||||
bool success = false;
|
||||
T thisValue = PropertyDelegate<TemplateProperty<T>>::template fromString<T>(value, success);
|
||||
if (success)
|
||||
set(boost::any(thisValue));
|
||||
set(ghoul::any(thisValue));
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
* listeners regardless of the value
|
||||
* \param value The ignored value
|
||||
*/
|
||||
void set(boost::any value);
|
||||
void set(ghoul::any value);
|
||||
};
|
||||
|
||||
} // namespace properties
|
||||
|
||||
@@ -369,16 +369,16 @@ void RenderablePlanetProjection::imageProjectGPU(){
|
||||
_fboProgramObject->setUniform("boresight" , _boresight);
|
||||
|
||||
if (_geometry->hasProperty("radius")){
|
||||
boost::any r = _geometry->property("radius")->get();
|
||||
if (glm::vec4* radius = boost::any_cast<glm::vec4>(&r)){
|
||||
ghoul::any r = _geometry->property("radius")->get();
|
||||
if (glm::vec4* radius = ghoul::any_cast<glm::vec4>(&r)){
|
||||
_fboProgramObject->setUniform("radius", radius);
|
||||
}
|
||||
}else{
|
||||
LERROR("Geometry object needs to provide radius");
|
||||
}
|
||||
if (_geometry->hasProperty("segments")){
|
||||
boost::any s = _geometry->property("segments")->get();
|
||||
if (int* segments = boost::any_cast<int>(&s)){
|
||||
ghoul::any s = _geometry->property("segments")->get();
|
||||
if (int* segments = ghoul::any_cast<int>(&s)){
|
||||
_fboProgramObject->setAttribute("segments", segments[0]);
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <openspace/util/time.h>
|
||||
#include <ghoul/filesystem/cachemanager.h>
|
||||
#include <modules/newhorizons/util/decoder.h>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <fstream>
|
||||
|
||||
@@ -82,15 +82,15 @@ std::string Property::fullyQualifiedIdentifier() const {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
boost::any Property::get() const {
|
||||
return boost::any();
|
||||
ghoul::any Property::get() const {
|
||||
return ghoul::any();
|
||||
}
|
||||
|
||||
bool Property::getLuaValue(lua_State* state) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Property::set(boost::any value) {}
|
||||
void Property::set(ghoul::any value) {}
|
||||
|
||||
bool Property::setLuaValue(lua_State* state) {
|
||||
return false;
|
||||
|
||||
@@ -40,7 +40,7 @@ bool TriggerProperty::setLuaValue(lua_State* state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void TriggerProperty::set(boost::any value) {
|
||||
void TriggerProperty::set(ghoul::any value) {
|
||||
notifyListener();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include <openspace/scripting/script_helper.h>
|
||||
#include <openspace/util/time.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include <ghoul/io/texture/texturereader.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
@@ -47,6 +45,7 @@
|
||||
#include <ghoul/opengl/texture.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <cctype>
|
||||
#include <chrono>
|
||||
|
||||
|
||||
@@ -165,8 +165,8 @@ PowerScaledSphere::PowerScaledSphere(properties::Vec4Property &radius, int segme
|
||||
powerscale = powerScaledRadii[3];
|
||||
}
|
||||
else {
|
||||
boost::any r = radius.get();
|
||||
glm::vec4 modRadius = boost::any_cast<glm::vec4>(r);
|
||||
ghoul::any r = radius.get();
|
||||
glm::vec4 modRadius = ghoul::any_cast<glm::vec4>(r);
|
||||
a = modRadius[0];
|
||||
b = modRadius[1];
|
||||
c = modRadius[2];
|
||||
|
||||
Reference in New Issue
Block a user