21 void CmdCloneBomManager::cloneBomRoot (
const BomRoot& iBomRoot,
22 BomRoot& ioCloneBomRoot) {
30 const bool hasInventoryList = BomManager::hasList<Inventory> (iBomRoot);
31 if (hasInventoryList ==
true) {
35 BomManager::getList<Inventory> (iBomRoot);
36 for (InventoryList_T::const_iterator itInv = lInventoryList.begin();
37 itInv != lInventoryList.end(); ++itInv) {
38 const Inventory* lInv_ptr = *itInv;
39 assert (lInv_ptr != NULL);
42 Inventory& lCloneInventory = cloneInventory (*lInv_ptr, ioCloneBomRoot);
49 const bool hastAirportPairList =
50 BomManager::hasList<AirportPair> (iBomRoot);
51 if (hastAirportPairList ==
true) {
55 BomManager::getList<AirportPair> (iBomRoot);
56 for (AirportPairList_T::const_iterator itAirportPair =
57 lAirportPairList.begin();
58 itAirportPair != lAirportPairList.end(); ++itAirportPair) {
59 const AirportPair* lAirportPair_ptr = *itAirportPair;
60 assert (lAirportPair_ptr != NULL);
63 AirportPair& lCloneAirportPair = cloneAirportPair (*lAirportPair_ptr);
71 Inventory& CmdCloneBomManager::cloneInventory (
const Inventory& iInventory,
72 BomRoot& ioCloneBomRoot) {
77 Inventory& lCloneInventory =
81 const bool hasFlighDateList = BomManager::hasList<FlightDate> (iInventory);
82 if (hasFlighDateList ==
true) {
85 BomManager::getList<FlightDate> (iInventory);
86 for (FlightDateList_T::const_iterator itFD = lFlightDateList.begin();
87 itFD != lFlightDateList.end(); ++itFD) {
88 const FlightDate* lFD_ptr = *itFD;
89 assert (lFD_ptr != NULL);
92 FlightDate& lCloneFD = cloneFlightDate (*lFD_ptr);
99 const bool hasPartnerList = BomManager::hasList<Inventory> (iInventory);
100 if (hasPartnerList ==
true) {
104 BomManager::getList<Inventory> (iInventory);
106 for (InventoryList_T::const_iterator itInv =
107 lPartnerInventoryList.begin();
108 itInv != lPartnerInventoryList.end(); ++itInv) {
109 const Inventory* lInv_ptr = *itInv;
110 assert (lInv_ptr != NULL);
113 Inventory& lClonePartnerInventory = cloneInventory (*lInv_ptr,
116 lClonePartnerInventory);
118 lClonePartnerInventory);
123 const bool hasOnDList = BomManager::hasList<OnDDate> (iInventory);
124 if (hasOnDList ==
true){
128 BomManager::getList<OnDDate> (iInventory);
130 for (OnDDateList_T::const_iterator itOnD = lOnDDateList.begin();
131 itOnD != lOnDDateList.end(); ++itOnD) {
132 const OnDDate* lOnDDate_ptr = *itOnD;
133 assert (lOnDDate_ptr != NULL);
136 OnDDate& lCloneOnDDate = cloneOnDDate (*lOnDDate_ptr);
143 const bool hasFlightPeriodList =
144 BomManager::hasList<FlightPeriod> (iInventory);
145 if (hasFlightPeriodList ==
true) {
149 BomManager::getList<FlightPeriod> (iInventory);
150 for (FlightPeriodList_T::const_iterator itFlightPeriod =
151 lFlightPeriodList.begin();
152 itFlightPeriod != lFlightPeriodList.end(); ++itFlightPeriod) {
153 const FlightPeriod* lFlightPeriod_ptr = *itFlightPeriod;
154 assert (lFlightPeriod_ptr != NULL);
157 FlightPeriod& lCloneFlightPeriod = cloneFlightPeriod (*lFlightPeriod_ptr);
164 const AirlineFeature* lAirlineFeature_ptr =
165 BomManager::getObjectPtr<AirlineFeature,Inventory> (iInventory,
166 iInventory.getAirlineCode());
167 if (lAirlineFeature_ptr != NULL) {
169 AirlineFeature& lCloneAirlineFeature =
170 cloneAirlineFeature (*lAirlineFeature_ptr);
177 return lCloneInventory;
181 AirlineFeature& CmdCloneBomManager::
182 cloneAirlineFeature (
const AirlineFeature& iAirlineFeature) {
187 AirlineFeature& lCloneAirlineFeature =
190 return lCloneAirlineFeature;
195 OnDDate& CmdCloneBomManager::cloneOnDDate (
const OnDDate& iOnDDate) {
200 OnDDate& lCloneOnDDate =
203 return lCloneOnDDate;
207 FlightDate& CmdCloneBomManager::
208 cloneFlightDate (
const FlightDate& iFlightDate) {
213 FlightDate& lCloneFlightDate =
217 const bool hasLegDateList = BomManager::hasList<LegDate> (iFlightDate);
218 if (hasLegDateList ==
true) {
222 BomManager::getList<LegDate> (iFlightDate);
223 for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
224 itLD != lLegDateList.end(); ++itLD) {
225 const LegDate* lLD_ptr = *itLD;
226 assert (lLD_ptr != NULL);
229 LegDate& lCloneLegDate = cloneLegDate (*lLD_ptr);
236 const bool hasSegmentDateList =
237 BomManager::hasList<SegmentDate> (iFlightDate);
238 if (hasSegmentDateList ==
true) {
242 BomManager::getList<SegmentDate> (iFlightDate);
243 for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
244 itSD != lSegmentDateList.end(); ++itSD) {
245 const SegmentDate* lSD_ptr = *itSD;
246 assert (lSD_ptr != NULL);
249 SegmentDate& lCloneSegmentDate = cloneSegmentDate (*lSD_ptr);
256 return lCloneFlightDate;
260 LegDate& CmdCloneBomManager::cloneLegDate (
const LegDate& iLegDate) {
265 LegDate& lCloneLegDate =
269 const bool hasLegCabinList = BomManager::hasList<LegCabin> (iLegDate);
270 if (hasLegCabinList ==
true) {
273 BomManager::getList<LegCabin> (iLegDate);
274 for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
275 itLC != lLegCabinList.end(); ++itLC) {
276 const LegCabin* lLC_ptr = *itLC;
277 assert (lLC_ptr != NULL);
280 LegCabin& lCloneLegCabin = cloneLegCabin (*lLC_ptr);
286 return lCloneLegDate;
290 LegCabin& CmdCloneBomManager::cloneLegCabin (
const LegCabin& iLegCabin) {
295 LegCabin& lCloneLegCabin =
299 const bool hasBucketList = BomManager::hasList<Bucket> (iLegCabin);
300 if (hasBucketList ==
true) {
303 BomManager::getList<Bucket> (iLegCabin);
304 for (BucketList_T::const_iterator itBucket = lBucketList.begin();
305 itBucket != lBucketList.end(); ++itBucket) {
306 const Bucket* lBucket_ptr = *itBucket;
307 assert (lBucket_ptr != NULL);
310 Bucket& lCloneBucket = cloneBucket (*lBucket_ptr);
316 return lCloneLegCabin;
320 Bucket& CmdCloneBomManager::cloneBucket (
const Bucket& iBucket) {
325 Bucket& lCloneBucket =
332 SegmentDate& CmdCloneBomManager::
333 cloneSegmentDate (
const SegmentDate& iSegmentDate) {
338 SegmentDate& lCloneSegmentDate =
342 const bool hasSegmentCabinList =
343 BomManager::hasList<SegmentCabin> (iSegmentDate);
344 if (hasSegmentCabinList ==
true) {
347 BomManager::getList<SegmentCabin> (iSegmentDate);
348 for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
349 itSC != lSegmentCabinList.end(); ++itSC) {
350 const SegmentCabin* lSC_ptr = *itSC;
351 assert (lSC_ptr != NULL);
354 SegmentCabin& lCloneSegmentCabin = cloneSegmentCabin (*lSC_ptr);
358 linkBookingClassesWithSegment (lCloneSegmentDate,
363 return lCloneSegmentDate;
367 void CmdCloneBomManager::
368 linkBookingClassesWithSegment (SegmentDate& iCloneSegmentDate,
369 SegmentCabin& iCloneSegmentCabin) {
373 const bool hasFareFamilyList =
374 BomManager::hasList<FareFamily> (iCloneSegmentCabin);
375 if (hasFareFamilyList ==
true) {
377 BomManager::getList<FareFamily> (iCloneSegmentCabin);
378 for (FareFamilyList_T::const_iterator itCloneFF = lCloneFFList.begin();
379 itCloneFF != lCloneFFList.end(); ++itCloneFF) {
380 const FareFamily* lCloneFF_ptr = *itCloneFF;
381 assert (lCloneFF_ptr != NULL);
384 const bool hasBookingClasslist =
385 BomManager::hasList<BookingClass> (*lCloneFF_ptr);
386 if (hasBookingClasslist ==
true) {
388 BomManager::getList<BookingClass> (*lCloneFF_ptr);
389 for (BookingClassList_T::const_iterator itCloneBC =
390 lCloneBCList.begin();
391 itCloneBC != lCloneBCList.end(); ++itCloneBC) {
392 const BookingClass* lCloneBC_ptr = *itCloneBC;
393 assert (lCloneBC_ptr != NULL);
409 SegmentCabin& CmdCloneBomManager::
410 cloneSegmentCabin (
const SegmentCabin& iSegmentCabin) {
415 SegmentCabin& lCloneSegmentCabin =
419 const bool hasFareFamilyList =
420 BomManager::hasList<FareFamily> (iSegmentCabin);
421 if (hasFareFamilyList ==
true) {
424 BomManager::getList<FareFamily> (iSegmentCabin);
425 for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
426 itFF != lFareFamilyList.end(); ++itFF) {
427 const FareFamily* lFF_ptr = *itFF;
428 assert (lFF_ptr != NULL);
431 FareFamily& lCloneFareFamily = cloneFareFamily (*lFF_ptr);
437 return lCloneSegmentCabin;
441 FareFamily& CmdCloneBomManager::
442 cloneFareFamily (
const FareFamily& iFareFamily) {
446 FareFamily& lCloneFareFamily =
450 const bool hasBookingClassList =
451 BomManager::hasList<BookingClass> (iFareFamily);
452 if (hasBookingClassList ==
true) {
455 BomManager::getList<BookingClass> (iFareFamily);
456 for (BookingClassList_T::const_iterator itBookingClass =
457 lBookingClassList.begin();
458 itBookingClass != lBookingClassList.end(); ++itBookingClass) {
459 const BookingClass* lBC_ptr = *itBookingClass;
460 assert (lBC_ptr != NULL);
463 BookingClass& lCloneBookingClass = cloneBookingClass (*lBC_ptr);
469 return lCloneFareFamily;
473 BookingClass& CmdCloneBomManager::
474 cloneBookingClass (
const BookingClass& iBookingClass) {
479 BookingClass& lCloneBookingClass =
482 return lCloneBookingClass;
486 AirportPair& CmdCloneBomManager::
487 cloneAirportPair (
const AirportPair& iAirportPair) {
492 AirportPair& lCloneAirportPair =
496 const bool hasDatePeriodList =
497 BomManager::hasList<DatePeriod> (iAirportPair);
498 if (hasDatePeriodList ==
true) {
501 BomManager::getList<DatePeriod> (iAirportPair);
502 for (DatePeriodList_T::const_iterator itDatePeriod =
503 lDatePeriodList.begin();
504 itDatePeriod != lDatePeriodList.end(); ++itDatePeriod) {
505 const DatePeriod* lDatePeriod_ptr = *itDatePeriod;
506 assert (lDatePeriod_ptr != NULL);
509 DatePeriod& lCloneDatePeriod = cloneDatePeriod (*lDatePeriod_ptr);
515 return lCloneAirportPair;
519 DatePeriod& CmdCloneBomManager::
520 cloneDatePeriod (
const DatePeriod& iDatePeriod) {
525 DatePeriod& lCloneDatePeriod =
529 const bool hasPosChannelList =
530 BomManager::hasList<PosChannel> (iDatePeriod);
531 if (hasPosChannelList ==
true) {
534 BomManager::getList<PosChannel> (iDatePeriod);
535 for (PosChannelList_T::const_iterator itPosChannel =
536 lPosChannelList.begin();
537 itPosChannel != lPosChannelList.end(); ++itPosChannel) {
538 const PosChannel* lPosChannel_ptr = *itPosChannel;
539 assert (lPosChannel_ptr != NULL);
542 PosChannel& lClonePosChannel = clonePosChannel (*lPosChannel_ptr);
548 return lCloneDatePeriod;
553 PosChannel& CmdCloneBomManager::
554 clonePosChannel (
const PosChannel& iPosChannel) {
559 PosChannel& lClonePosChannel =
563 const bool hasTimePeriodList =
564 BomManager::hasList<TimePeriod> (iPosChannel);
565 if (hasTimePeriodList ==
true) {
568 BomManager::getList<TimePeriod> (iPosChannel);
569 for (TimePeriodList_T::const_iterator itTimePeriod =
570 lTimePeriodList.begin();
571 itTimePeriod != lTimePeriodList.end(); ++itTimePeriod) {
572 const TimePeriod* lTimePeriod_ptr = *itTimePeriod;
573 assert (lTimePeriod_ptr != NULL);
576 TimePeriod& lCloneTimePeriod = cloneTimePeriod (*lTimePeriod_ptr);
582 return lClonePosChannel;
586 TimePeriod& CmdCloneBomManager::
587 cloneTimePeriod (
const TimePeriod& iTimePeriod) {
592 TimePeriod& lCloneTimePeriod =
596 const bool hasFareFeaturesList =
597 BomManager::hasList<FareFeatures> (iTimePeriod);
598 if (hasFareFeaturesList ==
true) {
601 BomManager::getList<FareFeatures> (iTimePeriod);
602 for (FareFeaturesList_T::const_iterator itFF = lFareFeaturesList.begin();
603 itFF != lFareFeaturesList.end(); ++itFF) {
604 const FareFeatures* lFF_ptr = *itFF;
605 assert (lFF_ptr != NULL);
608 FareFeatures& lCloneFareFeatures =
609 cloneFeatures<FareFeatures> (*lFF_ptr);
616 const bool hasYieldFeaturesList =
617 BomManager::hasList<YieldFeatures> (iTimePeriod);
618 if (hasYieldFeaturesList ==
true) {
621 BomManager::getList<YieldFeatures> (iTimePeriod);
622 for (YieldFeaturesList_T::const_iterator itYF =
623 lYieldFeaturesList.begin();
624 itYF != lYieldFeaturesList.end(); ++itYF) {
625 const YieldFeatures* lYF_ptr = *itYF;
626 assert (lYF_ptr != NULL);
629 YieldFeatures& lCloneYieldFeatures =
630 cloneFeatures<YieldFeatures> (*lYF_ptr);
636 return lCloneTimePeriod;
640 template <
typename FEATURE_TYPE>
641 FEATURE_TYPE& CmdCloneBomManager::
642 cloneFeatures (
const FEATURE_TYPE& iFeatures) {
647 FEATURE_TYPE& lCloneFeatures =
651 const bool hasAirlineClassListList =
652 BomManager::hasList<AirlineClassList> (iFeatures);
653 if (hasAirlineClassListList ==
true) {
656 BomManager::getList<AirlineClassList> (iFeatures);
657 for (AirlineClassListList_T::const_iterator itACList =
658 lAirlineClassList.begin();
659 itACList != lAirlineClassList.end(); ++itACList) {
660 const AirlineClassList* lACList_ptr = *itACList;
661 assert (lACList_ptr != NULL);
664 AirlineClassList& lCloneAirlineClassList =
665 cloneAirlineClassList (*lACList_ptr);
667 lCloneAirlineClassList);
669 lCloneAirlineClassList);
673 return lCloneFeatures;
677 AirlineClassList& CmdCloneBomManager::
678 cloneAirlineClassList (
const AirlineClassList& iAirlineClassList) {
683 AirlineClassList& lCloneAirlineClassList =
686 return lCloneAirlineClassList;
690 FlightPeriod& CmdCloneBomManager::
691 cloneFlightPeriod (
const FlightPeriod& iFlightPeriod) {
696 FlightPeriod& lCloneFlightPeriod =
700 const bool hasSegmentPeriodList =
701 BomManager::hasList<SegmentPeriod> (iFlightPeriod);
702 if (hasSegmentPeriodList ==
true) {
705 BomManager::getList<SegmentPeriod> (iFlightPeriod);
706 for (SegmentPeriodList_T::const_iterator itSegmentPeriod =
707 lSegmentPeriodList.begin();
708 itSegmentPeriod != lSegmentPeriodList.end(); ++itSegmentPeriod) {
709 const SegmentPeriod* lSegmentPeriod_ptr = *itSegmentPeriod;
710 assert (lSegmentPeriod_ptr != NULL);
713 SegmentPeriod& lCloneSegmentPeriod =
714 cloneSegmentPeriod (*lSegmentPeriod_ptr);
716 lCloneSegmentPeriod);
718 lCloneSegmentPeriod);
722 return lCloneFlightPeriod;
726 SegmentPeriod& CmdCloneBomManager::
727 cloneSegmentPeriod (
const SegmentPeriod& iSegmentPeriod) {
732 SegmentPeriod& lCloneSegmentPeriod =
735 return lCloneSegmentPeriod;
static void linkWithParent(PARENT &, CHILD &)
std::list< PosChannel * > PosChannelList_T
std::list< YieldFeatures * > YieldFeaturesList_T
std::list< SegmentPeriod * > SegmentPeriodList_T
Handle on the StdAir library context.
std::list< AirlineClassList * > AirlineClassListList_T
std::list< DatePeriod * > DatePeriodList_T
std::list< OnDDate * > OnDDateList_T
static void addToListAndMap(OBJECT1 &, OBJECT2 &)
std::list< BookingClass * > BookingClassList_T
std::list< SegmentDate * > SegmentDateList_T
std::list< SegmentCabin * > SegmentCabinList_T
static void setAirlineFeature(Inventory &iInventory, AirlineFeature &iAirlineFeature)
std::list< FareFamily * > FareFamilyList_T
std::list< TimePeriod * > TimePeriodList_T
static FacCloneBom & instance()
std::list< LegDate * > LegDateList_T
std::list< FlightDate * > FlightDateList_T
std::list< AirportPair * > AirportPairList_T
std::list< Inventory * > InventoryList_T
std::list< LegCabin * > LegCabinList_T
std::list< FareFeatures * > FareFeaturesList_T
std::list< FlightPeriod * > FlightPeriodList_T
std::list< Bucket * > BucketList_T