UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScenarioLoader Class Reference

This class generates Scenario object from their string identifier (without initializing them). More...

#include <ScenarioLoader.h>

Collaboration diagram for ScenarioLoader:
Collaboration graph
[legend]

Public Member Functions

 ScenarioLoader ()
 Generates a new ScenarioLoader object. More...
 
virtual ~ScenarioLoader ()
 Destroys this instance of ScenarioLoader.
 
basic_types::Scenario_up getScenario (string ident) const
 Generates a Scenario object specified by the given string without initializing it. More...
 
basic_types::Scenario_up getScenarioByName (string name) const
 Generates a Scenario object specified by the given name without initializing it. More...
 
basic_types::Scenario_up getScenarioByID (unsigned int id) const
 Generates a Scenario object specified by the given ID without initializing it. More...
 
void getScenarioList (std::ostream &ost, string separator=",") const
 Print a list of all available scenarios to the given stream using the given separator. More...
 

Private Member Functions

void initNameToIDMapping ()
 Fills the scnNameToIDMapping with the appropriate (hard coded) values.
 

Private Attributes

unordered_map< string,
unsigned int > 
scnNameToIDMapping
 A mapping from scenario names (long and short) to an unique identifier.
 
unordered_set< string > firstNames
 A set storing all names which should be displayed first when printing the scenario list.
 

Detailed Description

This class generates Scenario object from their string identifier (without initializing them).

Author
Jan Stückrath
See Also
basic_types::Scenario

Constructor & Destructor Documentation

Generates a new ScenarioLoader object.

No further initialization is required.

Member Function Documentation

Scenario_up getScenario ( string  ident) const

Generates a Scenario object specified by the given string without initializing it.

It is first checked if the given string is a defined name and then if it is an ID. If neither is the case, nullptr is returned.

Parameters
identthe name or ID of the desired Scenario
Returns
either a pointer on the desired (uninitialized) Scenario object or nullptr
Scenario_up getScenarioByID ( unsigned int  id) const

Generates a Scenario object specified by the given ID without initializing it.

Returns nullptr if there is no Scenario with the given ID.

Parameters
idthe ID of the desired Scenario
Returns
either a pointer on the desired (uninitialized) Scenario object or nullptr
Scenario_up getScenarioByName ( string  name) const

Generates a Scenario object specified by the given name without initializing it.

Returns nullptr if there is no Scenario with the given name.

Parameters
namethe name of the desired Scenario
Returns
either a pointer on the desired (uninitialized) Scenario object or nullptr
void getScenarioList ( std::ostream &  ost,
string  separator = "," 
) const

Print a list of all available scenarios to the given stream using the given separator.

Parameters
ostthe stream where the scenario list will be printed
separatorthe separator used between every element of the list

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