7 #if BOOST_VERSION >= 104100 9 #include <boost/property_tree/ptree.hpp> 10 #include <boost/property_tree/json_parser.hpp> 11 #include <boost/regex.hpp> 12 #endif // BOOST_VERSION >= 104100 14 #include <stdair/STDAIR_Service.hpp> 15 #include <stdair/bom/EventStruct.hpp> 20 #if BOOST_VERSION >= 104100 21 namespace bpt = boost::property_tree;
22 #else // BOOST_VERSION >= 104100 26 #endif // BOOST_VERSION >= 104100 32 jsonExportEventQueue (stdair::STDAIR_ServicePtr_T& ioSTDAIR_ServicePtr,
33 std::ostream& oStream,
35 const stdair::EventType::EN_EventType& iEventType) {
38 const stdair::EventList_T& lEventList = iEventQueue.
getEventList();
40 #if BOOST_VERSION >= 104100 46 for (stdair::EventList_T::const_iterator itEvent = lEventList.begin();
47 itEvent != lEventList.end(); ++itEvent) {
48 const stdair::EventStruct& lEvent = itEvent->second;
49 const stdair::EventType::EN_EventType& lEventType =
50 lEvent.getEventType();
52 const bool isEventTypeLastValue =
53 (iEventType == stdair::EventType::LAST_VALUE);
54 if (lEventType == iEventType || isEventTypeLastValue ==
true) {
57 const std::string lCurrentEvent =
58 ioSTDAIR_ServicePtr->jsonExportEventObject (lEvent);
63 if (lCurrentEvent.empty () ==
false) {
65 std::istringstream lStrCurrentEvent(lCurrentEvent);
66 read_json (lStrCurrentEvent, ptCurrentEvent);
69 ptEvents.push_back(std::make_pair(
"", ptCurrentEvent));
75 pt.add_child (
"events", ptEvents);
78 write_json (oStream, pt);
80 #endif // BOOST_VERSION >= 104100
const stdair::EventList_T & getEventList() const
Class holding event structures.