24 #include "../basic_types/InitialisationException.h"
25 #include "../basic_types/RunException.h"
28 namespace basic_types {
56 virtual void run() = 0;
92 virtual void initialize(unordered_map<string,string>& parameters) = 0;
103 void addParameter(
string paramName,
string description,
bool mandatory =
true);
vector< string > parameterNames
Contains the names of all parameters of the Scenario.
Definition: Scenario.h:141
const string scenarioName
A unique name of this scenario starting with "scn_".
Definition: Scenario.h:122
void checkInitializationAndThrow() const
Check if the Scenario was initialized and throws a RunException if it was not.
Definition: Scenario.cpp:174
Scenario(string name, string desciptor, vector< string > const &alternateNames=vector< string >())
Generates an uninitialized Scenario with the given name and call descriptor.
Definition: Scenario.cpp:36
const string scenarioDescriptor
Contains a description of how a call of this scenario may look like.
Definition: Scenario.h:133
void addSynonymFor(string original, string synonym)
Stores that the parameter 'original' is also meant if 'synonym' was given as parameter.
Definition: Scenario.cpp:170
bool wasInitialized
Stores whether the Scenario was initialized or not.
Definition: Scenario.h:156
unique_ptr< Scenario > Scenario_up
Alias of a unique pointer to a Scenario object.
Definition: Scenario.h:163
virtual void run()=0
Executes the scenario.
string getScenarioDesciption() const
Returns a full description of the given Scenario.
Definition: Scenario.cpp:118
A scenario is a subprogram using a set of input parameters to execute some algorithms, producing desired output.
Definition: Scenario.h:36
bool isInitialized() const
Check whether the Scenario was already initialized or not.
Definition: Scenario.cpp:114
virtual ~Scenario()
The destructor of the current Scenario.
Definition: Scenario.cpp:40
unordered_map< string, string > synonyms
Stores all synonyms for parameters.
Definition: Scenario.h:151
void initialize(vector< string > ¶ms)
Initializes the current Scenario with the given vector of parameters.
Definition: Scenario.cpp:42
string getName() const
Returns the name of this Scenario, which is a string beginning with 'scn_'.
Definition: Scenario.cpp:110
unordered_map< string, pair< string, bool > > parameterDescriptor
Stores detailed description of every parameter of this Scenario and whether the parameter is mandator...
Definition: Scenario.h:146
const vector< string > alternateNames
A vector containing all names for this Scenario, beyond scenarioName.
Definition: Scenario.h:127
void addParameter(string paramName, string description, bool mandatory=true)
Defined a new input parameter with the name 'paramName' the description 'description'.
Definition: Scenario.cpp:164