NetDEM v1.0
|
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. | |
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.
netdem::InputProcessor::InputProcessor | ( | ) |
Constructs a new InputProcessor
object.
This constructor creates a new InputProcessor
object.
void netdem::InputProcessor::Init | ( | Simulation * | s | ) |
Initializes the InputProcessor
object with a simulation object.
This function initializes the InputProcessor
object with a simulation object.
s | A pointer to the simulation object. |
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.
js | The JSON data to process. |
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.
filename | The name of the JSON file to process. |