Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
90e0364c
Commit
90e0364c
authored
7 years ago
by
Alexander Bock
Browse files
Options
Download
Email Patches
Plain Diff
Revert to using ghoul::any due to lack of support on macOS
parent
096e751d
master
content/2012EventProfile
elumenati/spout-implementation
elumenati/spoutImplementation
feature/2012Fieldlines
feature/DSGWrapper
feature/WSA
feature/apollo-missions
feature/arrow-renderable
feature/asset-helper
feature/asset-meta-update-part2
feature/asset-require
feature/atmosphere-stars-rendering
feature/bufferTransferTestings
feature/camera-control-during-path
feature/camera-path-stability
feature/cef-update
feature/change-renderbin-runtime
feature/cmake
feature/codegen-lua
feature/codegen-lua-jenkins
feature/compile-times
feature/direction-hint-renderable
feature/downscaledATM
feature/du-meshes-selection
feature/fieldlines
feature/gamma-correction
feature/geojson
feature/geojson-renderable
feature/getting-started-tour
feature/grid-labels
feature/grids-update
feature/gui-mouseinteraction-fix
feature/horizons-framework
feature/horizons-unit-tests
feature/idle-behavior-updates
feature/imageTestKeys2Actions
feature/jenkins-codegen
feature/jenkins-fix
feature/jenkins-timeout
feature/juice
feature/jwst-pointing
feature/jwst-trail-update
feature/jwst-update
feature/labels-rendering
feature/location-measure
feature/macos
feature/mars-moons
feature/mas-model
feature/missions
feature/model-opacity
feature/molecule_rendering
feature/mollwide-projection
feature/multiple-endpoints
feature/multiresvolume
feature/orientation-check
feature/paper-atmosphere
feature/properties-visibility
feature/renderable-enabled-event
feature/rover-visualization
feature/roverterrain-mergefix
feature/satellites
feature/saturn-shepherd-moons
feature/science-on-the-sphere
feature/sgct-framebuffer-fixes
feature/sgct-gui
feature/sgct-gui-editable
feature/sgct-gui-jenkins
feature/sgct-json
feature/sgct-ui
feature/side-by-side-removal
feature/skybrowser
feature/skybrowser-cleanup
feature/skybrowser-drag-and-drop
feature/skybrowser-reload
feature/solarbrowsing
feature/spacecraft-instruments
feature/spaceweather-stream
feature/spice-update
feature/state-with-time
feature/tileprovider-minlevel
feature/tileproviders
feature/tle-bodymass
feature/touchEventListener
feature/transparency-rendering-last
feature/ubuntu2204
feature/unit-tests
feature/updateTSP
feature/userproperties
feature/various-changes
feature/video-on-globe
feature/visual-testing
feature/visual-testing-try2
feature/volume-fixes
feature/warnings
feature/wormhole
feature/xbox-update
hotfix/scaling
integration/atm-paper-fixes-2
integration/moon-mars-show
integration/paper-atmosphere
issue/1043
issue/1161
issue/1279
issue/1366-2
issue/1479
issue/1559
issue/1607
issue/1666
issue/1707
issue/1751
issue/1814
issue/1827
issue/1842
issue/1845
issue/1851
issue/1905
issue/1908
issue/1910
issue/1911
issue/1964
issue/1989
issue/1995
issue/2029
issue/2055
issue/2093
issue/2111
issue/2118
issue/2121
issue/2127
issue/2133
issue/2137
issue/2194
issue/2207
issue/2209
issue/2212
issue/2236
issue/2259
issue/2261
issue/2266
issue/2269
issue/843
issue/888
issue/hdrModels
jenkins/1
jenkins/2
jenkins/2286
jenkins/utah-test-1
project/2021-wisdome-installation
project/climate
project/exoplanet-explorer
project/exoplanets-expert-tool
project/lights-2020-installation
project/spaceship-installation
project/spvl
rc/0.18.1
temp/skybrowser-animation-fixes-merge
thesis/2017/mars-rover-visualization
thesis/2018/data-loader
thesis/2018/dsn
thesis/2018/flightcontroller
thesis/2018/mas-model
thesis/2019/spaceDebris
thesis/2019/spaceweather-stream
thesis/2020/software-integration
thesis/2020/sonification
thesis/2021/airtraffic
thesis/2021/fieldlines
thesis/2021/multiuser-collab
thesis/2021/multiuser-collab3
thesis/2021/skybrowser
thesis/2022/climate
thesis/2022/cosmic-view
thesis/2022/fieldline-rendering
thesis/2022/remote-streaming
thesis/2022/software-integration
thesis/2022/software-integration_dod
thesis/2022/software-integration_receive-ra-dec
thesis/2022/software-integration_refactor-simp
thesis/2022/software-integration_velocity-support
thesis/2022/streaming
vislabs/release/2.1
research/dynamic-scene-graph
research/atmospheres
releases/v0.18.0
releases/v0.17.2
releases/v0.17.1
releases/v0.17.0
releases/v0.16.1
releases/v0.16.0
releases/v0.15.2
releases/v0.15.1
releases/v0.15.0
releases/v0.14.1
releases/v0.14.0
releases/v0.13.0
releases/v0.12.0
releases/v0.11.1
releases/v0.11.0
releases/v0.10.0
releases/v0.9.0
releases/prerelease/astronomylive-2017
releases/prerelease/astc-2017
releases/beta/beta-9
releases/beta/beta-8
releases/beta/beta-7
releases/beta/beta-5
releases/beta/beta-4_2
releases/beta/beta-4
releases/beta/beta-3
releases/beta/beta-2
releases/beta/beta-1_2
releases/beta/beta-1
dev/fc-port-change
beta/beta-4_2
beta/beta-4
beta/beta-3
beta/beta-2
beta/beta-1_2
beta/beta-1
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
include/openspace/properties/numericalproperty.inl
+1
-1
include/openspace/properties/numericalproperty.inl
include/openspace/properties/property.h
+4
-4
include/openspace/properties/property.h
include/openspace/properties/templateproperty.h
+6
-6
include/openspace/properties/templateproperty.h
include/openspace/properties/templateproperty.inl
+6
-6
include/openspace/properties/templateproperty.inl
include/openspace/properties/triggerproperty.h
+1
-1
include/openspace/properties/triggerproperty.h
modules/newhorizons/rendering/renderableplanetprojection.cpp
+4
-4
modules/newhorizons/rendering/renderableplanetprojection.cpp
src/properties/property.cpp
+3
-3
src/properties/property.cpp
src/properties/triggerproperty.cpp
+1
-1
src/properties/triggerproperty.cpp
with
26 additions
and
26 deletions
+26
-26
include/openspace/properties/numericalproperty.inl
+
1
-
1
View file @
90e0364c
...
@@ -327,7 +327,7 @@ bool NumericalProperty<T>::setStringValue(std::string value) {
...
@@ -327,7 +327,7 @@ bool NumericalProperty<T>::setStringValue(std::string value) {
value, success
value, success
);
);
if (success)
if (success)
TemplateProperty<T>::set(
std
::any(std::move(thisValue)));
TemplateProperty<T>::set(
ghoul
::any(std::move(thisValue)));
return success;
return success;
}
}
...
...
This diff is collapsed.
Click to expand it.
include/openspace/properties/property.h
+
4
-
4
View file @
90e0364c
...
@@ -114,11 +114,11 @@ public:
...
@@ -114,11 +114,11 @@ public:
/**
/**
* This method returns the encapsulated value of the Property to the caller. The type
* 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
* 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
std
::any object.
* the derived class. The default implementation returns an empty
ghoul
::any object.
* \return The value that is encapsulated by this Property, or an empty
std
::any
* \return The value that is encapsulated by this Property, or an empty
ghoul
::any
* object if the method was not overritten.
* object if the method was not overritten.
*/
*/
virtual
std
::
any
get
()
const
;
virtual
ghoul
::
any
get
()
const
;
/**
/**
* Sets the value encapsulated by this Property to the <code>value</code> passed to
* Sets the value encapsulated by this Property to the <code>value</code> passed to
...
@@ -128,7 +128,7 @@ public:
...
@@ -128,7 +128,7 @@ public:
* implementation of this method ignores the input.
* implementation of this method ignores the input.
* \param value The new value that should be stored in this Property
* \param value The new value that should be stored in this Property
*/
*/
virtual
void
set
(
std
::
any
value
);
virtual
void
set
(
ghoul
::
any
value
);
/**
/**
* This method returns the type that is requested by this Property for the set method.
* This method returns the type that is requested by this Property for the set method.
...
...
This diff is collapsed.
Click to expand it.
include/openspace/properties/templateproperty.h
+
6
-
6
View file @
90e0364c
...
@@ -84,21 +84,21 @@ public:
...
@@ -84,21 +84,21 @@ public:
virtual
std
::
string
className
()
const
override
;
virtual
std
::
string
className
()
const
override
;
/**
/**
* Returns the stored value packed into a
std
::any object.
* Returns the stored value packed into a
ghoul
::any object.
* \return The stored value packed into a
std
::any object
* \return The stored value packed into a
ghoul
::any object
*/
*/
virtual
std
::
any
get
()
const
override
;
virtual
ghoul
::
any
get
()
const
override
;
/**
/**
* Sets the value from the provided
std
::any object. If the types between
* Sets the value from the provided
ghoul
::any object. If the types between
* <code>T</code> and <code>value</code> disagree, an error is logged and the stored
* <code>T</code> and <code>value</code> disagree, an error is logged and the stored
* value remains unchanged.
* value remains unchanged.
*/
*/
virtual
void
set
(
std
::
any
value
)
override
;
virtual
void
set
(
ghoul
::
any
value
)
override
;
/**
/**
* Returns the <code>std::type_info</code> describing the template parameter
* Returns the <code>std::type_info</code> describing the template parameter
* <code>T</code>. It can be used to test against a
std
::any value before trying to
* <code>T</code>. It can be used to test against a
ghoul
::any value before trying to
* assign it.
* assign it.
* \return The type info object describing the template parameter <code>T</code>
* \return The type info object describing the template parameter <code>T</code>
*/
*/
...
...
This diff is collapsed.
Click to expand it.
include/openspace/properties/templateproperty.inl
+
6
-
6
View file @
90e0364c
...
@@ -213,14 +213,14 @@ std::ostream& operator<<(std::ostream& os, const TemplateProperty<T>& obj) {
...
@@ -213,14 +213,14 @@ std::ostream& operator<<(std::ostream& os, const TemplateProperty<T>& obj) {
}
}
template <typename T>
template <typename T>
std
::any TemplateProperty<T>::get() const {
ghoul
::any TemplateProperty<T>::get() const {
return
std
::any(_value);
return
ghoul
::any(_value);
}
}
template <typename T>
template <typename T>
void TemplateProperty<T>::set(
std
::any value) {
void TemplateProperty<T>::set(
ghoul
::any value) {
try {
try {
T v =
std
::any_cast<T>(std::move(value));
T v =
ghoul
::any_cast<T>(std::move(value));
if (v != _value) {
if (v != _value) {
_value = std::move(v);
_value = std::move(v);
notifyListener();
notifyListener();
...
@@ -254,7 +254,7 @@ bool TemplateProperty<T>::setLuaValue(lua_State* state) {
...
@@ -254,7 +254,7 @@ bool TemplateProperty<T>::setLuaValue(lua_State* state) {
success
success
);
);
if (success) {
if (success) {
set(
std
::any(thisValue));
set(
ghoul
::any(thisValue));
}
}
return success;
return success;
}
}
...
@@ -281,7 +281,7 @@ bool TemplateProperty<T>::setStringValue(std::string value) {
...
@@ -281,7 +281,7 @@ bool TemplateProperty<T>::setStringValue(std::string value) {
success
success
);
);
if (success) {
if (success) {
set(
std
::any(thisValue));
set(
ghoul
::any(thisValue));
}
}
return success;
return success;
}
}
...
...
This diff is collapsed.
Click to expand it.
include/openspace/properties/triggerproperty.h
+
1
-
1
View file @
90e0364c
...
@@ -63,7 +63,7 @@ public:
...
@@ -63,7 +63,7 @@ public:
* listeners regardless of the value
* listeners regardless of the value
* \param value The ignored value
* \param value The ignored value
*/
*/
void
set
(
std
::
any
value
);
void
set
(
ghoul
::
any
value
);
};
};
}
// namespace openspace::properties
}
// namespace openspace::properties
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/rendering/renderableplanetprojection.cpp
+
4
-
4
View file @
90e0364c
...
@@ -279,16 +279,16 @@ void RenderablePlanetProjection::imageProjectGPU(
...
@@ -279,16 +279,16 @@ void RenderablePlanetProjection::imageProjectGPU(
_fboProgramObject
->
setUniform
(
"boresight"
,
_boresight
);
_fboProgramObject
->
setUniform
(
"boresight"
,
_boresight
);
if
(
_geometry
->
hasProperty
(
"radius"
)){
if
(
_geometry
->
hasProperty
(
"radius"
)){
std
::
any
r
=
_geometry
->
property
(
"radius"
)
->
get
();
ghoul
::
any
r
=
_geometry
->
property
(
"radius"
)
->
get
();
if
(
glm
::
vec3
*
radius
=
std
::
any_cast
<
glm
::
vec3
>
(
&
r
)){
if
(
glm
::
vec3
*
radius
=
ghoul
::
any_cast
<
glm
::
vec3
>
(
&
r
)){
_fboProgramObject
->
setUniform
(
"_radius"
,
radius
);
_fboProgramObject
->
setUniform
(
"_radius"
,
radius
);
}
}
}
else
{
}
else
{
LERROR
(
"Geometry object needs to provide radius"
);
LERROR
(
"Geometry object needs to provide radius"
);
}
}
if
(
_geometry
->
hasProperty
(
"segments"
)){
if
(
_geometry
->
hasProperty
(
"segments"
)){
std
::
any
s
=
_geometry
->
property
(
"segments"
)
->
get
();
ghoul
::
any
s
=
_geometry
->
property
(
"segments"
)
->
get
();
if
(
int
*
segments
=
std
::
any_cast
<
int
>
(
&
s
)){
if
(
int
*
segments
=
ghoul
::
any_cast
<
int
>
(
&
s
)){
_fboProgramObject
->
setUniform
(
"_segments"
,
segments
[
0
]);
_fboProgramObject
->
setUniform
(
"_segments"
,
segments
[
0
]);
}
}
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/properties/property.cpp
+
3
-
3
View file @
90e0364c
...
@@ -81,15 +81,15 @@ std::string Property::fullyQualifiedIdentifier() const {
...
@@ -81,15 +81,15 @@ std::string Property::fullyQualifiedIdentifier() const {
return
identifier
;
return
identifier
;
}
}
std
::
any
Property
::
get
()
const
{
ghoul
::
any
Property
::
get
()
const
{
return
std
::
any
();
return
ghoul
::
any
();
}
}
bool
Property
::
getLuaValue
(
lua_State
*
)
const
{
bool
Property
::
getLuaValue
(
lua_State
*
)
const
{
return
false
;
return
false
;
}
}
void
Property
::
set
(
std
::
any
)
{}
void
Property
::
set
(
ghoul
::
any
)
{}
bool
Property
::
setLuaValue
(
lua_State
*
)
{
bool
Property
::
setLuaValue
(
lua_State
*
)
{
return
false
;
return
false
;
...
...
This diff is collapsed.
Click to expand it.
src/properties/triggerproperty.cpp
+
1
-
1
View file @
90e0364c
...
@@ -40,7 +40,7 @@ bool TriggerProperty::setLuaValue(lua_State*) {
...
@@ -40,7 +40,7 @@ bool TriggerProperty::setLuaValue(lua_State*) {
return
true
;
return
true
;
}
}
void
TriggerProperty
::
set
(
std
::
any
)
{
void
TriggerProperty
::
set
(
ghoul
::
any
)
{
notifyListener
();
notifyListener
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help