Majoranapp
A C++ library for studying MZM in non-interacting systems
ConnectionsParser Class Reference

parsing connections from JSON file More...

#include <ConnectionsParser.hpp>

Static Public Member Functions

template<class T >
static ParametersConnections Parse (json &jsonConnections, T &parameters)
 Parsing json object to ParametersConnetions. More...
 

Static Private Member Functions

static bool HasArray (json &connection)
 checks if one of the item in json is an array More...
 
static void GetConnection (json &jsonConnection, Connection &connection, double &value)
 Get the Connection object. More...
 
static Connections GetAllConnections (json &parameterConnections, double defaultValue)
 Get the all Connections objects from json object. More...
 

Detailed Description

parsing connections from JSON file

Member Function Documentation

◆ GetAllConnections()

static Connections ConnectionsParser::GetAllConnections ( json parameterConnections,
double  defaultValue 
)
inlinestaticprivate

Get the all Connections objects from json object.

Parameters
parameterConnectionsjson object to parse
defaultValuedefault value of the connection
Returns
Connections

◆ GetConnection()

static void ConnectionsParser::GetConnection ( json jsonConnection,
Connection &  connection,
double &  value 
)
inlinestaticprivate

Get the Connection object.

Parameters
jsonConnectionjson object to unpack
connectionparsed Connection
valueparsed value

◆ HasArray()

static bool ConnectionsParser::HasArray ( json connection)
inlinestaticprivate

checks if one of the item in json is an array

Parameters
connectionjson object
Returns
true array item exists
false array item does not exist

◆ Parse()

template<class T >
static ParametersConnections ConnectionsParser::Parse ( json jsonConnections,
T &  parameters 
)
inlinestatic

Parsing json object to ParametersConnetions.

Template Parameters
T
Parameters
jsonConnections
parameters
Returns
ParametersConnections

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