21 void CmdCloneBomManager::cloneBomRoot (
const BomRoot& iBomRoot,
31 if (hasInventoryList ==
true) {
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 =
51 if (hastAirportPairList ==
true) {
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);
77 Inventory& lCloneInventory =
82 if (hasFlighDateList ==
true) {
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);
100 if (hasPartnerList ==
true) {
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);
124 if (hasOnDList ==
true){
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 =
145 if (hasFlightPeriodList ==
true) {
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 =
166 iInventory.getAirlineCode());
167 if (lAirlineFeature_ptr != NULL) {
169 AirlineFeature& lCloneAirlineFeature =
170 cloneAirlineFeature (*lAirlineFeature_ptr);
177 return lCloneInventory;
187 AirlineFeature& lCloneAirlineFeature =
190 return lCloneAirlineFeature;
195 OnDDate& CmdCloneBomManager::cloneOnDDate (
const OnDDate& iOnDDate) {
200 OnDDate& lCloneOnDDate =
203 return lCloneOnDDate;
208 cloneFlightDate (
const FlightDate& iFlightDate) {
213 FlightDate& lCloneFlightDate =
218 if (hasLegDateList ==
true) {
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 =
238 if (hasSegmentDateList ==
true) {
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 =
270 if (hasLegCabinList ==
true) {
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;
295 LegCabin& lCloneLegCabin =
300 if (hasBucketList ==
true) {
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 =
333 cloneSegmentDate (
const SegmentDate& iSegmentDate) {
338 SegmentDate& lCloneSegmentDate =
342 const bool hasSegmentCabinList =
344 if (hasSegmentCabinList ==
true) {
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,
373 const bool hasFareFamilyList =
375 if (hasFareFamilyList ==
true) {
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 =
386 if (hasBookingClasslist ==
true) {
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);
415 SegmentCabin& lCloneSegmentCabin =
419 const bool hasFareFamilyList =
421 if (hasFareFamilyList ==
true) {
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;
442 cloneFareFamily (
const FareFamily& iFareFamily) {
446 FareFamily& lCloneFareFamily =
450 const bool hasBookingClassList =
452 if (hasBookingClassList ==
true) {
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;
479 BookingClass& lCloneBookingClass =
482 return lCloneBookingClass;
487 cloneAirportPair (
const AirportPair& iAirportPair) {
492 AirportPair& lCloneAirportPair =
496 const bool hasDatePeriodList =
498 if (hasDatePeriodList ==
true) {
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;
520 cloneDatePeriod (
const DatePeriod& iDatePeriod) {
525 DatePeriod& lCloneDatePeriod =
529 const bool hasPosChannelList =
531 if (hasPosChannelList ==
true) {
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;
554 clonePosChannel (
const PosChannel& iPosChannel) {
559 PosChannel& lClonePosChannel =
563 const bool hasTimePeriodList =
565 if (hasTimePeriodList ==
true) {
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;
587 cloneTimePeriod (
const TimePeriod& iTimePeriod) {
592 TimePeriod& lCloneTimePeriod =
596 const bool hasFareFeaturesList =
598 if (hasFareFeaturesList ==
true) {
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 =
618 if (hasYieldFeaturesList ==
true) {
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 =
653 if (hasAirlineClassListList ==
true) {
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;
683 AirlineClassList& lCloneAirlineClassList =
686 return lCloneAirlineClassList;
696 FlightPeriod& lCloneFlightPeriod =
700 const bool hasSegmentPeriodList =
702 if (hasSegmentPeriodList ==
true) {
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;
732 SegmentPeriod& lCloneSegmentPeriod =
735 return lCloneSegmentPeriod;
Handle on the StdAir library context.
std::list< TimePeriod * > TimePeriodList_T
std::list< DatePeriod * > DatePeriodList_T
std::list< FareFeatures * > FareFeaturesList_T
std::list< SegmentDate * > SegmentDateList_T
std::list< AirportPair * > AirportPairList_T
std::list< SegmentPeriod * > SegmentPeriodList_T
std::list< FareFamily * > FareFamilyList_T
std::list< BookingClass * > BookingClassList_T
std::list< FlightPeriod * > FlightPeriodList_T
std::list< SegmentCabin * > SegmentCabinList_T
std::list< AirlineClassList * > AirlineClassListList_T
std::list< OnDDate * > OnDDateList_T
std::list< Inventory * > InventoryList_T
std::list< PosChannel * > PosChannelList_T
std::list< Bucket * > BucketList_T
std::list< FlightDate * > FlightDateList_T
std::list< YieldFeatures * > YieldFeaturesList_T
std::list< LegCabin * > LegCabinList_T
std::list< LegDate * > LegDateList_T
Class representing the actual attributes for a segment-features.
Class representing various configuration parameters (e.g., revenue management methods such EMSRb or M...
Class representing the actual attributes for an airport-pair.
static bool hasList(const OBJECT1 &)
static const BomHolder< OBJECT2 >::BomList_T & getList(const OBJECT1 &)
static OBJECT2 * getObjectPtr(const OBJECT1 &, const MapKey_T &)
Class representing the actual attributes for the Bom root.
Class representing the actual attributes for an airline booking class.
Class representing the actual attributes for a fare date-period.
Class representing the actual attributes for a family fare.
Class representing the actual attributes for an airline flight-date.
Class representing the actual attributes for an airline inventory.
Class representing the actual attributes for an airline leg-cabin.
Class representing the actual attributes for an airline flight-date.
Class representing the actual attributes for a fare point of sale.
Class representing the actual attributes for an airline segment-cabin.
Class representing the actual attributes for an airline segment-date.
Class representing the actual attributes for a fare time-period.
static void setAirlineFeature(Inventory &iInventory, AirlineFeature &iAirlineFeature)
static void linkWithParent(PARENT &, CHILD &)
static void addToListAndMap(OBJECT1 &, OBJECT2 &)
static FacCloneBom & instance()