TvlSim Logo  1.01.7
C++ Simulated Travel-Oriented Distribution System Library
SimulationMode.hpp
Go to the documentation of this file.
1 #ifndef __TVLSIM_BAS_SIMULATIONMODE_HPP
2 #define __TVLSIM_BAS_SIMULATIONMODE_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // StdAir
10 #include <stdair/basic/StructAbstract.hpp>
11 
12 namespace TVLSIM {
13 
17  struct SimulationMode : public stdair::StructAbstract {
18  public:
19  typedef enum {
20  START = 0,
23  DONE,
26 
30  static const std::string& getLabel (const EN_SimulationMode&);
31 
35  static EN_SimulationMode getMode (const char);
36 
40  static char getModeLabel (const EN_SimulationMode&);
41 
45  static std::string getModeLabelAsString (const EN_SimulationMode&);
46 
50  static std::string describeLabels();
51 
55  EN_SimulationMode getMode() const;
56 
60  char getModeAsChar() const;
61 
65  std::string getModeAsString() const;
66 
70  const std::string describe() const;
71 
72  public:
76  void setMode (const EN_SimulationMode& iEN_SimulationMode) {
77  _mode = iEN_SimulationMode;
78  }
79 
80  public:
84  bool operator== (const EN_SimulationMode&) const;
85 
86  public:
91 
95  SimulationMode (const char);
96 
100  SimulationMode (const std::string&);
101 
106 
107  private:
111  SimulationMode();
112 
113 
114  private:
118  static const std::string _labels[LAST_VALUE];
119 
123  static const char _modeLabels[LAST_VALUE];
124 
125 
126  private:
127  // //////// Attributes /////////
131  EN_SimulationMode _mode;
132  };
133 
134 }
135 #endif // __TVLSIM_BAS_SIMULATIONMODE_HPP
Enumeration of json commands.
std::string getModeAsString() const
bool operator==(const EN_SimulationMode &) const
const std::string describe() const
static std::string getModeLabelAsString(const EN_SimulationMode &)
SimulationMode(const EN_SimulationMode &)
static char getModeLabel(const EN_SimulationMode &)
static const std::string & getLabel(const EN_SimulationMode &)
EN_SimulationMode getMode() const
static std::string describeLabels()
void setMode(const EN_SimulationMode &iEN_SimulationMode)