TvlSim Logo  1.01.6
C++ Simulated Travel-Oriented Distribution System Library
Loading...
Searching...
No Matches
TVLSIM::SimulationMode Struct Reference

Enumeration of json commands. More...

#include <tvlsim/basic/SimulationMode.hpp>

+ Inheritance diagram for TVLSIM::SimulationMode:

Public Types

enum  EN_SimulationMode {
  START = 0 , RUNNING , BREAK , DONE ,
  LAST_VALUE
}
 

Public Member Functions

EN_SimulationMode getMode () const
 
char getModeAsChar () const
 
std::string getModeAsString () const
 
const std::string describe () const
 
void setMode (const EN_SimulationMode &iEN_SimulationMode)
 
bool operator== (const EN_SimulationMode &) const
 
 SimulationMode (const EN_SimulationMode &)
 
 SimulationMode (const char)
 
 SimulationMode (const std::string &)
 
 SimulationMode (const SimulationMode &)
 

Static Public Member Functions

static const std::string & getLabel (const EN_SimulationMode &)
 
static EN_SimulationMode getMode (const char)
 
static char getModeLabel (const EN_SimulationMode &)
 
static std::string getModeLabelAsString (const EN_SimulationMode &)
 
static std::string describeLabels ()
 

Detailed Description

Enumeration of json commands.

Definition at line 17 of file SimulationMode.hpp.

Member Enumeration Documentation

◆ EN_SimulationMode

Enumerator
START 
RUNNING 
BREAK 
DONE 
LAST_VALUE 

Definition at line 19 of file SimulationMode.hpp.

Constructor & Destructor Documentation

◆ SimulationMode() [1/4]

TVLSIM::SimulationMode::SimulationMode ( const EN_SimulationMode )

Main Constructor.

◆ SimulationMode() [2/4]

TVLSIM::SimulationMode::SimulationMode ( const char  iModeChar)

Constructor.

Definition at line 59 of file SimulationMode.cpp.

◆ SimulationMode() [3/4]

TVLSIM::SimulationMode::SimulationMode ( const std::string &  iModeStr)

Alternative constructor.

Definition at line 64 of file SimulationMode.cpp.

References getMode().

◆ SimulationMode() [4/4]

TVLSIM::SimulationMode::SimulationMode ( const SimulationMode iSimulationMode)

Default copy constructor.

Definition at line 28 of file SimulationMode.cpp.

Member Function Documentation

◆ getLabel()

const std::string & TVLSIM::SimulationMode::getLabel ( const EN_SimulationMode iMode)
static

Get the label as a string (e.g., "start", "running", "break" or "done").

Definition at line 73 of file SimulationMode.cpp.

◆ getMode() [1/2]

SimulationMode::EN_SimulationMode TVLSIM::SimulationMode::getMode ( const char  iModeChar)
static

Get the mode value from parsing a single char (e.g., 's', 'r', 'b', 'd').

Definition at line 35 of file SimulationMode.cpp.

References BREAK, describeLabels(), DONE, LAST_VALUE, RUNNING, and START.

Referenced by TVLSIM::SimulationStatus::displayEndStatusMessage(), TVLSIM::SimulationStatus::displayStartStatusMessage(), and TVLSIM::SimulationStatus::getMode().

◆ getModeLabel()

char TVLSIM::SimulationMode::getModeLabel ( const EN_SimulationMode iMode)
static

Get the label as a single char (e.g., 's', 'r', 'b', 'd').

Definition at line 79 of file SimulationMode.cpp.

◆ getModeLabelAsString()

std::string TVLSIM::SimulationMode::getModeLabelAsString ( const EN_SimulationMode iMode)
static

Get the label as a string of a single char (e.g., 's', 'r', 'b', 'd').

Definition at line 84 of file SimulationMode.cpp.

◆ describeLabels()

std::string TVLSIM::SimulationMode::describeLabels ( )
static

List the labels.

Definition at line 92 of file SimulationMode.cpp.

References LAST_VALUE.

Referenced by getMode().

◆ getMode() [2/2]

SimulationMode::EN_SimulationMode TVLSIM::SimulationMode::getMode ( ) const

Get the enumerated value.

Definition at line 104 of file SimulationMode.cpp.

Referenced by SimulationMode().

◆ getModeAsChar()

char TVLSIM::SimulationMode::getModeAsChar ( ) const

Get the enumerated value as a char (e.g., 's', 'r', 'b', 'd').

Definition at line 116 of file SimulationMode.cpp.

◆ getModeAsString()

std::string TVLSIM::SimulationMode::getModeAsString ( ) const

Get the enumerated value as a short string (e.g., "s", "r", "b", "d").

Definition at line 109 of file SimulationMode.cpp.

◆ describe()

const std::string TVLSIM::SimulationMode::describe ( ) const

Give a description of the structure (e.g., "start", "running", "break" or "done").

Definition at line 122 of file SimulationMode.cpp.

Referenced by TVLSIM::BomJSONExport::jsonExportSimulationStatus().

◆ setMode()

void TVLSIM::SimulationMode::setMode ( const EN_SimulationMode iEN_SimulationMode)
inline

Setters

Definition at line 76 of file SimulationMode.hpp.

Referenced by TVLSIM::SimulationStatus::reset(), and TVLSIM::SimulationStatus::setMode().

◆ operator==()

bool TVLSIM::SimulationMode::operator== ( const EN_SimulationMode iMode) const

Comparison operator.

Definition at line 129 of file SimulationMode.cpp.


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