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

A command class to create an object in the simulation. More...

#include <command_create.hpp>

Inheritance diagram for netdem::CommandCreate:
netdem::Command

Public Member Functions

 CommandCreate (nlohmann::json const &info, Simulation *sim)
 Constructs a new CommandCreate object with the given information and simulation object.
 
void Execute () override
 Creates the object in the simulation.
 
- Public Member Functions inherited from netdem::Command
 Command (nlohmann::json const &info, Simulation *sim)
 Constructs a new Command object with the given information and simulation object.
 
virtual ~Command ()
 Destroys the Command object.
 

Additional Inherited Members

- Public Attributes inherited from netdem::Command
nlohmann::json info
 The information associated with the command.
 
Simulationsim
 A pointer to the simulation object.
 

Detailed Description

A command class to create an object in the simulation.

With the input parameters defined in json, create and insert a sphere shape into a simulation.

The CommandCreate class is a command class that creates an object in the simulation based on the provided JSON information. It inherits from the Command base class and implements the Execute() function to create the object in the simulation.

Constructor & Destructor Documentation

◆ CommandCreate()

netdem::CommandCreate::CommandCreate ( nlohmann::json const & info,
Simulation * sim )

Constructs a new CommandCreate object with the given information and simulation object.

This constructor creates a new CommandCreate object with the given information and simulation object.

Parameters
infoThe information associated with the command.
simA pointer to the simulation object.

Member Function Documentation

◆ Execute()

void netdem::CommandCreate::Execute ( )
overridevirtual

Creates the object in the simulation.

This function creates the object in the simulation as specified by the JSON information in the info member variable. It overrides the Execute() function of the Command base class.

Implements netdem::Command.


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