NetDEM v1.0
Loading...
Searching...
No Matches
netdem::InputProcessor Class Reference

A class that processes input JSON files to modify a simulation. More...

#include <input_processor.hpp>

Public Member Functions

 InputProcessor ()
 Constructs a new InputProcessor object.
 
void Init (Simulation *s)
 Initializes the InputProcessor object with a simulation object.
 
void ProcessJsonFile (std::string const &filename)
 Processes a JSON file.
 
void ProcessJson (nlohmann::json const &js)
 Processes JSON data.
 

Detailed Description

A class that processes input JSON files to modify a simulation.

Create or modify a simulation using json input file.

The InputProcessor class is responsible for processing input JSON files and modifying a simulation accordingly. It provides functionality to initialize the class with a simulation object, process a JSON file, and process JSON data.

Constructor & Destructor Documentation

◆ InputProcessor()

netdem::InputProcessor::InputProcessor ( )

Constructs a new InputProcessor object.

This constructor creates a new InputProcessor object.

Member Function Documentation

◆ Init()

void netdem::InputProcessor::Init ( Simulation * s)

Initializes the InputProcessor object with a simulation object.

This function initializes the InputProcessor object with a simulation object.

Parameters
sA pointer to the simulation object.

◆ ProcessJson()

void netdem::InputProcessor::ProcessJson ( nlohmann::json const & js)

Processes JSON data.

This function processes JSON data and modifies the simulation object accordingly. The JSON data should be an array of objects that specify commands to be executed on the simulation object.

Parameters
jsThe JSON data to process.

◆ ProcessJsonFile()

void netdem::InputProcessor::ProcessJsonFile ( std::string const & filename)

Processes a JSON file.

This function processes a JSON file and modifies the simulation object accordingly. The JSON file should contain an array of objects that specify commands to be executed on the simulation object.

Parameters
filenameThe name of the JSON file to process.

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