helics  3.5.2
Public Member Functions | List of all members
helics::fileops::JsonBuilder Class Reference

#include <JsonBuilder.hpp>

Public Member Functions

Json::Value & getJValue ()
 
void addElement (const std::string &path, const std::string &value)
 
void addElement (const std::string &path, double value)
 
void addElement (const std::string &path, const std::vector< double > &value)
 
std::string generate ()
 
void reset ()
 

Detailed Description

class to help with the generation of JSON

Member Function Documentation

◆ addElement() [1/3]

void helics::fileops::JsonBuilder::addElement ( const std::string &  path,
const std::string &  value 
)

add a string element on a specific path

add an element on a specific path

References getJValue().

Referenced by helics::ValueFederateManager::localQuery().

◆ addElement() [2/3]

void helics::fileops::JsonBuilder::addElement ( const std::string &  path,
const std::vector< double > &  value 
)

add a vector element on a specific path

References getJValue().

◆ addElement() [3/3]

void helics::fileops::JsonBuilder::addElement ( const std::string &  path,
double  value 
)

add a double element on a specific path

References getJValue().

◆ generate()

std::string helics::fileops::JsonBuilder::generate ( )

generate the JSON value

Referenced by helics::ValueFederateManager::localQuery().

◆ getJValue()

Json::Value & helics::fileops::JsonBuilder::getJValue ( )

get the underlying json object

Referenced by addElement().

◆ reset()

void helics::fileops::JsonBuilder::reset ( )

reset the builder


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