StdAir Logo  1.00.20
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
BomJSONExport.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_BOM_BOMJSONEXPORT_HPP
2#define __STDAIR_BOM_BOMJSONEXPORT_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <iosfwd>
9// Boost Property Tree
10#if BOOST_VERSION_MACRO >= 104100
11#include <boost/property_tree/ptree.hpp>
12#include <boost/property_tree/json_parser.hpp>
13#endif // BOOST_VERSION_MACRO >= 104100
14// StdAir
16
17#if BOOST_VERSION_MACRO >= 104100
18 namespace bpt = boost::property_tree;
19#else // BOOST_VERSION_MACRO >= 104100
20 namespace bpt {
21 typedef char ptree;
22 }
23#endif // BOOST_VERSION_MACRO >= 104100
24
25namespace stdair {
26
28 class BomRoot;
29 class Inventory;
30 class FlightDate;
31 class LegDate;
32 class LegCabin;
33 class SegmentDate;
34 class SegmentCabin;
35 class BookingClass;
36 struct EventStruct;
37
41
43 public:
44 // //////////////// Export support methods /////////////////
45
61 static void jsonExportFlightDateList (std::ostream&, const BomRoot&,
62 const AirlineCode_T& iAirlineCode = "all",
63 const FlightNumber_T& iFlightNumber = 0);
64
74 static void jsonExportFlightDateObjects (std::ostream&, const FlightDate&);
75
85 static void jsonExportBookingRequestObject (std::ostream&,
86 const EventStruct&);
87
97 static void jsonExportBreakPointObject (std::ostream&,
98 const EventStruct&);
99
100 private:
101
113 static void jsonExportFlightDate (bpt::ptree&,
114 const Inventory&,
115 const FlightNumber_T&);
116
125 static void jsonExportLegDate (bpt::ptree&, const FlightDate&);
126
135 static void jsonExportLegCabin (bpt::ptree&, const LegDate&);
136
145 static void jsonExportBucket (bpt::ptree&, const LegCabin&);
146
156 static void jsonExportSegmentDate (bpt::ptree&, const FlightDate&);
157
166 static void jsonExportSegmentCabin (bpt::ptree&, const SegmentDate&);
167
180 static void jsonExportFareFamily (bpt::ptree&, bpt::ptree&,
181 const SegmentCabin&);
182
192 static void jsonExportBookingClass (bpt::ptree&, bpt::ptree&,
193 const BookingClass&);
194
195 };
196
197}
198#endif // __STDAIR_BOM_BOMJSONEXPORT_HPP
Handle on the StdAir library context.
unsigned short FlightNumber_T
std::string AirlineCode_T
char ptree
Utility class to export StdAir objects in a JSON format.
static void jsonExportFlightDateObjects(std::ostream &, const FlightDate &)
static void jsonExportFlightDateList(std::ostream &, const BomRoot &, const AirlineCode_T &iAirlineCode="all", const FlightNumber_T &iFlightNumber=0)
static void jsonExportBreakPointObject(std::ostream &, const EventStruct &)
static void jsonExportBookingRequestObject(std::ostream &, const EventStruct &)
Class representing the actual attributes for the Bom root.
Definition BomRoot.hpp:32
Class representing the actual attributes for an airline flight-date.
Class representing the actual attributes for an airline inventory.
Definition Inventory.hpp:41
Class representing the actual attributes for an airline leg-cabin.
Definition LegCabin.hpp:25
Class representing the actual attributes for an airline segment-cabin.
Class representing the actual attributes for an airline segment-date.