46 FlagSaver (std::ostream& oStream)
47 : _oStream (oStream), _streamFlags (oStream.flags()) {
53 _oStream.flags (_streamFlags);
58 std::ostream& _oStream;
60 std::ios::fmtflags _streamFlags;
68 FlagSaver flagSaver (oStream);
71 if (BomManager::hasList<Inventory> (iBomRoot) ==
false) {
76 unsigned short invIdx = 1;
78 BomManager::getList<Inventory> (iBomRoot);
79 for (InventoryList_T::const_iterator itInv = lInventoryList.begin();
80 itInv != lInventoryList.end(); ++itInv, ++invIdx) {
81 const Inventory* lInv_ptr = *itInv;
82 assert (lInv_ptr != NULL);
85 const AirlineCode_T& lAirlineCode = lInv_ptr->getAirlineCode();
88 if (iAirlineCode ==
"all" || iAirlineCode == lAirlineCode) {
90 list (oStream, *lInv_ptr, invIdx, iFlightNumber);
97 const unsigned short iInventoryIndex,
100 FlagSaver flagSaver (oStream);
103 if (BomManager::hasMap<FlightDate> (iInventory) ==
false) {
116 const AirlineCode_T& lAirlineCode = iInventory.getAirlineCode();
117 oStream << iInventoryIndex <<
". " << lAirlineCode << std::endl;
120 unsigned short lCurrentFlightNumber = 0;
121 unsigned short flightNumberIdx = 0;
122 unsigned short departureDateIdx = 1;
124 BomManager::getMap<FlightDate> (iInventory);
125 for (FlightDateMap_T::const_iterator itFD = lFlightDateList.begin();
126 itFD != lFlightDateList.end(); ++itFD, ++departureDateIdx) {
127 const FlightDate* lFD_ptr = itFD->second;
128 assert (lFD_ptr != NULL);
132 const Date_T& lFlightDateDate = lFD_ptr->getDepartureDate();
135 if (iFlightNumber == 0 || iFlightNumber == lFlightNumber) {
137 if (lCurrentFlightNumber != lFlightNumber) {
138 lCurrentFlightNumber = lFlightNumber;
139 ++flightNumberIdx; departureDateIdx = 1;
140 oStream <<
" " << iInventoryIndex <<
"." << flightNumberIdx <<
". "
141 << lAirlineCode << lFlightNumber << std::endl;
144 oStream <<
" " << iInventoryIndex <<
"." << flightNumberIdx
145 <<
"." << departureDateIdx <<
". "
146 << lAirlineCode << lFlightNumber <<
" / " << lFlightDateDate
154 const BomRoot& iBomRoot) {
156 FlagSaver flagSaver (oStream);
159 if (BomManager::hasList<AirportPair> (iBomRoot) ==
false) {
164 BomManager::getList<AirportPair> (iBomRoot);
165 for (AirportPairList_T::const_iterator itAir = lAirportPairList.begin();
166 itAir != lAirportPairList.end(); ++itAir ) {
167 const AirportPair* lAir_ptr = *itAir;
168 assert (lAir_ptr != NULL);
171 assert (BomManager::hasList<DatePeriod> (*lAir_ptr) ==
true);
175 BomManager::getList<DatePeriod> (*lAir_ptr);
177 for (DatePeriodList_T::const_iterator itDP = lDatePeriodList.begin();
178 itDP != lDatePeriodList.end(); ++itDP) {
179 const DatePeriod* lDP_ptr = *itDP;
180 assert (lDP_ptr != NULL);
183 oStream << lAir_ptr->describeKey()
184 <<
" / " << lDP_ptr->describeKey() << std::endl;
192 const BomRoot& iBomRoot) {
194 FlagSaver flagSaver (oStream);
199 oStream << std::endl;
200 oStream <<
"==============================================================="
202 oStream <<
"BomRoot: " << iBomRoot.describeKey() << std::endl;
203 oStream <<
"==============================================================="
207 if (BomManager::hasList<Inventory> (iBomRoot) ==
false) {
213 BomManager::getList<Inventory> (iBomRoot);
214 for (InventoryList_T::const_iterator itInv = lInventoryList.begin();
215 itInv != lInventoryList.end(); ++itInv) {
216 const Inventory* lInv_ptr = *itInv;
217 assert (lInv_ptr != NULL);
226 const Inventory& iInventory) {
228 FlagSaver flagSaver (oStream);
233 oStream <<
"+++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
234 oStream <<
"Inventory: " << iInventory.describeKey() << std::endl;
235 oStream <<
"+++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
238 if (BomManager::hasList<FlightDate> (iInventory) ==
false) {
244 BomManager::getList<FlightDate> (iInventory);
245 for (FlightDateList_T::const_iterator itFD = lFlightDateList.begin();
246 itFD != lFlightDateList.end(); ++itFD) {
247 const FlightDate* lFD_ptr = *itFD;
248 assert (lFD_ptr != NULL);
256 if (BomManager::hasList<Inventory> (iInventory)){
260 BomManager::getList<Inventory> (iInventory);
262 for (InventoryList_T::const_iterator itInv = lPartnerInventoryList.begin();
263 itInv != lPartnerInventoryList.end(); ++itInv) {
265 oStream <<
"-------------------------------------------------" << std::endl;
266 oStream <<
"Partner inventory:" << std::endl;
267 oStream <<
"-------------------------------------------------" << std::endl;
268 const Inventory* lInv_ptr = *itInv;
269 assert (lInv_ptr != NULL);
274 oStream <<
"******************************************" << std::endl;
275 oStream << std::endl;
280 if (BomManager::hasList<OnDDate> (iInventory)){
284 BomManager::getList<OnDDate> (iInventory);
286 for (OnDDateList_T::const_iterator itOnD = lOnDDateList.begin();
287 itOnD != lOnDDateList.end(); ++itOnD) {
288 oStream <<
"******************************************" << std::endl;
289 oStream <<
"O&D-Date:" << std::endl;
290 oStream <<
"----------" << std::endl;
291 oStream <<
"Airline, Date, Origin-Destination, Segments, " << std::endl;
293 const OnDDate* lOnDDate_ptr = *itOnD;
294 assert (lOnDDate_ptr != NULL);
299 oStream <<
"******************************************" << std::endl;
305 const OnDDate& iOnDDate) {
307 FlagSaver flagSaver (oStream);
312 const AirlineCode_T& lAirlineCode = iOnDDate.getAirlineCode();
313 const Date_T& lDate = iOnDDate.getDate();
315 const AirportCode_T& lDestination = iOnDDate.getDestination();
317 oStream << lAirlineCode <<
", " << lDate <<
", "<< lOrigin <<
"-"
318 << lDestination <<
", " << iOnDDate.describeKey() <<
", "
322 iOnDDate.getDemandInfoMap();
325 const bool isInfoMapEmpty = lDemandInfoMap.empty();
326 if (isInfoMapEmpty) {
329 assert (lDemandInfoMap.empty() ==
false);
331 oStream <<
"----------" << std::endl;
332 oStream <<
"Cabin-Class path, Demand mean, Demand std dev, Yield, "
335 for (StringDemandStructMap_T::const_iterator itDI = lDemandInfoMap.begin();
336 itDI != lDemandInfoMap.end(); ++itDI) {
338 const std::string& lCabinClassPath = itDI->first;
341 const Yield_T lYield = lYieldDemandPair.first;
343 lYieldDemandPair.second;
344 const MeanValue_T lDemandMean = lMeanStdDevPair.first;
347 oStream << lCabinClassPath <<
", "
348 << lDemandMean <<
", "
349 << lDemandStdDev <<
", "
358 const FlightDate& iFlightDate) {
360 FlagSaver flagSaver (oStream);
365 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
366 oStream <<
"******************************************" << std::endl;
367 oStream <<
"FlightDate: " << lAirlineCode << iFlightDate.describeKey()
369 oStream <<
"******************************************" << std::endl;
391 const FlightDate& iFlightDate) {
393 FlagSaver flagSaver (oStream);
400 oStream <<
"******************************************" << std::endl;
401 oStream <<
"Leg-Dates:" << std::endl
402 <<
"----------" << std::endl;
403 oStream <<
"Flight, Leg, BoardDate, BoardTime, "
404 <<
"OffDate, OffTime, Date Offset, Time Offset, Elapsed, "
405 <<
"Distance, Capacity, " << std::endl;
408 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
409 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
410 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
413 if (BomManager::hasList<LegDate> (iFlightDate) ==
false) {
419 BomManager::getList<LegDate> (iFlightDate);
420 for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
421 itLD != lLegDateList.end(); ++itLD) {
422 const LegDate* lLD_ptr = *itLD;
423 assert (lLD_ptr != NULL);
425 oStream << lAirlineCode << lFlightNumber <<
" "
426 << lFlightDateDate <<
", ";
428 oStream << lLD_ptr->getBoardingPoint() <<
"-"
429 << lLD_ptr->getOffPoint() <<
", "
430 << lLD_ptr->getBoardingDate() <<
", "
431 << lLD_ptr->getBoardingTime() <<
", "
432 << lLD_ptr->getOffDate() <<
", "
433 << lLD_ptr->getOffTime() <<
", "
434 << lLD_ptr->getElapsedTime() <<
", "
435 << lLD_ptr->getDateOffset().days() <<
", "
436 << lLD_ptr->getTimeOffset() <<
", "
437 << lLD_ptr->getDistance() <<
", "
438 << lLD_ptr->getCapacity() <<
", " << std::endl;
440 oStream <<
"******************************************" << std::endl;
445 const FlightDate& iFlightDate) {
447 FlagSaver flagSaver (oStream);
452 oStream <<
"******************************************" << std::endl;
453 oStream <<
"SegmentDates:" << std::endl
454 <<
"----------" << std::endl;
455 oStream <<
"Flight, Segment, Date"
459 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
460 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
461 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
464 if (BomManager::hasList<SegmentDate> (iFlightDate) ==
false) {
470 BomManager::getList<SegmentDate> (iFlightDate);
471 for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
472 itSD != lSegmentDateList.end(); ++itSD) {
473 const SegmentDate* lSD_ptr = *itSD;
474 assert (lSD_ptr != NULL);
477 const Date_T& lSegmentDateDate = lSD_ptr->getBoardingDate();
478 const AirportCode_T& lBoardPoint = lSD_ptr->getBoardingPoint();
480 oStream << lAirlineCode << lFlightNumber <<
" " << lFlightDateDate <<
", "
481 << lBoardPoint <<
"-" << lOffPoint <<
", " << lSegmentDateDate << std::endl;
484 const bool hasMarketingSDList = BomManager::hasList<SegmentDate>(*lSD_ptr);
485 if (hasMarketingSDList ==
true) {
487 const SegmentDateList_T& lMarketingSDList = BomManager::getList<SegmentDate>(*lSD_ptr);
489 oStream <<
" *** Marketed by ";
490 for (SegmentDateList_T::const_iterator itMarketingSD = lMarketingSDList.begin();
491 itMarketingSD != lMarketingSDList.end(); ++itMarketingSD) {
492 SegmentDate* lMarketingSD_ptr = *itMarketingSD;
493 FlightDate* lMarketingFD_ptr = BomManager::getParentPtr<FlightDate>(*lMarketingSD_ptr);
494 Inventory* lMarketingInv_ptr = BomManager::getParentPtr<Inventory>(*lMarketingFD_ptr);
495 oStream << lMarketingInv_ptr->toString() << lMarketingFD_ptr->toString() <<
" * ";
500 const SegmentDate* lOperatingSD_ptr = lSD_ptr->getOperatingSegmentDate ();
501 if (lOperatingSD_ptr != NULL) {
503 const FlightDate* lOperatingFD_ptr = BomManager::getParentPtr<FlightDate>(*lOperatingSD_ptr);
504 const Inventory* lOperatingInv_ptr = BomManager::getParentPtr<Inventory>(*lOperatingFD_ptr);
505 oStream <<
" *** Operated by " << lOperatingInv_ptr->toString()
506 << lOperatingFD_ptr->toString() << std::endl;
509 oStream << std::endl;
515 const FlightDate& iFlightDate) {
517 FlagSaver flagSaver (oStream);
522 oStream <<
"******************************************" << std::endl;
523 oStream <<
"LegCabins:" << std::endl
524 <<
"----------" << std::endl;
525 oStream <<
"Flight, Leg, Cabin, "
526 <<
"OffedCAP, PhyCAP, RgdADJ, AU, UPR, SS, Staff, WL, Group, "
527 <<
"CommSpace, AvPool, Avl, NAV, GAV, ACP, ETB, BidPrice, "
531 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
532 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
533 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
536 if (BomManager::hasList<LegDate> (iFlightDate) ==
false) {
542 BomManager::getList<LegDate> (iFlightDate);
543 for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
544 itLD != lLegDateList.end(); ++itLD) {
545 const LegDate* lLD_ptr = *itLD;
546 assert (lLD_ptr != NULL);
549 const Date_T& lLegDateDate = lLD_ptr->getBoardingDate();
550 const AirportCode_T& lBoardPoint = lLD_ptr->getBoardingPoint();
555 BomManager::getList<LegCabin> (*lLD_ptr);
556 for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
557 itLC != lLegCabinList.end(); ++itLC) {
558 const LegCabin* lLC_ptr = *itLC;
559 assert (lLC_ptr != NULL);
561 oStream << lAirlineCode << lFlightNumber <<
" "
562 << lFlightDateDate <<
", ";
564 oStream << lBoardPoint <<
"-" << lOffPoint
565 <<
" " << lLegDateDate <<
", ";
567 oStream << lLC_ptr->getCabinCode() <<
", ";
569 oStream << lLC_ptr->getOfferedCapacity() <<
", "
570 << lLC_ptr->getPhysicalCapacity() <<
", "
571 << lLC_ptr->getRegradeAdjustment() <<
", "
572 << lLC_ptr->getAuthorizationLevel() <<
", "
573 << lLC_ptr->getUPR() <<
", "
574 << lLC_ptr->getSoldSeat() <<
", "
575 << lLC_ptr->getStaffNbOfSeats() <<
", "
576 << lLC_ptr->getWLNbOfSeats() <<
", "
577 << lLC_ptr->getGroupNbOfSeats() <<
", "
578 << lLC_ptr->getCommittedSpace() <<
", "
579 << lLC_ptr->getAvailabilityPool() <<
", "
580 << lLC_ptr->getAvailability() <<
", "
581 << lLC_ptr->getNetAvailability() <<
", "
582 << lLC_ptr->getGrossAvailability() <<
", "
583 << lLC_ptr->getAvgCancellationPercentage() <<
", "
584 << lLC_ptr->getETB() <<
", "
585 << lLC_ptr->getCurrentBidPrice() <<
", "
589 oStream <<
"******************************************" << std::endl;
594 const FlightDate& iFlightDate) {
596 FlagSaver flagSaver (oStream);
605 const FlightDate& iFlightDate) {
607 FlagSaver flagSaver (oStream);
613 oStream <<
"******************************************" << std::endl;
614 oStream <<
"SegmentCabins:" << std::endl
615 <<
"--------------" << std::endl;
616 oStream <<
"Flight, Segment, Cabin, FF, Bkgs, MIN, UPR, "
617 <<
"CommSpace, AvPool, BP, " << std::endl;
620 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
621 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
622 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
625 if (BomManager::hasList<SegmentDate> (iFlightDate) ==
false) {
631 BomManager::getList<SegmentDate> (iFlightDate);
632 for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
633 itSD != lSegmentDateList.end(); ++itSD) {
634 const SegmentDate* lSD_ptr = *itSD;
635 assert (lSD_ptr != NULL);
638 const Date_T& lSegmentDateDate = lSD_ptr->getBoardingDate();
639 const AirportCode_T& lBoardPoint = lSD_ptr->getBoardingPoint();
644 BomManager::getList<SegmentCabin> (*lSD_ptr);
645 for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
646 itSC != lSegmentCabinList.end(); ++itSC) {
647 const SegmentCabin* lSC_ptr = *itSC;
648 assert (lSC_ptr != NULL);
651 const CabinCode_T& lCabinCode = lSC_ptr->getCabinCode();
654 if (BomManager::hasList<FareFamily> (*lSC_ptr) ==
false) {
660 BomManager::getList<FareFamily> (*lSC_ptr);
661 for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
662 itFF != lFareFamilyList.end(); ++itFF) {
663 const FareFamily* lFF_ptr = *itFF;
664 assert (lFF_ptr != NULL);
666 oStream << lAirlineCode << lFlightNumber <<
" "
667 << lFlightDateDate <<
", ";
669 oStream << lBoardPoint <<
"-" << lOffPoint <<
" "
670 << lSegmentDateDate <<
", ";
672 oStream << lCabinCode <<
", " << lFF_ptr->getFamilyCode() <<
", ";
674 oStream << lSC_ptr->getBookingCounter() <<
", "
675 << lSC_ptr->getMIN() <<
", "
676 << lSC_ptr->getUPR() <<
", "
677 << lSC_ptr->getCommittedSpace() <<
", "
678 << lSC_ptr->getAvailabilityPool() <<
", "
679 << lSC_ptr->getCurrentBidPrice() <<
", "
684 oStream <<
"******************************************" << std::endl;
689 const FlightDate& iFlightDate) {
691 FlagSaver flagSaver (oStream);
696 oStream <<
"******************************************" << std::endl;
697 oStream <<
"Buckets:" << std::endl
698 <<
"--------" << std::endl;
699 oStream <<
"Flight, Leg, Cabin, Yield, AU/SI, SS, AV, "
703 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
704 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
705 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
708 if (BomManager::hasList<LegDate> (iFlightDate) ==
false) {
714 BomManager::getList<LegDate> (iFlightDate);
715 for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
716 itLD != lLegDateList.end(); ++itLD) {
717 const LegDate* lLD_ptr = *itLD;
718 assert (lLD_ptr != NULL);
721 const Date_T& lLegDateDate = lLD_ptr->getBoardingDate();
722 const AirportCode_T& lBoardPoint = lLD_ptr->getBoardingPoint();
727 BomManager::getList<LegCabin> (*lLD_ptr);
728 for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
729 itLC != lLegCabinList.end(); ++itLC) {
730 const LegCabin* lLC_ptr = *itLC;
731 assert (lLC_ptr != NULL);
734 if (BomManager::hasList<Bucket> (*lLC_ptr) ==
false) {
739 const CabinCode_T& lCabinCode = lLC_ptr->getCabinCode();
742 const BucketList_T& lBucketList = BomManager::getList<Bucket> (*lLC_ptr);
743 for (BucketList_T::const_iterator itBuck = lBucketList.begin();
744 itBuck != lBucketList.end(); ++itBuck) {
745 const Bucket* lBucket_ptr = *itBuck;
746 assert (lBucket_ptr != NULL);
748 oStream << lAirlineCode << lFlightNumber <<
" "
749 << lFlightDateDate <<
", ";
751 oStream << lBoardPoint <<
"-" << lOffPoint <<
" "
752 << lLegDateDate <<
", " << lCabinCode <<
", ";
754 oStream << lBucket_ptr->getYieldRangeUpperValue() <<
", "
755 << lBucket_ptr->getSeatIndex() <<
", "
756 << lBucket_ptr->getSoldSeats() <<
", "
757 << lBucket_ptr->getAvailability() <<
", ";
758 oStream << std::endl;
762 oStream <<
"******************************************" << std::endl;
767 const BookingClass& iBookingClass,
768 const std::string& iLeadingString) {
770 FlagSaver flagSaver (oStream);
778 oStream << iLeadingString << iBookingClass.getClassCode();
780 if (iBookingClass.getSubclassCode() == 0) {
783 oStream << iBookingClass.getSubclassCode() <<
", ";
785 oStream << iBookingClass.getAuthorizationLevel() <<
" ("
786 << iBookingClass.getProtection() <<
"), "
787 << iBookingClass.getNegotiatedSpace() <<
", "
788 << iBookingClass.getNoShowPercentage() <<
", "
789 << iBookingClass.getCancellationPercentage() <<
", "
790 << iBookingClass.getNbOfBookings() <<
", "
791 << iBookingClass.getNbOfGroupBookings() <<
" ("
792 << iBookingClass.getNbOfPendingGroupBookings() <<
"), "
793 << iBookingClass.getNbOfStaffBookings() <<
", "
794 << iBookingClass.getNbOfWLBookings() <<
", "
795 << iBookingClass.getETB() <<
", "
796 << iBookingClass.getNetClassAvailability() <<
", "
797 << iBookingClass.getNetRevenueAvailability() <<
", "
798 << iBookingClass.getSegmentAvailability() <<
", "
804 const FlightDate& iFlightDate) {
806 FlagSaver flagSaver (oStream);
809 oStream <<
"******************************************" << std::endl;
810 oStream <<
"Subclasses:" << std::endl
811 <<
"-----------" << std::endl;
812 oStream <<
"Flight, Segment, Cabin, FF, Subclass, MIN/AU (Prot), "
813 <<
"Nego, NS%, OB%, "
814 <<
"Bkgs, GrpBks (pdg), StfBkgs, WLBkgs, ETB, "
815 <<
"ClassAvl, RevAvl, SegAvl, "
819 const AirlineCode_T& lAirlineCode = iFlightDate.getAirlineCode();
820 const FlightNumber_T& lFlightNumber = iFlightDate.getFlightNumber();
821 const Date_T& lFlightDateDate = iFlightDate.getDepartureDate();
824 if (BomManager::hasList<SegmentDate> (iFlightDate) ==
false) {
830 BomManager::getList<SegmentDate> (iFlightDate);
831 for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
832 itSD != lSegmentDateList.end(); ++itSD) {
833 const SegmentDate* lSD_ptr = *itSD;
834 assert (lSD_ptr != NULL);
837 const Date_T& lSegmentDateDate = lSD_ptr->getBoardingDate();
838 const AirportCode_T& lBoardPoint = lSD_ptr->getBoardingPoint();
843 BomManager::getList<SegmentCabin> (*lSD_ptr);
844 for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
845 itSC != lSegmentCabinList.end(); ++itSC) {
846 const SegmentCabin* lSC_ptr = *itSC;
847 assert (lSC_ptr != NULL);
850 const CabinCode_T& lCabinCode = lSC_ptr->getCabinCode();
853 std::ostringstream oSCLeadingStr;
854 oSCLeadingStr << lAirlineCode << lFlightNumber <<
" "
855 << lFlightDateDate <<
", "
856 << lBoardPoint <<
"-" << lOffPoint <<
" "
857 << lSegmentDateDate <<
", "
858 << lCabinCode <<
", ";
864 if (BomManager::hasList<FareFamily> (*lSC_ptr) ==
true) {
868 BomManager::getList<FareFamily> (*lSC_ptr);
869 for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
870 itFF != lFareFamilyList.end(); ++itFF) {
871 const FareFamily* lFF_ptr = *itFF;
872 assert (lFF_ptr != NULL);
875 lFamilyCode = lFF_ptr->getFamilyCode();
878 std::ostringstream oFFLeadingStr;
879 oFFLeadingStr << oSCLeadingStr.str() << lFamilyCode <<
", ";
883 BomManager::getList<BookingClass> (*lFF_ptr);
884 for (BookingClassList_T::const_iterator itBC =
885 lBookingClassList.begin();
886 itBC != lBookingClassList.end(); ++itBC) {
887 const BookingClass* lBC_ptr = *itBC;
888 assert (lBC_ptr != NULL);
898 assert (BomManager::hasList<FareFamily> (*lSC_ptr) ==
false);
902 std::ostringstream oFFLeadingStr;
903 oFFLeadingStr << oSCLeadingStr.str() << lFamilyCode <<
", ";
907 BomManager::getList<BookingClass> (*lSC_ptr);
908 for (BookingClassList_T::const_iterator itBC =
909 lBookingClassList.begin();
910 itBC != lBookingClassList.end(); ++itBC) {
911 const BookingClass* lBC_ptr = *itBC;
912 assert (lBC_ptr != NULL);
919 oStream <<
"******************************************" << std::endl;
928 FlagSaver flagSaver (oStream);
930 oStream <<
"Travel solutions:";
931 unsigned short idx = 0;
932 for (TravelSolutionList_T::const_iterator itTS =
933 iTravelSolutionList.begin();
934 itTS != iTravelSolutionList.end(); ++itTS, ++idx) {
935 const TravelSolutionStruct& lTS = *itTS;
937 oStream << std::endl;
938 oStream <<
" [" << idx <<
"] " << lTS.display();
948 FlagSaver flagSaver (oStream);
951 for (DatePeriodList_T::const_iterator itDP = iDatePeriodList.begin();
952 itDP != iDatePeriodList.end(); ++itDP) {
953 const DatePeriod* lDP_ptr = *itDP;
954 assert (lDP_ptr != NULL);
963 const BomRoot& iBomRoot) {
965 FlagSaver flagSaver (oStream);
970 oStream << std::endl;
971 oStream <<
"==============================================================="
973 oStream <<
"BomRoot: " << iBomRoot.describeKey() << std::endl;
974 oStream <<
"==============================================================="
978 if (BomManager::hasList<AirportPair> (iBomRoot) ==
false) {
984 BomManager::getList<AirportPair> (iBomRoot);
985 for (AirportPairList_T::const_iterator itAir = lAirportPairList.begin();
986 itAir != lAirportPairList.end(); ++itAir ) {
987 const AirportPair* lAir_ptr = *itAir;
988 assert (lAir_ptr != NULL);
997 const AirportPair& iAirportPair) {
999 FlagSaver flagSaver (oStream);
1004 oStream <<
"+++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
1005 oStream <<
"AirportPair: " << iAirportPair.describeKey() << std::endl;
1006 oStream <<
"+++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
1009 if (BomManager::hasList<DatePeriod> (iAirportPair) ==
false) {
1015 BomManager::getList<DatePeriod> (iAirportPair);
1016 for (DatePeriodList_T::const_iterator itDP = lDatePeriodList.begin();
1017 itDP != lDatePeriodList.end(); ++itDP) {
1018 const DatePeriod* lDP_ptr = *itDP;
1019 assert (lDP_ptr != NULL);
1028 const DatePeriod& iDatePeriod) {
1031 FlagSaver flagSaver (oStream);
1036 oStream <<
"------------------------------------------" << std::endl;
1037 oStream <<
"DatePeriod: " << iDatePeriod.describeKey() << std::endl;
1038 oStream <<
"------------------------------------------" << std::endl;
1041 if (BomManager::hasList<PosChannel> (iDatePeriod) ==
false) {
1047 BomManager::getList<PosChannel> (iDatePeriod);
1048 for (PosChannelList_T::const_iterator itPC = lPosChannelList.begin();
1049 itPC != lPosChannelList.end(); ++itPC) {
1050 const PosChannel* lPC_ptr = *itPC;
1051 assert (lPC_ptr != NULL);
1060 const PosChannel& iPosChannel) {
1062 FlagSaver flagSaver (oStream);
1067 oStream <<
"******************************************" << std::endl;
1068 oStream <<
"PosChannel: " << iPosChannel.describeKey() << std::endl;
1069 oStream <<
"******************************************" << std::endl;
1072 if (BomManager::hasList<TimePeriod> (iPosChannel) ==
false) {
1078 BomManager::getList<TimePeriod> (iPosChannel);
1079 for (TimePeriodList_T::const_iterator itTP = lTimePeriodList.begin();
1080 itTP != lTimePeriodList.end(); ++itTP) {
1081 const TimePeriod* lTP_ptr = *itTP;
1082 assert (lTP_ptr != NULL);
1091 const TimePeriod& iTimePeriod) {
1094 FlagSaver flagSaver (oStream);
1099 oStream <<
"----------------------------------------" << std::endl;
1100 oStream <<
"TimePeriod: " << iTimePeriod.describeKey() << std::endl;
1101 oStream <<
"----------------------------------------" << std::endl;
1106 csvFeatureListDisplay<FareFeatures> (oStream, iTimePeriod);
1107 csvFeatureListDisplay<YieldFeatures> (oStream, iTimePeriod);
1111 template <
typename FEATURE_TYPE>
1113 const TimePeriod& iTimePeriod) {
1116 if (BomManager::hasList<FEATURE_TYPE> (iTimePeriod) ==
false) {
1121 typedef typename BomHolder<FEATURE_TYPE>::BomList_T FeaturesList_T;
1122 const FeaturesList_T& lFeaturesList =
1123 BomManager::getList<FEATURE_TYPE> (iTimePeriod);
1124 for (
typename FeaturesList_T::const_iterator itFF = lFeaturesList.begin();
1125 itFF != lFeaturesList.end(); ++itFF) {
1126 const FEATURE_TYPE* lFF_ptr = *itFF;
1127 assert (lFF_ptr != NULL);
1135 template <
typename FEATURE_TYPE>
1137 const FEATURE_TYPE& iFeatures) {
1139 FlagSaver flagSaver (oStream);
1144 oStream <<
"--------------------------------------" << std::endl;
1145 oStream <<
"Fare/yield-Features: " << iFeatures.describeKey() << std::endl;
1146 oStream <<
"--------------------------------------" << std::endl;
1149 if (BomManager::hasList<AirlineClassList> (iFeatures) ==
false) {
1155 BomManager::getList<AirlineClassList> (iFeatures);
1156 for (AirlineClassListList_T::const_iterator itACL =
1157 lAirlineClassListList.begin();
1158 itACL != lAirlineClassListList.end(); ++itACL) {
1159 const AirlineClassList* lACL_ptr = *itACL;
1160 assert (lACL_ptr != NULL);
1170 const AirlineClassList& iAirlineClassList) {
1172 FlagSaver flagSaver (oStream);
1177 oStream <<
"------------------------------------" << std::endl;
1178 oStream <<
"AirlineClassList: "
1179 << iAirlineClassList.describeKey() << std::endl;
1180 oStream <<
"------------------------------------" << std::endl;
static void csvLegCabinDisplay(std::ostream &, const FlightDate &)
static void csvDateDisplay(std::ostream &, const DatePeriod &)
static void csvSegmentCabinDisplay(std::ostream &, const FlightDate &)
std::map< const MapKey_T, FlightDate * > FlightDateMap_T
std::list< PosChannel * > PosChannelList_T
LocationCode_T AirportCode_T
std::pair< Yield_T, MeanStdDevPair_T > YieldDemandPair_T
unsigned short FlightNumber_T
Handle on the StdAir library context.
std::list< AirlineClassList * > AirlineClassListList_T
std::list< DatePeriod * > DatePeriodList_T
std::list< OnDDate * > OnDDateList_T
std::string AirlineCode_T
static void csvLegDateDisplay(std::ostream &, const FlightDate &)
static void csvSimFQTAirRACDisplay(std::ostream &, const BomRoot &)
static void csvTimeDisplay(std::ostream &, const TimePeriod &)
static void csvBookingClassDisplay(std::ostream &, const BookingClass &, const std::string &iLeadingString)
std::list< BookingClass * > BookingClassList_T
std::list< SegmentDate * > SegmentDateList_T
std::list< SegmentCabin * > SegmentCabinList_T
static void csvSegmentDateDisplay(std::ostream &, const FlightDate &)
static void listAirportPairDateRange(std::ostream &, const BomRoot &)
std::list< TravelSolutionStruct > TravelSolutionList_T
std::list< FareFamily * > FareFamilyList_T
std::list< TimePeriod * > TimePeriodList_T
static void list(std::ostream &, const BomRoot &, const AirlineCode_T &iAirlineCode="all", const FlightNumber_T &iFlightNumber=0)
static void csvFeaturesDisplay(std::ostream &oStream, const FEATURE_TYPE &)
static void csvPosChannelDisplay(std::ostream &, const PosChannel &)
static void csvFareFamilyDisplay(std::ostream &, const FlightDate &)
std::list< LegDate * > LegDateList_T
std::list< FlightDate * > FlightDateList_T
static void csvAirportPairDisplay(std::ostream &, const AirportPair &)
std::map< std::string, YieldDemandPair_T > StringDemandStructMap_T
boost::gregorian::date Date_T
std::list< AirportPair * > AirportPairList_T
std::pair< MeanValue_T, StdDevValue_T > MeanStdDevPair_T
std::list< Inventory * > InventoryList_T
static void csvAirlineClassDisplay(std::ostream &, const AirlineClassList &)
static void csvDisplay(std::ostream &, const BomRoot &)
static void csvBucketDisplay(std::ostream &, const FlightDate &)
std::list< LegCabin * > LegCabinList_T
std::list< Bucket * > BucketList_T
static void csvFeatureListDisplay(std::ostream &oStream, const TimePeriod &)