SG++-Doxygen-Documentation
json::DictNode Class Reference

#include <DictNode.hpp>

Inheritance diagram for json::DictNode:
json::Node json::JSON sgpp::base::OperationConfiguration sgpp::combigrid::OrthogonalPolynomialBasis1DConfiguration sgpp::datadriven::LearnerScenario sgpp::datadriven::LearnerSGDEConfiguration sgpp::datadriven::SparseGridDensityEstimatorConfiguration sgpp::base::OCLOperationConfiguration

Public Member Functions

void addAttribute (const std::string &name, std::unique_ptr< Node > node) override
 
NodeaddDictAttr (const std::string &name) override
 
NodeaddIDAttr (const std::string &name, const std::string &value) override
 
NodeaddIDAttr (const std::string &name, const char *value) override
 
NodeaddIDAttr (const std::string &name, const double &value) override
 
NodeaddIDAttr (const std::string &name, const uint64_t &value) override
 
NodeaddIDAttr (const std::string &name, const int64_t &value) override
 
NodeaddIDAttr (const std::string &name, const bool &value) override
 
NodeaddListAttr (const std::string &name) override
 
NodeaddTextAttr (const std::string &name, const std::string &value) override
 
Nodeclone () override
 
bool contains (const std::string &key) override
 
 DictNode ()
 
 DictNode (const DictNode &original)
 
std::unique_ptr< Nodeerase (Node &node) override
 
std::vector< std::string > & keys () override
 
DictNodeoperator= (const DictNode &right)
 
Nodeoperator= (const Node &right) override
 
Nodeoperator[] (const std::string &key) override
 
void parse (std::vector< Token > &stream) override
 
void parseAttributes (std::vector< Token > &stream)
 
std::unique_ptr< NoderemoveAttribute (const std::string name) override
 
NodereplaceDictAttr (const std::string &name) override
 
NodereplaceIDAttr (const std::string &name, const std::string &value) override
 
NodereplaceIDAttr (const std::string &name, const char *value) override
 
NodereplaceIDAttr (const std::string &name, const double &value) override
 
NodereplaceIDAttr (const std::string &name, const uint64_t &value) override
 
NodereplaceIDAttr (const std::string &name, const int64_t &value) override
 
NodereplaceIDAttr (const std::string &name, const bool &value) override
 
NodereplaceListAttr (const std::string &name) override
 
NodereplaceTextAttr (const std::string &name, const std::string &value) override
 
void serialize (std::ostream &outFile, size_t indentWidth) override
 
size_t size () override
 
- Public Member Functions inherited from json::Node
virtual NodeaddDictValue ()
 
virtual NodeaddIdValue (const std::string &value)
 
virtual NodeaddIdValue (const char *value)
 
virtual NodeaddIdValue (const double &value)
 
virtual NodeaddIdValue (const uint64_t &value)
 
virtual NodeaddIdValue (const int64_t &value)
 
virtual NodeaddIdValue (const bool &value)
 
virtual NodeaddListValue ()
 
virtual NodeaddTextValue (const std::string &value)
 
virtual void addValue (std::unique_ptr< Node > node)
 
virtual std::unique_ptr< Nodeerase ()
 
virtual std::string & get ()
 
virtual bool getBool ()
 
virtual double getDouble ()
 
virtual int64_t getInt ()
 
virtual uint64_t getUInt ()
 
 Node ()
 
virtual Nodeoperator[] (const size_t index)
 
virtual std::unique_ptr< NoderemoveValue (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
 

Protected Attributes

std::map< std::string, std::unique_ptr< Node > > attributes
 
std::vector< std::string > keyOrder
 

Additional Inherited Members

- Public Attributes inherited from json::Node
size_t orderedKeyIndex
 
Nodeparent
 
- Static Protected Attributes inherited from json::Node
static const int SERIALIZE_INDENT = 3
 

Constructor & Destructor Documentation

◆ DictNode() [1/2]

json::DictNode::DictNode ( )

Referenced by addDictAttr(), clone(), and parseAttributes().

◆ DictNode() [2/2]

json::DictNode::DictNode ( const DictNode original)

Member Function Documentation

◆ addAttribute()

void json::DictNode::addAttribute ( const std::string &  name,
std::unique_ptr< Node node 
)
overridevirtual

◆ addDictAttr()

Node & json::DictNode::addDictAttr ( const std::string &  name)
overridevirtual

◆ addIDAttr() [1/6]

◆ addIDAttr() [2/6]

Node & json::DictNode::addIDAttr ( const std::string &  name,
const char *  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr().

◆ addIDAttr() [3/6]

Node & json::DictNode::addIDAttr ( const std::string &  name,
const double &  value 
)
overridevirtual

Reimplemented from json::Node.

References addAttribute(), and json::Node::setDouble().

◆ addIDAttr() [4/6]

Node & json::DictNode::addIDAttr ( const std::string &  name,
const uint64_t &  value 
)
overridevirtual

Reimplemented from json::Node.

References addAttribute(), and json::Node::setUInt().

◆ addIDAttr() [5/6]

Node & json::DictNode::addIDAttr ( const std::string &  name,
const int64_t &  value 
)
overridevirtual

Reimplemented from json::Node.

References addAttribute(), and json::Node::setInt().

◆ addIDAttr() [6/6]

Node & json::DictNode::addIDAttr ( const std::string &  name,
const bool &  value 
)
overridevirtual

Reimplemented from json::Node.

References addAttribute(), and json::Node::setBool().

◆ addListAttr()

Node & json::DictNode::addListAttr ( const std::string &  name)
overridevirtual

Reimplemented from json::Node.

References addAttribute().

Referenced by replaceListAttr().

◆ addTextAttr()

Node & json::DictNode::addTextAttr ( const std::string &  name,
const std::string &  value 
)
overridevirtual

◆ clone()

◆ contains()

◆ erase()

std::unique_ptr< Node > json::DictNode::erase ( Node node)
overridevirtual

Reimplemented from json::Node.

References attributes, and removeAttribute().

◆ keys()

std::vector< std::string > & json::DictNode::keys ( )
overridevirtual

Reimplemented from json::Node.

References keyOrder.

Referenced by sgpp::base::OCLOperationConfiguration::getAllDeviceNodes().

◆ operator=() [1/2]

DictNode & json::DictNode::operator= ( const DictNode right)

◆ operator=() [2/2]

Node & json::DictNode::operator= ( const Node right)
overridevirtual

Reimplemented from json::Node.

References operator=().

◆ operator[]()

Node & json::DictNode::operator[] ( const std::string &  key)
overridevirtual

Reimplemented from json::Node.

References attributes.

◆ parse()

void json::DictNode::parse ( std::vector< Token > &  stream)
overridevirtual

◆ parseAttributes()

void json::DictNode::parseAttributes ( std::vector< Token > &  stream)

◆ removeAttribute()

std::unique_ptr< Node > json::DictNode::removeAttribute ( const std::string  name)
overridevirtual

◆ replaceDictAttr()

Node & json::DictNode::replaceDictAttr ( const std::string &  name)
overridevirtual

Reimplemented from json::Node.

References addDictAttr(), attributes, and removeAttribute().

◆ replaceIDAttr() [1/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const std::string &  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr(), attributes, and removeAttribute().

Referenced by replaceIDAttr().

◆ replaceIDAttr() [2/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const char *  value 
)
overridevirtual

Reimplemented from json::Node.

References replaceIDAttr().

◆ replaceIDAttr() [3/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const double &  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr(), attributes, and removeAttribute().

◆ replaceIDAttr() [4/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const uint64_t &  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr(), attributes, and removeAttribute().

◆ replaceIDAttr() [5/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const int64_t &  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr(), attributes, and removeAttribute().

◆ replaceIDAttr() [6/6]

Node & json::DictNode::replaceIDAttr ( const std::string &  name,
const bool &  value 
)
overridevirtual

Reimplemented from json::Node.

References addIDAttr(), attributes, and removeAttribute().

◆ replaceListAttr()

Node & json::DictNode::replaceListAttr ( const std::string &  name)
overridevirtual

Reimplemented from json::Node.

References addListAttr(), attributes, and removeAttribute().

◆ replaceTextAttr()

Node & json::DictNode::replaceTextAttr ( const std::string &  name,
const std::string &  value 
)
overridevirtual

◆ serialize()

◆ size()

size_t json::DictNode::size ( )
overridevirtual

Member Data Documentation

◆ attributes

◆ keyOrder

std::vector<std::string> json::DictNode::keyOrder
protected

The documentation for this class was generated from the following files: