StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 >= 104100
11 #include <boost/property_tree/ptree.hpp>
12 #include <boost/property_tree/json_parser.hpp>
13 #endif // BOOST_VERSION >= 104100
14 // StdAir
16 
17 #if BOOST_VERSION >= 104100
18  namespace bpt = boost::property_tree;
19 #else // BOOST_VERSION >= 104100
20  namespace bpt {
21  typedef char ptree;
22  }
23 #endif // BOOST_VERSION >= 104100
24 
25 namespace stdair {
26 
28  class FlightDate;
29 
34  class BomJSONExport {
35  public:
36  // //////////////// Export support methods /////////////////
45  static void jsonExport (std::ostream&, const FlightDate&);
46 
47  private:
48 
49  static void jsonLegDateExport (bpt::ptree&, const FlightDate&);
50 
51  static void jsonLegCabinExport (bpt::ptree&, const FlightDate&);
52 
53  static void jsonBucketExport (bpt::ptree&, const FlightDate&);
54 
55  static void jsonSegmentDateExport (bpt::ptree&, const FlightDate&);
56 
57  static void jsonSegmentCabinExport (bpt::ptree&, const FlightDate&);
58 
59  static void jsonFareFamilyExport (bpt::ptree&, const FlightDate&);
60 
61  static void jsonBookingClassExport (bpt::ptree&,
62  const BookingClass&,
63  const std::string&);
64 
65  static void jsonBookingClassExport (bpt::ptree&, const FlightDate&);
66 
67  };
68 
69 }
70 #endif // __STDAIR_BOM_BOMJSONEXPORT_HPP