|
NetDEM v1.0
|
A base class for commands that can modify a simulation based on provided JSON information. More...
#include <command.hpp>
Public Member Functions | |
| Command (nlohmann::json const &info, Simulation *sim) | |
Constructs a new Command object with the given information and simulation object. | |
| virtual void | Execute ()=0 |
| Executes the command on the simulation object. | |
| virtual | ~Command () |
Destroys the Command object. | |
Public Attributes | |
| nlohmann::json | info |
| The information associated with the command. | |
| Simulation * | sim |
| A pointer to the simulation object. | |
A base class for commands that can modify a simulation based on provided JSON information.
an interface that all commands would inheritage. A command modifies a simulation according to the provided json information.
The Command class is a base class for commands that can modify a simulation based on provided JSON information. It provides functionality to store information about the command and a pointer to the simulation object, as well as a virtual function to execute the command.
|
inline |
|
inlinevirtual |
|
pure virtual |
Executes the command on the simulation object.
This virtual function executes the command on the simulation object.
Implemented in netdem::CommandCreate.
| nlohmann::json netdem::Command::info |
The information associated with the command.
| Simulation* netdem::Command::sim |
A pointer to the simulation object.