StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
BomJSONExport.cpp
Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////
00002 // Import section
00003 // //////////////////////////////////////////////////////////////////////
00004 // STL
00005 #include <cassert>
00006 #include <ostream>
00007 #if BOOST_VERSION >= 103400
00008 // Boost ForEach
00009 #include <boost/foreach.hpp>
00010 #endif // BOOST_VERSION >= 103400
00011 // StdAir
00012 #include <stdair/basic/BasConst_BomDisplay.hpp>
00013 #include <stdair/bom/BomManager.hpp>
00014 #include <stdair/bom/BomRoot.hpp>
00015 #include <stdair/bom/Inventory.hpp>
00016 #include <stdair/bom/FlightDate.hpp>
00017 #include <stdair/bom/LegDate.hpp>
00018 #include <stdair/bom/SegmentDate.hpp>
00019 #include <stdair/bom/LegCabin.hpp>
00020 #include <stdair/bom/SegmentCabin.hpp>
00021 #include <stdair/bom/FareFamily.hpp>
00022 #include <stdair/bom/BookingClass.hpp>
00023 #include <stdair/bom/Bucket.hpp>
00024 #include <stdair/bom/BomJSONExport.hpp>
00025 
00026 namespace stdair {
00027 
00028   // ////////////////////////////////////////////////////////////////////
00029   void BomJSONExport::jsonExport (std::ostream& oStream,
00030                                   const FlightDate& iFlightDate) {
00031 
00032     // Create an empty property tree object
00033     bpt::ptree pt;
00034 
00035 #if BOOST_VERSION >= 104100
00036 
00039     const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
00040     const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
00041     const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
00042 
00043     // Put airline code in property tree
00044     pt.put ("flight_date.airline_code", lAirlineCode);
00045 
00046     // Put flight number level in property tree
00047     pt.put ("flight_date.flight_number", lFlightNumber);
00048 
00049     // Put the flight departure date in property tree
00050     const std::string& lDepartureDateStr =
00051       boost::gregorian::to_simple_string (lFlightDateDate);
00052     pt.put ("flight_date.departure_date", lDepartureDateStr);
00053 #endif // BOOST_VERSION >= 104100
00054 
00055     //
00056     jsonLegDateExport (pt, iFlightDate);
00057 
00058     //
00059     jsonLegCabinExport (pt, iFlightDate);
00060 
00061     //
00062     jsonBucketExport (pt, iFlightDate);
00063 
00064     //
00065     jsonSegmentDateExport (pt, iFlightDate);
00066 
00067     //
00068     jsonSegmentCabinExport (pt, iFlightDate);
00069 
00070     //
00071     jsonFareFamilyExport (pt, iFlightDate);
00072 
00073     //
00074     jsonBookingClassExport (pt, iFlightDate);
00075 
00076 #if BOOST_VERSION >= 104100
00077     // Write the property tree into the JSON stream.
00078     write_json (oStream, pt);
00079 #endif // BOOST_VERSION >= 104100
00080   }
00081 
00082   // ////////////////////////////////////////////////////////////////////
00083   void BomJSONExport::jsonLegDateExport (bpt::ptree& ioPropertyTree,
00084                                          const FlightDate& iFlightDate) {
00089     // Check whether there are LegDate objects
00090     if (BomManager::hasList<LegDate> (iFlightDate) == false) {
00091       return;
00092     }
00093       
00094     // Browse the leg-dates
00095     const LegDateList_T& lLegDateList =
00096       BomManager::getList<LegDate> (iFlightDate);
00097     for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
00098          itLD != lLegDateList.end(); ++itLD) {
00099       const LegDate* lLD_ptr = *itLD;
00100       assert (lLD_ptr != NULL);
00101       
00102 #if BOOST_VERSION >= 104100
00103       
00104       //
00105       bpt::ptree lLegDateArray;
00106 
00107       // Put boarding point in property tree
00108       lLegDateArray.put ("BoardPoint", lLD_ptr->getBoardingPoint());
00109       // Put off point in property tree
00110       lLegDateArray.put ("OffPoint", lLD_ptr->getOffPoint());
00111       // Put boarding date in property tree
00112       lLegDateArray.put ("BoardDate", lLD_ptr->getBoardingDate());
00113       // Put off date in property tree
00114       lLegDateArray.put ("OffDate", lLD_ptr->getOffDate());
00115       // Put boarding time in property tree
00116       lLegDateArray.put ("BoardTime", lLD_ptr->getBoardingTime());
00117       // Put off time in property tree
00118       lLegDateArray.put ("OffTime", lLD_ptr->getOffTime());
00119       // Put elapsed time in property tree
00120       lLegDateArray.put ("Elapsed", lLD_ptr->getElapsedTime());
00121       // Put date offset in property tree
00122       lLegDateArray.put ("Date_Offset", lLD_ptr->getDateOffset());
00123       // Put time offset in property tree
00124       lLegDateArray.put ("Time_Offset", lLD_ptr->getTimeOffset());
00125       // Put distance in property tree
00126       lLegDateArray.put ("Distance", lLD_ptr->getDistance());
00127       // Put capacity in property tree
00128       lLegDateArray.put ("Capacity", lLD_ptr->getCapacity());
00129 
00130       // Put leg date array in property tree
00131       std::ostringstream oStream;
00132       oStream << "flight_date.leg_" << lLD_ptr->getBoardingPoint();
00133       ioPropertyTree.put_child(oStream.str(),lLegDateArray);
00134 
00135 #endif // BOOST_VERSION >= 104100
00136     }
00137   }
00138 
00139   // ////////////////////////////////////////////////////////////////////
00140   void BomJSONExport::jsonLegCabinExport (bpt::ptree& ioPropertyTree,
00141                                           const FlightDate& iFlightDate) {
00146     // Check whether there are LegDate objects
00147     if (BomManager::hasList<LegDate> (iFlightDate) == false) {
00148       return;
00149     }
00150 
00151     const LegDateList_T& lLegDateList =
00152       BomManager::getList<LegDate> (iFlightDate);
00153     for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
00154          itLD != lLegDateList.end(); ++itLD) {
00155       const LegDate* lLD_ptr = *itLD;
00156       assert (lLD_ptr != NULL);
00157       
00158       // Browse the leg-cabins
00159       const LegCabinList_T& lLegCabinList =
00160         BomManager::getList<LegCabin> (*lLD_ptr);
00161       for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
00162            itLC != lLegCabinList.end(); ++itLC) {
00163         const LegCabin* lLC_ptr = *itLC;
00164         assert (lLC_ptr != NULL);
00165       
00166 #if BOOST_VERSION >= 104100
00167 
00168         //
00169         bpt::ptree lLegCabinArray;
00170 
00171         // Put the offered capacity in property tree
00172         lLegCabinArray.put ("OffedCAP", lLC_ptr->getOfferedCapacity());
00173         // Put the physical capacity in property tree
00174         lLegCabinArray.put ("PhyCAP", lLC_ptr->getPhysicalCapacity());
00175         // Put regrade adjustment in property tree
00176         lLegCabinArray.put ("RgdADJ", lLC_ptr->getRegradeAdjustment());
00177         // Put authorization level in property tree
00178         lLegCabinArray.put ("AU", lLC_ptr->getAuthorizationLevel());
00179         // Put UPR in property tree
00180         lLegCabinArray.put ("UPR", lLC_ptr->getUPR());
00181         // Put sold seats in property tree
00182         lLegCabinArray.put ("SS", lLC_ptr->getSoldSeat());
00183         // Put staff nb of seats in property tree
00184         lLegCabinArray.put ("Staff", lLC_ptr->getStaffNbOfSeats());
00185         // Put waiting list nb of seats in property tree
00186         lLegCabinArray.put ("WL", lLC_ptr->getWLNbOfSeats());
00187         // Put group nb of seats in property tree
00188         lLegCabinArray.put ("Group", lLC_ptr->getGroupNbOfSeats());
00189         // Put committed space in property tree
00190         lLegCabinArray.put ("CommSpace", lLC_ptr->getCommittedSpace());
00191         // Put availability pool in property tree
00192         lLegCabinArray.put ("AvPool", lLC_ptr->getAvailabilityPool());
00193         // Put availability in property tree
00194         lLegCabinArray.put ("Avl", lLC_ptr->getAvailability());
00195         // Put net availability in property tree
00196         lLegCabinArray.put ("NAV", lLC_ptr->getNetAvailability());
00197         // Put gross availability in property tree
00198         lLegCabinArray.put ("GAV", lLC_ptr->getGrossAvailability());
00199         // Put avg cancellation percentage in property tree
00200         lLegCabinArray.put ("ACP", lLC_ptr->getAvgCancellationPercentage());
00201         // Put ETB in property tree
00202         lLegCabinArray.put ("ETB", lLC_ptr->getETB());
00203         // Put current bid price in property tree
00204         lLegCabinArray.put ("BidPrice", lLC_ptr->getCurrentBidPrice());
00205       
00206         // Put leg cabin array in property tree
00207         std::ostringstream oStream;
00208         oStream << "flight_date"
00209                 << ".leg_" << lLD_ptr->getBoardingPoint()
00210                 << ".cabin_" << lLC_ptr->toString();
00211         ioPropertyTree.put_child (oStream.str(), lLegCabinArray);
00212 
00213 #endif // BOOST_VERSION >= 104100
00214       }
00215     }
00216   }
00217 
00218   // ////////////////////////////////////////////////////////////////////
00219   void BomJSONExport::jsonBucketExport (bpt::ptree& ioPropertyTree,
00220                                         const FlightDate& iFlightDate) {
00225     // Check whether there are LegDate objects
00226     if (BomManager::hasList<LegDate> (iFlightDate) == false) {
00227       return;
00228     }
00229     
00230     // Browse the leg-dates
00231     const LegDateList_T& lLegDateList =
00232       BomManager::getList<LegDate> (iFlightDate);
00233     for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
00234          itLD != lLegDateList.end(); ++itLD) {
00235       const LegDate* lLD_ptr = *itLD;
00236       assert (lLD_ptr != NULL);
00237 
00238       // Browse the leg-cabins
00239       const LegCabinList_T& lLegCabinList =
00240         BomManager::getList<LegCabin> (*lLD_ptr);
00241       for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
00242            itLC != lLegCabinList.end(); ++itLC) {
00243         const LegCabin* lLC_ptr = *itLC;
00244         assert (lLC_ptr != NULL);
00245 
00246         // Check whether there are bucket objects
00247         if (BomManager::hasList<Bucket> (*lLC_ptr) == false) {
00248           return;
00249         }
00250 
00251         // Browse the buckets
00252         const BucketList_T& lBucketList = BomManager::getList<Bucket> (*lLC_ptr);
00253         for (BucketList_T::const_iterator itBuck = lBucketList.begin();
00254              itBuck != lBucketList.end(); ++itBuck) {
00255           const Bucket* lBucket_ptr = *itBuck;
00256           assert (lBucket_ptr != NULL);
00257 
00258 #if BOOST_VERSION >= 104100
00259           
00260           //
00261           bpt::ptree lLegBucketArray;
00262 
00263           // Put yield in property tree
00264           lLegBucketArray.put ("Yield", lBucket_ptr->getYieldRangeUpperValue());  
00265           // Put seat_index in property tree
00266           lLegBucketArray.put ("SI", lBucket_ptr->getSeatIndex());
00267           // Put sold_seats in property tree
00268           lLegBucketArray.put ("SS", lBucket_ptr->getSoldSeats());
00269           // Put avaibility in property tree
00270           lLegBucketArray.put ("AV", lBucket_ptr->getAvailability());
00271 
00272           // Put bucket array in property tree
00273           std::ostringstream oStream;
00274           oStream << "flight_date"
00275                   << ".leg_" << lLD_ptr->getBoardingPoint()
00276                   << ".cabin_" << lLC_ptr->toString()
00277                   << ".bucket_" << lBucket_ptr->toString();
00278           ioPropertyTree.put_child (oStream.str(),lLegBucketArray);
00279 
00280 #endif // BOOST_VERSION >= 104100
00281         }
00282       }
00283     }
00284   }
00285     
00286   // ////////////////////////////////////////////////////////////////////
00287   void BomJSONExport::jsonSegmentDateExport (bpt::ptree& ioPropertyTree,
00288                                                   const FlightDate& iFlightDate) {
00289 
00294     // Check whether there are SegmentDate objects
00295     if (BomManager::hasList<SegmentDate> (iFlightDate) == false) {
00296       return;
00297     }
00298     
00299     // Browse the segment-dates
00300     unsigned short idx = 0;
00301     const SegmentDateList_T& lSegmentDateList =
00302       BomManager::getList<SegmentDate> (iFlightDate);
00303     for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
00304          itSD != lSegmentDateList.end(); ++itSD, ++idx) {
00305       const SegmentDate* lSD_ptr = *itSD;
00306       assert (lSD_ptr != NULL);
00307       
00308 #if BOOST_VERSION >= 104100
00309       
00310       //
00311       bpt::ptree lSegmentDateArray;
00312       
00313       // Put boarding point in property tree
00314       lSegmentDateArray.put ("BoardPoint", lSD_ptr->getBoardingPoint());
00315       // Put off point in property tree
00316       lSegmentDateArray.put ("OffPoint", lSD_ptr->getOffPoint());
00317       // Put boarding date in property tree
00318       lSegmentDateArray.put ("BoardDate", lSD_ptr->getBoardingDate());
00319       // Put off date in property tree
00320       lSegmentDateArray.put ("OffDate", lSD_ptr->getOffDate());
00321       // Put boarding time in property tree
00322       lSegmentDateArray.put ("BoardTime", lSD_ptr->getBoardingTime());
00323       // Put off time in property tree
00324       lSegmentDateArray.put ("OffTime", lSD_ptr->getOffTime());
00325       // Put elapsed time in property tree
00326       lSegmentDateArray.put ("Elapsed", lSD_ptr->getElapsedTime());
00327       // Put date offset in property tree
00328       lSegmentDateArray.put ("Date_Offset", lSD_ptr->getDateOffset());
00329       // Put time offset in property tree
00330       lSegmentDateArray.put ("Time_Offset", lSD_ptr->getTimeOffset());
00331       // Put distance in property tree
00332       lSegmentDateArray.put ("Distance", lSD_ptr->getDistance());
00333 
00334       // Put segment date array in property tree
00335       std::ostringstream oStream;
00336       oStream << "flight_date.segment_" << lSD_ptr->getBoardingPoint()
00337               << "_" << lSD_ptr->getOffPoint();
00338       ioPropertyTree.put_child(oStream.str(),lSegmentDateArray);
00339       
00340 #endif // BOOST_VERSION >= 104100
00341     } 
00342   }
00343 
00344   // ////////////////////////////////////////////////////////////////////
00345   void BomJSONExport::jsonSegmentCabinExport (bpt::ptree& ioPropertyTree,
00346                                               const FlightDate& iFlightDate) {
00350   }
00351 
00352   // ////////////////////////////////////////////////////////////////////
00353   void BomJSONExport::jsonFareFamilyExport (bpt::ptree& ioPropertyTree,
00354                                             const FlightDate& iFlightDate) {
00359     // Check whether there are SegmentDate objects
00360     if (BomManager::hasList<SegmentDate> (iFlightDate) == false) {
00361       return;
00362     }
00363     
00364     // Browse the segment-dates
00365     unsigned short idx = 0;
00366     const SegmentDateList_T& lSegmentDateList =
00367       BomManager::getList<SegmentDate> (iFlightDate);
00368     for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
00369          itSD != lSegmentDateList.end(); ++itSD, ++idx) {
00370       const SegmentDate* lSD_ptr = *itSD;
00371       assert (lSD_ptr != NULL);
00372       
00373       // Browse the segment-cabins
00374       const SegmentCabinList_T& lSegmentCabinList =
00375         BomManager::getList<SegmentCabin> (*lSD_ptr);
00376       for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
00377            itSC != lSegmentCabinList.end(); ++itSC) {
00378         const SegmentCabin* lSC_ptr = *itSC;
00379         assert (lSC_ptr != NULL);
00380         
00381         // Check whether there are fare family objects
00382         if (BomManager::hasList<FareFamily> (*lSC_ptr) == false) {
00383           continue;
00384         }
00385     
00386         // Browse the fare families
00387         unsigned short ffIdx = 0;
00388         const FareFamilyList_T& lFareFamilyList =
00389           BomManager::getList<FareFamily> (*lSC_ptr);
00390         for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
00391              itFF != lFareFamilyList.end(); ++itFF, ++ffIdx) {
00392           const FareFamily* lFF_ptr = *itFF;
00393           assert (lFF_ptr != NULL);
00394 
00395 #if BOOST_VERSION >= 104100
00396           //
00397           bpt::ptree lFFArray;
00398 
00399           // Put cabin in property tree
00400           lFFArray.put ("cabin",lSC_ptr->toString());
00401           // Put fare family in property tree
00402           lFFArray.put ("code", lFF_ptr->getFamilyCode());
00403           // Put MIN in property tree
00404           lFFArray.put ("MIN", lSC_ptr->getMIN());
00405           // Put UPR in property tree
00406           lFFArray.put ("UPR", lSC_ptr->getUPR());
00407           // Put committed Ssace in property tree
00408           lFFArray.put ("CommSpace", lSC_ptr->getCommittedSpace());
00409           // Put availability pool in property tree
00410           lFFArray.put ("AvPool", lSC_ptr->getAvailabilityPool());
00411           // Put current bid price in property tree
00412           lFFArray.put ("BP", lSC_ptr->getCurrentBidPrice());
00413 
00414           std::ostringstream oStream;
00415           oStream << "flight_date.segment_" << lSD_ptr->getBoardingPoint()
00416                   << "_" << lSD_ptr->getOffPoint()
00417                   << ".fare_family_" << lFF_ptr->toString();
00418           ioPropertyTree.put_child (oStream.str(), lFFArray);
00419 #endif // BOOST_VERSION >= 104100
00420         }
00421       }
00422     }
00423   }
00424     
00425   // ////////////////////////////////////////////////////////////////////
00426   void BomJSONExport::jsonBookingClassExport (bpt::ptree& ioPropertyTree,
00427                                               const BookingClass& iBookingClass,
00428                                               const std::string& iLeadingString) {
00435     std::ostringstream oStream;
00436     oStream << iLeadingString;
00437     oStream << ".class_" << iBookingClass.toString();
00438 
00439 #if BOOST_VERSION >= 104100
00440 
00441     bpt::ptree lBookingClassArray;
00442     
00443     // Put sub class in property tree
00444     lBookingClassArray.put ("Subclass", iBookingClass.getSubclassCode());
00445     // Put authorization level in property tree
00446     std::ostringstream oAUProtStr;
00447     oAUProtStr << iBookingClass.getAuthorizationLevel()
00448                << " (" << iBookingClass.getProtection()
00449                << ") ";
00450     lBookingClassArray.put ("MIN/AU (Prot)", oAUProtStr.str());
00451     // Put negotiated space in property tree
00452     lBookingClassArray.put ("Nego", iBookingClass.getNegotiatedSpace());
00453     // Put no show percentage in property tree
00454     lBookingClassArray.put ("NS%", iBookingClass.getNoShowPercentage());
00455     // Put cancellation percentage in property tree
00456     lBookingClassArray.put ("OB%", iBookingClass.getCancellationPercentage());
00457     // Put sub nb of bookings in property tree
00458     lBookingClassArray.put ("Bkgs", iBookingClass.getNbOfBookings());
00459     // Put nb of group bookings in property tree
00460     lBookingClassArray.put ("GrpBks (pdg)", iBookingClass.getNbOfGroupBookings());
00461     // Put nb of staff bookings in property tree
00462     lBookingClassArray.put ("StfBkgs", iBookingClass.getNbOfStaffBookings());
00463     // Put nb of WL bookings in property tree
00464     lBookingClassArray.put ("WLBkgs", iBookingClass.getNbOfWLBookings());
00465     // Put ETB in property tree
00466     lBookingClassArray.put ("ETB", iBookingClass.getETB());
00467     // Put net class availability in property tree
00468     lBookingClassArray.put ("ClassAvl", iBookingClass.getNetClassAvailability());
00469     // Put segment availability in property tree
00470     lBookingClassArray.put ("SegAvl", iBookingClass.getSegmentAvailability());
00471     // Put net revenue availability in property tree
00472     lBookingClassArray.put ("RevAvl", iBookingClass.getNetRevenueAvailability());
00473 
00474     //
00475     ioPropertyTree.put_child (oStream.str(), lBookingClassArray);
00476       
00477 #endif // BOOST_VERSION >= 104100
00478   }
00479 
00480   // ////////////////////////////////////////////////////////////////////
00481   void BomJSONExport::jsonBookingClassExport (bpt::ptree& ioPropertyTree,
00482                                               const FlightDate& iFlightDate) {
00483     // Check whether there are SegmentDate objects
00484     if (BomManager::hasList<SegmentDate> (iFlightDate) == false) {
00485       return;
00486     }
00487     
00488     // Browse the segment-dates
00489     const SegmentDateList_T& lSegmentDateList =
00490       BomManager::getList<SegmentDate> (iFlightDate);
00491     for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
00492          itSD != lSegmentDateList.end(); ++itSD) {
00493       const SegmentDate* lSD_ptr = *itSD;
00494       assert (lSD_ptr != NULL);
00495 
00496       // Build the leading string to be displayed
00497       std::ostringstream oLeadingStr;
00498       // Begin completed the leading string to be displayed
00499       oLeadingStr << "flight_date.segment_" << lSD_ptr->getBoardingPoint()
00500                   << "_" << lSD_ptr->getOffPoint();
00501       
00502       // Browse the segment-cabins
00503       const SegmentCabinList_T& lSegmentCabinList =
00504         BomManager::getList<SegmentCabin> (*lSD_ptr);
00505       for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
00506            itSC != lSegmentCabinList.end(); ++itSC) {
00507         const SegmentCabin* lSC_ptr = *itSC;
00508         assert (lSC_ptr != NULL);
00509 
00510         // Check whether there are FareFamily objects
00511         if (BomManager::hasList<FareFamily> (*lSC_ptr) == true) {
00512 
00513           // Browse the fare families
00514           const FareFamilyList_T& lFareFamilyList =
00515             BomManager::getList<FareFamily> (*lSC_ptr);
00516           for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
00517                itFF != lFareFamilyList.end(); ++itFF) {
00518             const FareFamily* lFF_ptr = *itFF;
00519             assert (lFF_ptr != NULL);
00520             
00521             oLeadingStr << ".fare_family_" << lFF_ptr->toString();
00522             
00523             // Browse the booking-classes
00524             const BookingClassList_T& lBookingClassList =
00525               BomManager::getList<BookingClass> (*lFF_ptr);
00526             for (BookingClassList_T::const_iterator itBC =
00527                    lBookingClassList.begin();
00528                  itBC != lBookingClassList.end(); ++itBC) {
00529               const BookingClass* lBC_ptr = *itBC;
00530               assert (lBC_ptr != NULL);
00531 
00532               //
00533               jsonBookingClassExport (ioPropertyTree, *lBC_ptr,
00534                                       oLeadingStr.str());
00535             }
00536           }
00537         } else {
00538 
00539           // The fare family code is a fake one ('NoFF'), and therefore
00540           // does not vary
00541           FamilyCode_T lDefaultFamilyCode ("NoFF");
00542           oLeadingStr << ".fare_family_" << lDefaultFamilyCode ;
00543 
00544           // Browse the booking-classes, directly from the segment-cabin object
00545           const BookingClassList_T& lBookingClassList =
00546             BomManager::getList<BookingClass> (*lSC_ptr);
00547           for (BookingClassList_T::const_iterator itBC =
00548                  lBookingClassList.begin();
00549                itBC != lBookingClassList.end(); ++itBC) {
00550             const BookingClass* lBC_ptr = *itBC;
00551             assert (lBC_ptr != NULL);
00552 
00553             //
00554             jsonBookingClassExport (ioPropertyTree, *lBC_ptr, oLeadingStr.str());
00555           }
00556         }
00557       }
00558     }
00559   }
00560 }