mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-12 00:08:38 -05:00
More Cygnets
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include <ghoul/filesystem/filesystem>
|
||||
#include <modules/kameleon/include/kameleonwrapper.h>
|
||||
#include <openspace/util/time.h>
|
||||
#include <modules/iswa/ext/json/json.hpp>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <openspace/scripting/script_helper.h>
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
@@ -438,21 +437,28 @@ void IswaManager::fillCygnetInfo(std::string jsonString){
|
||||
if(jsonString != ""){
|
||||
json j = json::parse(jsonString);
|
||||
|
||||
json jCygnets = j["listOfPriorityCygnets"];
|
||||
for(int i=0; i<jCygnets.size(); i++){
|
||||
json jCygnet = jCygnets.at(i);
|
||||
fillFromJSONArray(j["listOfPriorityCygnets"]);
|
||||
fillFromJSONArray(j["listOfOKCygnets"]);
|
||||
// fillFromJSONArray(j["listOfStaleCygnets"]);
|
||||
// fillFromJSONArray(j["listOfInactiveCygnets"]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
std::string name = jCygnet["cygnetDisplayTitle"];
|
||||
std::replace(name.begin(), name.end(),'.', ',');
|
||||
void IswaManager::fillFromJSONArray(json jsonList){
|
||||
for(int i=0; i<jsonList.size(); i++){
|
||||
json jCygnet = jsonList.at(i);
|
||||
|
||||
CygnetInfo info = {
|
||||
name,
|
||||
jCygnet["cygnetDescription"],
|
||||
jCygnet["cygnetUpdateInterval"],
|
||||
false
|
||||
};
|
||||
_cygnetInformation[jCygnet["cygnetID"]] = std::make_shared<CygnetInfo>(info);
|
||||
}
|
||||
std::string name = jCygnet["cygnetDisplayTitle"];
|
||||
std::replace(name.begin(), name.end(),'.', ',');
|
||||
|
||||
CygnetInfo info = {
|
||||
name,
|
||||
jCygnet["cygnetDescription"],
|
||||
jCygnet["cygnetUpdateInterval"],
|
||||
false
|
||||
};
|
||||
_cygnetInformation[jCygnet["cygnetID"]] = std::make_shared<CygnetInfo>(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <openspace/util/spicemanager.h>
|
||||
#include <openspace/properties/selectionproperty.h>
|
||||
#include <modules/iswa/ext/json/json.hpp>
|
||||
|
||||
// #include <modules/iswa/rendering/iswacygnet.h>
|
||||
// #include <modules/iswa/rendering/iswagroup.h>
|
||||
@@ -103,6 +104,7 @@ private:
|
||||
void createSphere(std::shared_ptr<MetadataFuture> data);
|
||||
|
||||
void fillCygnetInfo(std::string jsonString);
|
||||
void fillFromJSONArray(nlohmann::json jsonList);
|
||||
|
||||
std::map<std::string, std::string> _month;
|
||||
std::map<int, std::string> _type;
|
||||
|
||||
Reference in New Issue
Block a user