mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-23 20:49:00 -06:00
Merge branch 'feature/iSWA' of github.com:OpenSpace/OpenSpace-Development into feature/iSWA
This commit is contained in:
@@ -440,28 +440,27 @@ void IswaManager::fillCygnetInfo(std::string jsonString){
|
||||
if(jsonString != ""){
|
||||
json j = json::parse(jsonString);
|
||||
|
||||
fillFromJSONArray(j["listOfPriorityCygnets"]);
|
||||
fillFromJSONArray(j["listOfOKCygnets"]);
|
||||
// fillFromJSONArray(j["listOfStaleCygnets"]);
|
||||
// fillFromJSONArray(j["listOfInactiveCygnets"]);
|
||||
|
||||
}
|
||||
}
|
||||
std::set<std::string> lists = {"listOfPriorityCygnets", "listOfOKCygnets"
|
||||
// ,"listOfStaleCygnets", "listOfInactiveCygnets",
|
||||
};
|
||||
|
||||
void IswaManager::fillFromJSONArray(json jsonList){
|
||||
for(int i=0; i<jsonList.size(); i++){
|
||||
json jCygnet = jsonList.at(i);
|
||||
for(auto list : lists){
|
||||
json jsonList = j[list];
|
||||
for(int i=0; i<jsonList.size(); i++){
|
||||
json jCygnet = jsonList.at(i);
|
||||
|
||||
std::string name = jCygnet["cygnetDisplayTitle"];
|
||||
std::replace(name.begin(), name.end(),'.', ',');
|
||||
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);
|
||||
CygnetInfo info = {
|
||||
name,
|
||||
jCygnet["cygnetDescription"],
|
||||
jCygnet["cygnetUpdateInterval"],
|
||||
false
|
||||
};
|
||||
_cygnetInformation[jCygnet["cygnetID"]] = std::make_shared<CygnetInfo>(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@ 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