![]() |
SG++-Doxygen-Documentation
|
#include <JSON.hpp>
Public Member Functions | |
void | clear () |
virtual JSON * | clone () |
void | deserialize (std::string content) |
void | deserializeFromString (const std::string &content) |
JSON () | |
JSON (const JSON &original) | |
JSON (const std::string &fileName) | |
DictNode & | operator= (const DictNode &right) |
JSON & | operator= (const JSON &original) |
Node & | operator= (const Node &right) override |
void | serialize (const std::string &outFileName) |
void | serialize (std::ostream &outFile, size_t indentWidth) override |
![]() | |
void | addAttribute (const std::string &name, std::unique_ptr< Node > node) override |
Node & | addDictAttr (const std::string &name) override |
Node & | addIDAttr (const std::string &name, const bool &value) override |
Node & | addIDAttr (const std::string &name, const char *value) override |
Node & | addIDAttr (const std::string &name, const double &value) override |
Node & | addIDAttr (const std::string &name, const int64_t &value) override |
Node & | addIDAttr (const std::string &name, const std::string &value) override |
Node & | addIDAttr (const std::string &name, const uint64_t &value) override |
Node & | addListAttr (const std::string &name) override |
Node & | addTextAttr (const std::string &name, const std::string &value) override |
bool | contains (const std::string &key) override |
DictNode () | |
DictNode (const DictNode &original) | |
std::unique_ptr< Node > | erase (Node &node) override |
std::vector< std::string > & | keys () override |
DictNode & | operator= (const DictNode &right) |
Node & | operator[] (const std::string &key) override |
void | parse (std::vector< Token > &stream) override |
void | parseAttributes (std::vector< Token > &stream) |
std::unique_ptr< Node > | removeAttribute (const std::string name) override |
Node & | replaceDictAttr (const std::string &name) override |
Node & | replaceIDAttr (const std::string &name, const bool &value) override |
Node & | replaceIDAttr (const std::string &name, const char *value) override |
Node & | replaceIDAttr (const std::string &name, const double &value) override |
Node & | replaceIDAttr (const std::string &name, const int64_t &value) override |
Node & | replaceIDAttr (const std::string &name, const std::string &value) override |
Node & | replaceIDAttr (const std::string &name, const uint64_t &value) override |
Node & | replaceListAttr (const std::string &name) override |
Node & | replaceTextAttr (const std::string &name, const std::string &value) override |
size_t | size () override |
![]() | |
virtual Node & | addDictValue () |
virtual Node & | addIdValue (const bool &value) |
virtual Node & | addIdValue (const char *value) |
virtual Node & | addIdValue (const double &value) |
virtual Node & | addIdValue (const int64_t &value) |
virtual Node & | addIdValue (const std::string &value) |
virtual Node & | addIdValue (const uint64_t &value) |
virtual Node & | addListValue () |
virtual Node & | addTextValue (const std::string &value) |
virtual void | addValue (std::unique_ptr< Node > node) |
virtual std::unique_ptr< Node > | erase () |
virtual std::string & | get () |
virtual bool | getBool () |
virtual double | getDouble () |
virtual int64_t | getInt () |
virtual uint64_t | getUInt () |
Node () | |
Node (const Node &right)=default | |
virtual Node & | operator[] (const size_t index) |
virtual std::unique_ptr< Node > | removeValue (size_t index) |
virtual void | set (const std::string &value) |
virtual void | setBool (bool boolValue) |
virtual void | setDouble (double doubleValue) |
virtual void | setInt (int64_t intValue) |
virtual void | setUInt (uint64_t uintValue) |
virtual | ~Node ()=default |
Additional Inherited Members | |
![]() | |
size_t | orderedKeyIndex |
Node * | parent |
![]() | |
std::map< std::string, std::unique_ptr< Node > > | attributes |
std::vector< std::string > | keyOrder |
![]() | |
static const int | SERIALIZE_INDENT = 3 |
|
explicit |
References json::DictNode::parse().
json::JSON::JSON | ( | ) |
Referenced by clone().
json::JSON::JSON | ( | const JSON & | original | ) |
void json::JSON::clear | ( | ) |
References json::DictNode::attributes, json::DictNode::keyOrder, json::Node::orderedKeyIndex, and json::Node::parent.
Referenced by deserialize(), and deserializeFromString().
|
virtual |
Reimplemented from json::DictNode.
Reimplemented in sgpp::base::OperationConfiguration, sgpp::base::OCLOperationConfiguration, sgpp::datadriven::LearnerSGDEConfiguration, and sgpp::datadriven::SparseGridDensityEstimatorConfiguration.
References JSON().
void json::JSON::deserialize | ( | std::string | content | ) |
References clear(), and json::DictNode::parse().
Referenced by python.learner.formatter.GridFormatter.GridFormatter::deserializeFromFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter::deserializeFromFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter::deserializeFromFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter::deserializeFromFile(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter::deserializeFromFile(), python.utils.GzipSerializer.GzipSerializer::deserializeFromFile(), and sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< T >::MPIWorkerPackageBase().
void json::JSON::deserializeFromString | ( | const std::string & | content | ) |
References clear(), and json::DictNode::parse().
References json::DictNode::operator=().
Reimplemented from json::DictNode.
void json::JSON::serialize | ( | const std::string & | outFileName | ) |
References serialize().
Referenced by main(), sgpp::datadriven::clusteringmpi::MPIWorkerPackageBase< T >::MPIWorkerPackageBase(), serialize(), python.learner.formatter.GridFormatter.GridFormatter::serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter::serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter::serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter::serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter::serializeToFile(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter::serializeToFile(), python.utils.GzipSerializer.GzipSerializer::serializeToFile(), sgpp::datadriven::VisualizerDensityEstimation::storeCutJson(), sgpp::datadriven::VisualizerDensityEstimation::storeCutJson(), sgpp::datadriven::VisualizerDensityEstimation::storeHeatmapJson(), sgpp::datadriven::VisualizerDensityEstimation::storeHeatmapJson(), sgpp::datadriven::VisualizerClassification::storeHeatmapJsonClassification(), sgpp::datadriven::VisualizerClassification::storeHeatmapJsonClassification(), sgpp::datadriven::VisualizerClassification::storeTsneJson(), and sgpp::datadriven::VisualizerDensityEstimation::storeTsneJson().
|
overridevirtual |
Reimplemented from json::DictNode.
References json::DictNode::attributes.
Referenced by python.learner.formatter.GridFormatter.GridFormatter::serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter::serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter::serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter::serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter::serializeToFile(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter::serializeToFile(), and python.utils.GzipSerializer.GzipSerializer::serializeToFile().