$treeview $search $mathjax
StdAir Logo  1.00.2
$projectbrief
$projectbrief
$searchbox

stdair/bom/BomJSONExport.hpp

Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_BOMJSONEXPORT_HPP
00002 #define __STDAIR_BOM_BOMJSONEXPORT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 // Boost Property Tree
00010 #if BOOST_VERSION >= 104100
00011 #include <boost/property_tree/ptree.hpp>
00012 #include <boost/property_tree/json_parser.hpp>
00013 #endif // BOOST_VERSION >= 104100
00014 // StdAir
00015 #include <stdair/bom/TravelSolutionTypes.hpp>
00016 
00017 #if BOOST_VERSION >= 104100
00018   namespace bpt = boost::property_tree;
00019 #else // BOOST_VERSION >= 104100
00020   namespace bpt {
00021     typedef char ptree;
00022   }
00023 #endif // BOOST_VERSION >= 104100
00024 
00025 namespace stdair {
00026 
00028   class BomRoot; 
00029   class Inventory;
00030   class FlightDate; 
00031   class LegDate;
00032   class LegCabin; 
00033   class SegmentDate;
00034   class SegmentCabin;
00035   class BookingClass; 
00036   class EventStruct; 
00037 
00042   class BomJSONExport {
00043   public:
00044     // //////////////// Export support methods /////////////////   
00045 
00061     static void jsonExportFlightDateList (std::ostream&, const BomRoot&,
00062                                           const AirlineCode_T& iAirlineCode = "all",
00063                                           const FlightNumber_T& iFlightNumber = 0);
00064 
00074     static void jsonExportFlightDateObjects (std::ostream&, const FlightDate&); 
00075 
00085     static void jsonExportBookingRequestObject (std::ostream&, 
00086                                                 const EventStruct&);
00087 
00097     static void jsonExportBreakPointObject (std::ostream&, 
00098                                             const EventStruct&);
00099 
00100   private:
00101 
00113     static void jsonExportFlightDate (bpt::ptree&,
00114                                       const Inventory&,
00115                                       const FlightNumber_T&); 
00116 
00125     static void jsonExportLegDate (bpt::ptree&, const FlightDate&);
00126      
00135     static void jsonExportLegCabin (bpt::ptree&, const LegDate&);
00136  
00145     static void jsonExportBucket (bpt::ptree&, const LegCabin&);
00146   
00156     static void jsonExportSegmentDate (bpt::ptree&, const FlightDate&);
00157 
00166     static void jsonExportSegmentCabin (bpt::ptree&, const SegmentDate&);
00167  
00180     static void jsonExportFareFamily (bpt::ptree&, bpt::ptree&, 
00181                                       const SegmentCabin&);
00182 
00192     static void jsonExportBookingClass (bpt::ptree&, bpt::ptree&, 
00193                                         const BookingClass&);
00194     
00195   };
00196 
00197 }
00198 #endif // __STDAIR_BOM_BOMJSONEXPORT_HPP