7 #if BOOST_VERSION >= 104100
9 #include <boost/property_tree/ptree.hpp>
10 #include <boost/property_tree/json_parser.hpp>
11 #endif // BOOST_VERSION >= 104100
15 #if BOOST_VERSION >= 104100
16 namespace bpt = boost::property_tree;
17 #else // BOOST_VERSION >= 104100
21 #endif // BOOST_VERSION >= 104100
28 bool hasKeyBeenSuccessfullyRetrieved =
true;
30 #if BOOST_VERSION >= 104100
39 std::istringstream iStr (iBomTree);
45 ioAirlineCode = pt.get<
AirlineCode_T> (
"flight_date.airline_code");
47 }
catch (bpt::ptree_error& bptException) {
48 hasKeyBeenSuccessfullyRetrieved =
false;
50 #endif // BOOST_VERSION >= 104100
52 return hasKeyBeenSuccessfullyRetrieved;
59 bool hasKeyBeenSuccessfullyRetrieved =
false;
61 #if BOOST_VERSION >= 104100
70 std::istringstream iStr (iBomTree);
75 ioFlightNumber = pt.get<
FlightNumber_T> (
"flight_date.flight_number");
77 const std::string& lDepartureDateStr =
78 pt.get<std::string> (
"flight_date.departure_date");
79 ioDepartureDate = boost::gregorian::from_simple_string (lDepartureDateStr);
81 }
catch (bpt::ptree_error& bptException) {
82 hasKeyBeenSuccessfullyRetrieved =
false;
84 #endif // BOOST_VERSION >= 104100
86 return hasKeyBeenSuccessfullyRetrieved;