StdAir Logo  1.00.18
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
stdair::JSonCommand Struct Reference

Enumeration of json commands. More...

#include <stdair/basic/JSonCommand.hpp>

+ Inheritance diagram for stdair::JSonCommand:

Public Types

enum  EN_JSonCommand {
  LIST = 0 , FLIGHT_DATE , EVENT_LIST , BREAK_POINT ,
  RUN , RESET , STATUS , CONFIG ,
  LAST_VALUE
}
 

Public Member Functions

EN_JSonCommand getCommand () const
 
const std::string describe () const
 
bool operator== (const EN_JSonCommand &) const
 
 JSonCommand (const EN_JSonCommand &)
 
 JSonCommand (const std::string &)
 
 JSonCommand (const JSonCommand &)
 
void toStream (std::ostream &ioOut) const
 
virtual void fromStream (std::istream &ioIn)
 

Static Public Member Functions

static EN_JSonCommand getCommand (const std::string &iCommandStr)
 
static std::string getLabel (const EN_JSonCommand &)
 
static std::string describeLabels ()
 

Detailed Description

Enumeration of json commands.

Definition at line 17 of file JSonCommand.hpp.

Member Enumeration Documentation

◆ EN_JSonCommand

Enumerator
LIST 
FLIGHT_DATE 
EVENT_LIST 
BREAK_POINT 
RUN 
RESET 
STATUS 
CONFIG 
LAST_VALUE 

Definition at line 19 of file JSonCommand.hpp.

Constructor & Destructor Documentation

◆ JSonCommand() [1/3]

stdair::JSonCommand::JSonCommand ( const EN_JSonCommand & )

Main Constructor.

References JSonCommand(), and LAST_VALUE.

Referenced by JSonCommand(), JSonCommand(), and JSonCommand().

◆ JSonCommand() [2/3]

stdair::JSonCommand::JSonCommand ( const std::string & iCommandStr)

Alternative constructor.

Definition at line 71 of file JSonCommand.cpp.

References getCommand(), and JSonCommand().

◆ JSonCommand() [3/3]

stdair::JSonCommand::JSonCommand ( const JSonCommand & iJSonCommand)

Default copy constructor.

Definition at line 24 of file JSonCommand.cpp.

References JSonCommand().

Member Function Documentation

◆ getCommand() [1/2]

JSonCommand::EN_JSonCommand stdair::JSonCommand::getCommand ( const std::string & iCommandStr)
static

Get the command value from parsing a single char (e.g., "list", "flight_date", "event_list", "break_point", "run", "reset, "status" or "config").

Definition at line 31 of file JSonCommand.cpp.

References BREAK_POINT, CONFIG, describeLabels(), EVENT_LIST, FLIGHT_DATE, LAST_VALUE, LIST, RESET, RUN, and STATUS.

Referenced by stdair::BomJSONImport::jsonImportCommand().

◆ getLabel()

std::string stdair::JSonCommand::getLabel ( const EN_JSonCommand & iCommand)
static

Get a label of a command

Definition at line 66 of file JSonCommand.cpp.

◆ describeLabels()

std::string stdair::JSonCommand::describeLabels ( )
static

List the labels.

Definition at line 77 of file JSonCommand.cpp.

References LAST_VALUE.

Referenced by getCommand().

◆ getCommand() [2/2]

JSonCommand::EN_JSonCommand stdair::JSonCommand::getCommand ( ) const

Get the enumerated value.

Definition at line 89 of file JSonCommand.cpp.

Referenced by JSonCommand().

◆ describe()

const std::string stdair::JSonCommand::describe ( ) const
virtual

Give a description of the structure (e.g., "list", "flight_date", "event_list", "break_point" "run", "reset, "status" or "config").

Implements stdair::StructAbstract.

Definition at line 94 of file JSonCommand.cpp.

◆ operator==()

bool stdair::JSonCommand::operator== ( const EN_JSonCommand & iCommand) const

Comparison operator.

Definition at line 101 of file JSonCommand.cpp.

◆ toStream()

void stdair::StructAbstract::toStream ( std::ostream & ioOut) const
inlineinherited

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Definition at line 29 of file StructAbstract.hpp.

References describe().

◆ fromStream()


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