StdAir Logo  1.00.20
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
stdair::BomJSONImport Class Reference

Utility class to import StdAir objects in a JSON format. More...

#include <stdair/bom/BomJSONImport.hpp>

Static Public Member Functions

static bool jsonImportCommand (const JSONString &, JSonCommand::EN_JSonCommand &)
 
static bool jsonImportInventoryKey (const JSONString &, AirlineCode_T &)
 
static bool jsonImportFlightDate (const JSONString &, Date_T &)
 
static bool jsonImportFlightNumber (const JSONString &, FlightNumber_T &)
 
static bool jsonImportBreakPoints (const JSONString &, BreakPointList_T &)
 
static bool jsonImportEventType (const JSONString &, EventType::EN_EventType &)
 
static bool jsonImportConfig (const JSONString &, ConfigHolderStruct &)
 

Detailed Description

Utility class to import StdAir objects in a JSON format.

Definition at line 26 of file BomJSONImport.hpp.

Member Function Documentation

◆ jsonImportCommand()

bool stdair::BomJSONImport::jsonImportCommand ( const JSONString & iBomJSONStr,
JSonCommand::EN_JSonCommand & ioEnumJSonCommand )
static

Extract the JSON command from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
JSonCommand::EN_JSonCommand&JSOM command extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 34 of file BomJSONImport.cpp.

References stdair::JSonCommand::getCommand(), and stdair::JSONString::getString().

◆ jsonImportInventoryKey()

bool stdair::BomJSONImport::jsonImportInventoryKey ( const JSONString & iBomJSONStr,
AirlineCode_T & ioAirlineCode )
static

Extract the airline code from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
AirlineCode_T&Airline code extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 101 of file BomJSONImport.cpp.

References stdair::JSONString::getString().

◆ jsonImportFlightDate()

bool stdair::BomJSONImport::jsonImportFlightDate ( const JSONString & iBomJSONStr,
Date_T & ioDepartureDate )
static

Extract the FlightDate from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
Date_T&Departure date extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 136 of file BomJSONImport.cpp.

References stdair::JSONString::getString().

◆ jsonImportFlightNumber()

bool stdair::BomJSONImport::jsonImportFlightNumber ( const JSONString & iBomJSONStr,
FlightNumber_T & ioFlightNumber )
static

Extract the FlightNumber from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
FlightNumber_T&Flight number extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 170 of file BomJSONImport.cpp.

References stdair::JSONString::getString().

◆ jsonImportBreakPoints()

bool stdair::BomJSONImport::jsonImportBreakPoints ( const JSONString & iBomJSONStr,
BreakPointList_T & oBreakPointList )
static

Extract the break points from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
BreakPointList_T&List of breaking points extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 206 of file BomJSONImport.cpp.

References stdair::JSONString::getString().

◆ jsonImportEventType()

bool stdair::BomJSONImport::jsonImportEventType ( const JSONString & iBomJSONStr,
EventType::EN_EventType & ioEventType )
static

Extract the event type from a given JSON-formatted string.

Parameters
constJSONString& JSON-formatted string.
EventType::EN_EventType&Event type extracted from the given string.
Returns
bool State whether the extracting has been successful.

Definition at line 256 of file BomJSONImport.cpp.

References stdair::JSONString::getString(), and stdair::EventType::getType().

◆ jsonImportConfig()

bool stdair::BomJSONImport::jsonImportConfig ( const JSONString & iBomJSONStr,
ConfigHolderStruct & iConfigHolderStruct )
static

Extract the configuration ptree from the given JSON-formatted string and add it to the configuration holder

Parameters
constJSONString& JSON-formatted string.
ConfigHolderStruct&Configuration holder.
Returns
bool State whether the extracting has been successful.

Definition at line 299 of file BomJSONImport.cpp.

References stdair::ConfigHolderStruct::add(), and stdair::JSONString::getString().

Referenced by stdair::STDAIR_Service::jsonImportConfiguration().


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