#include <experiment.h>
Non-template interface to Experiment<Modus>.
This class allows to call into the public interface of Experiment<Modus> without the need to know the specific Modus
. The interface is meant for main()
to set up the experiment and then run takes over.
Definition at line 99 of file experiment.h.
Classes | |
struct | InvalidModusRequest |
Exception class that is thrown if an invalid modus is requested from the Experiment factory. More... | |
struct | NonExistingOutputPathRequest |
Exception class that is thrown if the requested output path in the Experiment factory is not existing. More... | |
Public Member Functions | |
ExperimentBase ()=default | |
virtual | ~ExperimentBase ()=default |
The virtual destructor avoids undefined behavior when destroying derived objects. More... | |
virtual void | run ()=0 |
Runs the experiment. More... | |
Static Public Member Functions | |
static std::unique_ptr< ExperimentBase > | create (Configuration &config, const std::filesystem::path &output_path) |
Factory method that creates and initializes a new Experiment<Modus>. More... | |
|
default |
|
virtualdefault |
The virtual destructor avoids undefined behavior when destroying derived objects.
|
static |
Factory method that creates and initializes a new Experiment<Modus>.
This function creates a new Experiment object. The Modus template argument is determined by the config
argument.
[in,out] | config | The configuration object that sets all initial conditions of the experiment. |
[in] | output_path | The directory where the output files are written. |
InvalidModusRequest | This exception is thrown if the Modus string in the config object does not contain a valid string. |
Most of the Configuration values are read starting from this function. The configuration itself is documented in General
Definition at line 22 of file experiment.cc.
|
pure virtual |
Runs the experiment.
The constructor does the setup of the experiment. The run function executes the complete experiment.
Implemented in smash::Experiment< Modus >.