TvlSim Logo  1.00.0
C++ Simulated Travel-Oriented Distribution System Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TVLSIM::SimulationMode Struct Reference

Enumeration of json commands. More...

#include <tvlsim/basic/SimulationMode.hpp>

+ Inheritance diagram for TVLSIM::SimulationMode:

List of all members.

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

Enumerator:
START 
RUNNING 
BREAK 
DONE 
LAST_VALUE 

Definition at line 19 of file SimulationMode.hpp.


Constructor & Destructor Documentation

TVLSIM::SimulationMode::SimulationMode ( const EN_SimulationMode )

Main Constructor.

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

Constructor.

Definition at line 59 of file SimulationMode.cpp.

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

Alternative constructor.

Definition at line 64 of file SimulationMode.cpp.

References getMode().

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

Default copy constructor.

Definition at line 29 of file SimulationMode.cpp.


Member Function Documentation

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 74 of file SimulationMode.cpp.

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().

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.

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 85 of file SimulationMode.cpp.

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

List the labels.

Definition at line 92 of file SimulationMode.cpp.

References LAST_VALUE.

Referenced by getMode().

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

Get the enumerated value.

Definition at line 104 of file SimulationMode.cpp.

Referenced by SimulationMode().

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.

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.

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().

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().

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

Comparison operator.

Definition at line 130 of file SimulationMode.cpp.


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