14 const std::string JSonCommand::_labels[
LAST_VALUE] =
15 {
"list",
"flight_date",
"event_list",
"break_point",
"run",
"reset",
"status",
"config"};
18 JSonCommand::JSonCommand()
26 : _command (iJSonCommand._command) {
34 if (iCommandStr ==
"list") {
36 }
else if (iCommandStr ==
"flight_date") {
38 }
else if (iCommandStr ==
"event_list") {
40 }
else if (iCommandStr ==
"break_point") {
42 }
else if (iCommandStr ==
"run") {
44 }
else if (iCommandStr ==
"reset") {
46 }
else if (iCommandStr ==
"status") {
48 }
else if (iCommandStr ==
"config") {
56 std::ostringstream oMessage;
57 oMessage <<
"The JSON command '" << iCommandStr
58 <<
"' is not known. Known forecasting commands: " << lLabels;
67 return _labels[iCommand];
71 JSonCommand::JSonCommand (
const std::string& iCommandStr) {
78 std::ostringstream ostr;
79 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
83 ostr << _labels[idx] <<
" ";
95 std::ostringstream ostr;
96 ostr << _labels[_command];
103 return (_command == iCommand);
Enumeration of json commands.
static std::string describeLabels()
Handle on the StdAir library context.
const std::string describe() const
static std::string getLabel(const EN_JSonCommand &)
bool operator==(const EN_JSonCommand &) const
EN_JSonCommand getCommand() const