/
#include <cassert>
#include <sstream>
void CmdBomManager::buildSampleBom (BomRoot& ioBomRoot) {
<< "specifications.");
buildSampleInventorySchedule (ioBomRoot);
buildSamplePricing (ioBomRoot);
buildPartnershipsSampleInventoryAndRM (ioBomRoot);
buildPartnershipsSamplePricing (ioBomRoot);
buildCompleteDummyInventory (ioBomRoot);
buildSampleInventoryScheduleForFareFamilies (ioBomRoot);
buildSamplePricingForFareFamilies (ioBomRoot);
buildCompleteDummyInventoryForFareFamilies (ioBomRoot);
}
void CmdBomManager::buildSampleInventorySchedule (BomRoot& ioBomRoot) {
const InventoryKey lBAKey (lAirlineCodeBA);
const AirlineFeatureKey lAirlineFeatureBAKey (lAirlineCodeBA);
AirlineFeature& lAirlineFeatureBA =
const InventoryKey lAFKey (lAirlineCodeAF);
const AirlineFeatureKey lAirlineFeatureAFKey (lAirlineCodeAF);
AirlineFeature& lAirlineFeatureAF =
FlightDateKey lFlightDateKey (lFlightNumber, lDate);
FlightDate& lBA9_20110610_FD =
SegmentDateKey lSegmentDateKey (lLHR, lSYD);
SegmentDate& lLHRSYDSegment =
const std::string lBALHRRoutingLegStr = "BA;9;2011-Jun-10;LHR";
const std::string lBABKKRoutingLegStr = "BA;9;2011-Jun-10;BKK";
lLHRSYDSegment.addLegKey (lBALHRRoutingLegStr);
lLHRSYDSegment.addLegKey (lBABKKRoutingLegStr);
lLHRSYDSegment.setBoardingDate (lDate);
lLHRSYDSegment.setOffDate (lDate + l2Days);
lLHRSYDSegment.setBoardingTime (l2135);
lLHRSYDSegment.setOffTime (l0610);
lLHRSYDSegment.setElapsedTime (l2135);
lSegmentDateKey = SegmentDateKey (lLHR, lBKK);
SegmentDate& lLHRBKKSegment =
lLHRBKKSegment.addLegKey (lBALHRRoutingLegStr);
lLHRBKKSegment.setBoardingDate (lDate);
lLHRBKKSegment.setOffDate (lDate + l1Day);
lLHRBKKSegment.setBoardingTime (l2135);
lLHRBKKSegment.setOffTime (l1540);
lLHRBKKSegment.setElapsedTime (l1105);
lSegmentDateKey = SegmentDateKey (lBKK, lSYD);
SegmentDate& lBKKSYDSegment =
lBKKSYDSegment.addLegKey (lBABKKRoutingLegStr);
lBKKSYDSegment.setBoardingDate (lDate + l1Day);
lBKKSYDSegment.setOffDate (lDate + l2Days);
lBKKSYDSegment.setBoardingTime (l1705);
lBKKSYDSegment.setOffTime (l1540);
lBKKSYDSegment.setElapsedTime (l0905);
LegDateKey lLegDateKey (lLHR);
lLHRLeg.setOffPoint (lBKK);
lLHRLeg.setBoardingDate (lDate);
lLHRLeg.setOffDate (lDate + l1Day);
lLHRLeg.setBoardingTime (l2135);
lLHRLeg.setOffTime (l1540);
lLHRLeg.setElapsedTime (l1105);
lLegDateKey = LegDateKey (lBKK);
lBKKLeg.setOffPoint (lSYD);
lBKKLeg.setBoardingDate (lDate + l1Day);
lBKKLeg.setOffDate (lDate + l2Days);
lBKKLeg.setBoardingTime (l1705);
lBKKLeg.setOffTime (l1540);
lBKKLeg.setElapsedTime (l0905);
SegmentCabinKey lYSegmentCabinKey (lY);
SegmentCabin& lLHRBKKSegmentYCabin =
SegmentCabin& lBKKSYDSegmentYCabin =
SegmentCabin& lLHRSYDSegmentYCabin =
LegCabinKey lYLegCabinKey (lY);
LegCabin& lLHRLegYCabin =
LegCabin& lBKKLegYCabin =
FareFamilyKey l1FareFamilyKey (l1);
FareFamily& lLHRBKKSegmentYCabin1Family =
lLHRBKKSegmentYCabin1Family);
lLHRBKKSegmentYCabin1Family);
FareFamily& lBKKSYDSegmentYCabin1Family =
lBKKSYDSegmentYCabin1Family);
lBKKSYDSegmentYCabin1Family);
FareFamily& lLHRSYDSegmentYCabin1Family =
lLHRSYDSegmentYCabin1Family);
lLHRSYDSegmentYCabin1Family);
BookingClassKey lQBookingClassKey (lQ);
BookingClass& lLHRBKKSegmentYCabin1FamilyQClass =
lLHRBKKSegmentYCabin1FamilyQClass);
lLHRBKKSegmentYCabin1FamilyQClass);
lLHRBKKSegmentYCabin1FamilyQClass);
lLHRBKKSegmentYCabin1FamilyQClass);
BookingClass& lBKKSYDSegmentYCabin1FamilyQClass =
lBKKSYDSegmentYCabin1FamilyQClass);
lBKKSYDSegmentYCabin1FamilyQClass);
lBKKSYDSegmentYCabin1FamilyQClass);
lBKKSYDSegmentYCabin1FamilyQClass);
BookingClass& lLHRSYDSegmentYCabin1FamilyQClass =
lLHRSYDSegmentYCabin1FamilyQClass);
lLHRSYDSegmentYCabin1FamilyQClass);
lLHRSYDSegmentYCabin1FamilyQClass);
lLHRSYDSegmentYCabin1FamilyQClass);
lFlightNumber = 84;
lFlightDateKey = FlightDateKey (lFlightNumber, lDate);
FlightDate& lAF084_20110320_FD =
lSegmentDateKey = SegmentDateKey (lCDG, lSFO);
SegmentDate& lCDGSFOSegment =
const std::string lAFCDGRoutingLegStr = "AF;84;2011-Mar-20;CDG";
lCDGSFOSegment.addLegKey (lAFCDGRoutingLegStr);
lCDGSFOSegment.setBoardingDate (lDate);
lCDGSFOSegment.setOffDate (lDate);
lCDGSFOSegment.setBoardingTime (l1040);
lCDGSFOSegment.setOffTime (l1250);
lCDGSFOSegment.setElapsedTime (l1110);
lLegDateKey = LegDateKey (lCDG);
lCDGLeg.setOffPoint (lSFO);
lCDGLeg.setBoardingDate (lDate);
lCDGLeg.setOffDate (lDate);
lCDGLeg.setBoardingTime (l1040);
lCDGLeg.setOffTime (l1250);
lCDGLeg.setElapsedTime (l1110);
SegmentCabin& lCDGSFOSegmentYCabin =
LegCabin& lCDGLegYCabin =
FareFamily& lCDGSFOSegmentYCabin1Family =
lCDGSFOSegmentYCabin1Family);
lCDGSFOSegmentYCabin1Family);
BookingClass& lCDGSFOSegmentYCabin1FamilyQClass =
lCDGSFOSegmentYCabin1FamilyQClass);
lCDGSFOSegmentYCabin1FamilyQClass);
lCDGSFOSegmentYCabin1FamilyQClass);
lCDGSFOSegmentYCabin1FamilyQClass);
const DoWStruct lDoWSrtuct ("1111111");
const Date_T lBA9DateRangeStart (2010, boost::gregorian::Jun, 6);
const Date_T lBA9DateRangeEnd (2010, boost::gregorian::Jun, 7);
const DatePeriod_T lBA9DatePeriod (lBA9DateRangeStart, lBA9DateRangeEnd);
const PeriodStruct lBA9PeriodStruct (lBA9DatePeriod, lDoWSrtuct);
FlightPeriodKey lBA9FlightPeriodKey (lFlightNumber, lBA9PeriodStruct);
FlightPeriod& lBA9FlightPeriod =
SegmentPeriodKey lLHRSYDSegmentPeriodKey (lLHR, lSYD);
SegmentPeriod& lLHRSYDSegmentPeriod =
lLHRSYDSegmentPeriod.setBoardingTime (l2135);
lLHRSYDSegmentPeriod.setOffTime (l1540);
lLHRSYDSegmentPeriod.setElapsedTime (l1105);
lLHRSYDSegmentPeriod.addCabinBookingClassList (lY,lYM);
const Date_T lAF84DateRangeStart (2011, boost::gregorian::Mar, 20);
const Date_T lAF84DateRangeEnd (2011, boost::gregorian::Mar, 21);
const DatePeriod_T lAF84DatePeriod (lAF84DateRangeStart, lAF84DateRangeEnd);
const PeriodStruct lAF84PeriodStruct (lAF84DatePeriod, lDoWSrtuct);
FlightPeriodKey lAF84FlightPeriodKey (lFlightNumber, lAF84PeriodStruct);
FlightPeriod& lAF84FlightPeriod =
SegmentPeriodKey lCDGSFOSegmentPeriodKey (lCDG, lSFO);
SegmentPeriod& lCDGSFOSegmentPeriod =
lCDGSFOSegmentPeriod.setBoardingTime (l1040);
lCDGSFOSegmentPeriod.setOffTime (l1250);
lCDGSFOSegmentPeriod.setElapsedTime (l1110);
lCDGSFOSegmentPeriod.addCabinBookingClassList (lY,lYM);
OnDString_T lBALHRSYDOnDStr =
"BA;9,2010-Jun-06;LHR,SYD";
lBAOnDStrList.push_back (lBALHRSYDOnDStr);
OnDDateKey lBAOnDDateKey (lBAOnDStrList);
OnDDate& lBA_LHRSYD_OnDDate =
const WTP_T lWTP750 = 750.0;
lBA_LHRSYD_OnDDate.setTotalForecast (lY, lWTP750Mean60StdDev6);
OnDString_T lAFLHRSYDOnDStr =
"AF;9,2011-Mar-20;CDG,SFO";
lAFOnDStrList.push_back (lAFLHRSYDOnDStr);
OnDDateKey lAFOnDDateKey (lAFOnDStrList);
OnDDate& lAF_LHRSYD_OnDDate =
lAF_LHRSYD_OnDDate.setTotalForecast (lY, lWTP750Mean60StdDev6);
}
void CmdBomManager::
buildSampleInventoryScheduleForFareFamilies (BomRoot& ioBomRoot) {
const InventoryKey lSQKey ("SQ");
Inventory& lSQInv = BomManager::getObject<Inventory>(ioBomRoot,
lSQKey.toString());
const Date_T lDate (2010, 2, 8);
const FlightDateKey lFlightDateKey (lFlightNumber747, lDate);
FlightDate& lSQ747_20100208_FD =
const SegmentDateKey lSegmentDateKey (lSIN, lBKK);
SegmentDate& lSINBKKSegment =
const std::string lSQSINRoutingLegStr = "SQ;747;2010-Feb-8;SIN";
lSINBKKSegment.addLegKey (lSQSINRoutingLegStr);
lSINBKKSegment.setBoardingDate (lDate);
lSINBKKSegment.setOffDate (lDate);
lSINBKKSegment.setBoardingTime (l0635);
lSINBKKSegment.setOffTime (l0800);
lSINBKKSegment.setElapsedTime (l0225);
const LegDateKey lLegDateKey (lSIN);
lSINLeg.setOffPoint (lBKK);
lSINLeg.setBoardingDate (lDate);
lSINLeg.setOffDate (lDate);
lSINLeg.setBoardingTime (l0635);
lSINLeg.setOffTime (l0800);
lSINLeg.setElapsedTime (l0225);
const SegmentCabinKey lYSegmentCabinKey (lY);
SegmentCabin& lSINBKKSegmentYCabin =
lSINBKKSegmentYCabin.activateFareFamily ();
const LegCabinKey lYLegCabinKey (lY);
LegCabin& lSINLegYCabin =
const FareFamilyKey l1FareFamilyKey (l1);
FareFamily& lSINBKKSegmentYCabin1Family =
lSINBKKSegmentYCabin1Family);
lSINBKKSegmentYCabin1Family);
const FareFamilyKey l2FareFamilyKey (l2);
FareFamily& lSINBKKSegmentYCabin2Family =
lSINBKKSegmentYCabin2Family);
lSINBKKSegmentYCabin2Family);
const BookingClassKey lYBookingClassKey (lClassY);
BookingClass& lSINBKKSegmentYCabin2FamilyYClass =
lSINBKKSegmentYCabin2FamilyYClass);
lSINBKKSegmentYCabin2FamilyYClass);
lSINBKKSegmentYCabin2FamilyYClass);
lSINBKKSegmentYCabin2FamilyYClass);
lSINBKKSegmentYCabin2FamilyYClass.setYield(1200);
const BookingClassKey lBBookingClassKey (lB);
BookingClass& lSINBKKSegmentYCabin2FamilyBClass =
lSINBKKSegmentYCabin2FamilyBClass);
lSINBKKSegmentYCabin2FamilyBClass);
lSINBKKSegmentYCabin2FamilyBClass);
lSINBKKSegmentYCabin2FamilyBClass);
lSINBKKSegmentYCabin2FamilyBClass.setYield(800);
const BookingClassKey lMBookingClassKey (lM);
BookingClass& lSINBKKSegmentYCabin1FamilyMClass =
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass.setYield(900);
const BookingClassKey lQBookingClassKey (lQ);
BookingClass& lSINBKKSegmentYCabin1FamilyQClass =
lSINBKKSegmentYCabin1FamilyQClass);
lSINBKKSegmentYCabin1FamilyQClass);
lSINBKKSegmentYCabin1FamilyQClass);
lSINBKKSegmentYCabin1FamilyQClass);
lSINBKKSegmentYCabin1FamilyQClass.setYield(600);
const DoWStruct lDoWSrtuct ("1111111");
const Date_T lSQ747DateRangeStart (2010, boost::gregorian::Feb, 8);
const Date_T lSQ747DateRangeEnd (2010, boost::gregorian::Feb, 9);
lSQ747DateRangeEnd);
const PeriodStruct lSQ747PeriodStruct (lSQ747DatePeriod, lDoWSrtuct);
const FlightPeriodKey lSQ747FlightPeriodKey (lFlightNumber747,
lSQ747PeriodStruct);
FlightPeriod& lSQ747FlightPeriod =
const SegmentPeriodKey lSINBKKSegmentPeriodKey (lSIN, lBKK);
SegmentPeriod& lSINBKKSegmentPeriod =
lSINBKKSegmentPeriod.addCabinBookingClassList (lY,lYBMQ);
lSINBKKSegmentPeriod.setBoardingTime (l0635);
lSINBKKSegmentPeriod.setOffTime (l0800);
lSINBKKSegmentPeriod.setElapsedTime (l0225);
const OnDString_T lSQSINBKKOnDStr =
"SQ;747,2011-Feb-14;SIN,BKK";
lSQOnDStrList.push_back (lSQSINBKKOnDStr);
const OnDDateKey lSQOnDDateKey (lSQOnDStrList);
OnDDate& lSQ_SINBKK_OnDDate =
const WTP_T lWTP1000 = 1000.0;
const WTPDemandPair_T lWTP1000Mean120StdDev12 (lWTP1000, lMean120StdDev12);
lSQ_SINBKK_OnDDate.setTotalForecast (lY, lWTP1000Mean120StdDev12);
}
void CmdBomManager::buildDummyLegSegmentAccesses (BomRoot& ioBomRoot) {
SegmentCabin& lDummySegmentCabin =
LegCabin& lDummyLegCabin =
const bool isForFareFamilies = true;
SegmentCabin& lFFDummySegmentCabin =
isForFareFamilies);
}
void CmdBomManager::buildCompleteDummyInventory (BomRoot& ioBomRoot) {
buildDummyInventory (ioBomRoot, lCapacity);
SegmentCabin& lDummySegmentCabin =
LegCabin& lDummyLegCabin =
BookingClass& lDummyBookingClass =
lDummyBookingClass.setYield (lYield);
lDummyBookingClass.setMean (lMean);
lDummyBookingClass.setStdDev (lStdDev);
lDummyBookingClassList.push_back(&lDummyBookingClass);
VirtualClassStruct lDummyVirtualClass (lDummyBookingClassList);
lDummyVirtualClass.setYield (lYield);
lDummyVirtualClass.setMean (lMean);
lDummyVirtualClass.setStdDev (lStdDev);
lDummyLegCabin.addVirtualClass (lDummyVirtualClass);
lYield = 70;
lMean = 45;
lStdDev= 12;
lDummyBookingClass.setYield (lYield);
lDummyBookingClass.setMean (lMean);
lDummyBookingClass.setStdDev (lStdDev);
lDummyVirtualClass.setYield (lYield);
lDummyVirtualClass.setMean (lMean);
lDummyVirtualClass.setStdDev (lStdDev);
lDummyLegCabin.addVirtualClass (lDummyVirtualClass);
lYield = 42;
lMean = 80;
lStdDev= 16;
lDummyBookingClass.setYield (lYield);
lDummyBookingClass.setMean (lMean);
lDummyBookingClass.setStdDev (lStdDev);
lDummyVirtualClass.setYield (lYield);
lDummyVirtualClass.setMean (lMean);
lDummyVirtualClass.setStdDev (lStdDev);
lDummyLegCabin.addVirtualClass (lDummyVirtualClass);
}
void CmdBomManager::buildDummyInventory (BomRoot& ioBomRoot,
AirlineFeature& lAirlineFeature =
FlightDate& lFlightDate =
lLegCabin.setCapacities (iCapacity);
lLegCabin.setAvailabilityPool (iCapacity);
SegmentDate& lSegment =
std::ostringstream oStr;
lSegment.addLegKey (oStr.str());
SegmentCabin& lSegmentCabin =
FareFamilyKey l1FareFamilyKey (l1);
FareFamily& lSegmentYCabin1Family =
BookingClassKey lQBookingClassKey (lQ);
BookingClass& lSegmentYCabin1FamilyQClass =
lSegmentYCabin1FamilyQClass);
lSegmentYCabin1FamilyQClass);
const DoWStruct lDoWSrtuct ("1111111");
const DatePeriod_T lXXDatePeriod (lXXDateRangeStart, lXXDateRangeEnd);
const PeriodStruct lXXPeriodStruct (lXXDatePeriod, lDoWSrtuct);
FlightPeriod& lXXFlightPeriod =
SegmentPeriod& lXXSegmentPeriod =
lXXSegmentPeriod.setBoardingTime (
Duration_T (14, 0, 0));
lXXSegmentPeriod.setOffTime (
Duration_T (16, 0, 0));
lXXSegmentPeriod.setElapsedTime (
Duration_T (8, 0, 0));
lXXSegmentPeriod.addCabinBookingClassList (lY,lYQ);
}
void CmdBomManager::
buildCompleteDummyInventoryForFareFamilies (BomRoot& ioBomRoot) {
Inventory& lInv = BomManager::getObject<Inventory>(ioBomRoot,
lInventoryKey.toString());
FlightDate& lFlightDate =
LegDateKey lLegDateKey (DEFAULT_ORIGIN);
lLegCabin.setCapacities (lCapacity);
lLegCabin.setAvailabilityPool (lCapacity);
SegmentDate& lSegment =
std::ostringstream oStr;
lSegment.addLegKey (oStr.str());
SegmentCabin& lSegmentCabin =
const FareFamilyKey l1FareFamilyKey (l1);
FareFamily& lSegmentYCabin1Family =
const unsigned int size = 16;
for (unsigned int idx = 0; idx < size; ++idx) {
double i = static_cast<double> (idx);
lDemandVector1FareFamily.push_back(lMeanStdDevPair);
}
lSegmentYCabin1Family.setMeanStdDev(lDemandVector1FareFamily);
const BookingClassKey lYBookingClassKey (lY);
BookingClass& lSegmentYCabin1FamilyYClass =
lSegmentYCabin1FamilyYClass.setYield(lYield);
lSegmentYCabin1FamilyYClass);
lSegmentYCabin1FamilyYClass);
const BookingClassKey lUBookingClassKey (lU);
BookingClass& lSegmentYCabin1FamilyUClass =
lYield = 600;
lSegmentYCabin1FamilyUClass.setYield(lYield);
lSegmentYCabin1FamilyUClass);
lSegmentYCabin1FamilyUClass);
const FareFamilyKey l2FareFamilyKey (l2);
FareFamily& lSegmentYCabin2Family =
for (unsigned int idx = 0; idx < size; ++idx) {
double i = static_cast<double> (idx);
lDemandVector2FareFamily.push_back(lMeanStdDevPair);
}
lSegmentYCabin2Family.setMeanStdDev(lDemandVector2FareFamily);
const BookingClassKey lOBookingClassKey (lO);
BookingClass& lSegmentYCabin2FamilyOClass =
lYield = 750;
lSegmentYCabin2FamilyOClass.setYield(lYield);
lSegmentYCabin2FamilyOClass);
lSegmentYCabin2FamilyOClass);
const BookingClassKey lQBookingClassKey (lQ);
BookingClass& lSegmentYCabin2FamilyQClass =
lYield = 400;
lSegmentYCabin2FamilyQClass.setYield(lYield);
lSegmentYCabin2FamilyQClass);
lSegmentYCabin2FamilyQClass);
const DoWStruct lDoWSrtuct ("1111111");
const DatePeriod_T lXXDatePeriod (lXXDateRangeStart, lXXDateRangeEnd);
const PeriodStruct lXXPeriodStruct (lXXDatePeriod, lDoWSrtuct);
lXXPeriodStruct);
FlightPeriod& lXXFlightPeriod =
const SegmentPeriodKey lXXSegmentPeriodKey (DEFAULT_ORIGIN,
SegmentPeriod& lXXSegmentPeriod =
lXXSegmentPeriod.setBoardingTime (
Duration_T (14, 0, 0));
lXXSegmentPeriod.setOffTime (
Duration_T (16, 0, 0));
lXXSegmentPeriod.setElapsedTime (
Duration_T (8, 0, 0));
lXXSegmentPeriod.addCabinBookingClassList (lYCabin,lYUOQ);
}
void CmdBomManager::buildSamplePricing (BomRoot& ioBomRoot) {
AirportPair& lAirportPair =
const Date_T lDateRangeStart (2011, boost::gregorian::Jan, 15);
const Date_T lDateRangeEnd (2011, boost::gregorian::Dec, 31);
const DatePeriod_T lDateRange (lDateRangeStart, lDateRangeEnd);
const DatePeriodKey lDatePeriodKey (lDateRange);
DatePeriod& lDatePeriod =
PosChannel& lPosChannel =
const Time_T lTimeRangeStart (0, 0, 0);
const Time_T lTimeRangeEnd (23, 0, 0);
const TimePeriodKey lTimePeriodKey (lTimeRangeStart, lTimeRangeEnd);
TimePeriod& lTimePeriod =
FareFeatures& lFareFeatures =
YieldFeatures& lYieldFeatures =
const AirlineClassListKey lAirlineClassListKey (lAirlineCodeList,
lClassCodeList);
AirlineClassList& lAirlineClassList =
lAirlineClassList.setFare (900);
lAirlineClassList.setYield (900);
}
void CmdBomManager::buildSamplePricingForFareFamilies (BomRoot& ioBomRoot) {
const AirportPairKey lAirportPairKey ("SIN", "BKK");
AirportPair& lAirportPair =
BomManager::getObject<AirportPair>(ioBomRoot, lAirportPairKey.toString());
const Date_T lDateRangeStart (2010, boost::gregorian::Feb, 1);
const Date_T lDateRangeEnd (2011, boost::gregorian::Feb, 15);
const DatePeriod_T lDateRange (lDateRangeStart, lDateRangeEnd);
const DatePeriodKey lDatePeriodKey (lDateRange);
DatePeriod& lDatePeriod =
const PosChannelKey lPosChannelKey (
"SIN",
CHANNEL_IN);
PosChannel& lPosChannel =
const Time_T lTimeRangeStart (0, 0, 0);
const Time_T lTimeRangeEnd (23, 0, 0);
const TimePeriodKey lTimePeriodKey (lTimeRangeStart, lTimeRangeEnd);
TimePeriod& lTimePeriod =
ONE_MONTH_ADVANCE_PURCHASE,
FareFeatures& lFareFeaturesQ =
FareFeatures& lFareFeaturesM =
ONE_MONTH_ADVANCE_PURCHASE,
FareFeatures& lFareFeaturesB =
FareFeatures& lFareFeaturesY =
YieldFeatures& lYieldFeatures =
lAirlineCodeList.push_back ("SQ");
const AirlineClassListKey lAirlineClassYListKey (lAirlineCodeList,
lClassYList);
AirlineClassList& lAirlineClassYList =
lAirlineClassYList.setFare (1200);
lAirlineClassYList.setYield (1200);
lClassBList.push_back ("B");
const AirlineClassListKey lAirlineClassBListKey (lAirlineCodeList,
lClassBList);
AirlineClassList& lAirlineClassBList =
lAirlineClassBList.setFare (800);
lAirlineClassBList.setYield (800);
lClassMList.push_back ("M");
const AirlineClassListKey lAirlineClassMListKey (lAirlineCodeList,
lClassMList);
AirlineClassList& lAirlineClassMList =
lAirlineClassMList.setFare (900);
lAirlineClassMList.setYield (900);
lClassQList.push_back ("Q");
const AirlineClassListKey lAirlineClassQListKey (lAirlineCodeList,
lClassQList);
AirlineClassList& lAirlineClassQList =
lAirlineClassQList.setFare (600);
lAirlineClassQList.setYield (600);
}
void CmdBomManager::
ioTravelSolutionList.clear();
const std::string lBA9_SegmentDateKey ("BA, 9, 2011-06-10, LHR, SYD, 21:45");
TravelSolutionStruct lTS;
lTS.addSegment (lBA9_SegmentDateKey);
ioTravelSolutionList.push_back (lTS);
}
void CmdBomManager::
ioTravelSolutionList.clear();
const std::string lBA9_SegmentDateKey ("BA, 9, 2011-06-10, LHR, SYD, 21:45");
TravelSolutionStruct lTS1;
lTS1.addSegment (lBA9_SegmentDateKey);
const FareOptionStruct lFareOption1 (lClassPathQ, lFare900, lChangeFee,
isNonRefundable, lSaturdayStay);
lTS1.addFareOption (lFareOption1);
bool hasInsertOfQBeenSuccessful = lClassAvailabilityMap1.
insert (ClassAvailabilityMap_T::value_type (lClassPathQ, lAvl1)).second;
assert (hasInsertOfQBeenSuccessful == true);
lTS1.addClassAvailabilityMap (lClassAvailabilityMap1);
ioTravelSolutionList.push_back (lTS1);
const std::string lQF12_SegmentDateKey ("QF, 12, 2011-06-10, LHR, SYD, 20:45");
TravelSolutionStruct lTS2;
lTS2.addSegment (lQF12_SegmentDateKey);
const Fare_T lFare1000 (1000);
const FareOptionStruct lFareOption2 (lClassPathY, lFare1000, lNoChangeFee,
isRefundable, lSaturdayStay);
const bool hasInsertOfYBeenSuccessful = lClassAvailabilityMap2.
insert (ClassAvailabilityMap_T::value_type (lClassPathY, lAvl2)).second;
assert (hasInsertOfYBeenSuccessful == true);
lTS2.addClassAvailabilityMap (lClassAvailabilityMap2);
lTS2.addFareOption (lFareOption2);
const FareOptionStruct lFareOption3 (lClassPathQ, lFare920, lNoChangeFee,
isNonRefundable, lSaturdayStay);
hasInsertOfQBeenSuccessful = lClassAvailabilityMap2.
insert (ClassAvailabilityMap_T::value_type (lClassPathQ, lAvl2)).second;
assert (hasInsertOfYBeenSuccessful == true);
lTS2.addClassAvailabilityMap (lClassAvailabilityMap2);
lTS2.addFareOption (lFareOption3);
ioTravelSolutionList.push_back (lTS2);
}
BookingRequestStruct CmdBomManager::buildSampleBookingRequest() {
const Date_T lPreferredDepartureDate (2011, boost::gregorian::Jun, 10);
const Duration_T lPreferredDepartureTime (8, 0, 0);
const Date_T lRequestDate (2011, boost::gregorian::May, 15);
const DateTime_T lRequestDateTime (lRequestDate, lRequestTime);
BookingRequestStruct oBookingRequest (lOrigin, lDestination, lPOS,
lPreferredDepartureDate,
lRequestDateTime,
lPreferredCabin,
lPartySize, lChannel,
lTripType, lStayDuration,
lFrequentFlyerType,
lPreferredDepartureTime,
lWTP, lValueOfTime,
lChangeFees, lChangeFeeDisutility,
lNonRefundable,
lNonRefundableDisutility);
return oBookingRequest;
}
BookingRequestStruct CmdBomManager::buildSampleBookingRequestForCRS() {
const Date_T lPreferredDepartureDate (2010, boost::gregorian::Jan, 30);
const Duration_T lPreferredDepartureTime (10, 0, 0);
const Date_T lRequestDate (2010, boost::gregorian::Jan, 22);
const DateTime_T lRequestDateTime (lRequestDate, lRequestTime);
BookingRequestStruct oBookingRequest (lOrigin,
lDestination,
lPOS,
lPreferredDepartureDate,
lRequestDateTime,
lPreferredCabin,
lPartySize, lChannel,
lTripType, lStayDuration,
lFrequentFlyerType,
lPreferredDepartureTime,
lWTP, lValueOfTime,
lChangeFees, lChangeFeeDisutility,
lNonRefundable,
lNonRefundableDisutility);
return oBookingRequest;
}
void CmdBomManager::
buildPartnershipsSampleInventoryAndRM (BomRoot& ioBomRoot) {
const InventoryKey lSQKey (lAirlineCodeSQ);
const AirlineFeatureKey lAirlineFeatureSQKey (lAirlineCodeSQ);
AirlineFeature& lAirlineFeatureSQ =
const InventoryKey lCXKey (lAirlineCodeCX);
const AirlineFeatureKey lAirlineFeatureCXKey (lAirlineCodeCX);
AirlineFeature& lAirlineFeatureCX =
FlightDateKey lFlightDateKey (lFlightNumber, lDate);
FlightDate& lSQ11_20100308_FD =
FlightDateKey lMktFlightDateKey (lMktFlightNumber, lDate);
FlightDate& lSQ1200_20100308_FD =
SegmentDateKey lSegmentDateKey (lSIN, lBKK);
SegmentDate& lSINBKKSegment =
const std::string lSQSINRoutingLegStr = "SQ;11;2010-Mar-8;SIN";
lSINBKKSegment.addLegKey (lSQSINRoutingLegStr);
lSINBKKSegment.setBoardingDate (lDate);
lSINBKKSegment.setOffDate (lDate);
lSINBKKSegment.setBoardingTime (l0820);
lSINBKKSegment.setOffTime (l1100);
lSINBKKSegment.setElapsedTime (l0340);
SegmentDateKey lMktSegmentDateKey (lBKK, lHKG);
SegmentDate& lMktBKKHKGSegment =
const std::string lCXBKKRoutingLegStr = "CX;12;2010-Mar-8;BKK";
lMktBKKHKGSegment.addLegKey (lCXBKKRoutingLegStr);
lMktBKKHKGSegment.setBoardingDate (lDate);
lMktBKKHKGSegment.setOffDate (lDate);
lMktBKKHKGSegment.setBoardingTime (l1200);
lMktBKKHKGSegment.setOffTime (l1540);
lMktBKKHKGSegment.setElapsedTime (l0240);
LegDateKey lLegDateKey (lSIN);
lSINLeg.setOffPoint (lBKK);
lSINLeg.setBoardingDate (lDate);
lSINLeg.setOffDate (lDate);
lSINLeg.setBoardingTime (l0820);
lSINLeg.setOffTime (l1100);
lSINLeg.setElapsedTime (l0340);
SegmentCabinKey lYSegmentCabinKey (lY);
SegmentCabin& lSINBKKSegmentYCabin =
SegmentCabin& lMktBKKHKGSegmentYCabin =
LegCabinKey lYLegCabinKey (lY);
LegCabin& lSINLegYCabin =
lSINLegYCabin.setCapacities (lCapacity);
lSINLegYCabin.setAvailabilityPool (lCapacity);
FareFamilyKey l1FareFamilyKey (l1);
FareFamily& lSINBKKSegmentYCabin1Family =
lSINBKKSegmentYCabin1Family);
lSINBKKSegmentYCabin1Family);
FareFamily& lMktBKKHKGSegmentYCabin1Family =
lMktBKKHKGSegmentYCabin1Family);
lMktBKKHKGSegmentYCabin1Family);
BookingClassKey lYBookingClassKey (lY);
BookingClass& lSINBKKSegmentYCabin1FamilyYClass =
lSINBKKSegmentYCabin1FamilyYClass);
lSINBKKSegmentYCabin1FamilyYClass);
lSINBKKSegmentYCabin1FamilyYClass);
lSINBKKSegmentYCabin1FamilyYClass);
lSINBKKSegmentYCabin1FamilyYClass.setYield(700);
BookingClass& lMktBKKHKGSegmentYCabin1FamilyYClass =
lMktBKKHKGSegmentYCabin1FamilyYClass);
lMktBKKHKGSegmentYCabin1FamilyYClass);
lMktBKKHKGSegmentYCabin1FamilyYClass);
lMktBKKHKGSegmentYCabin1FamilyYClass);
lMktBKKHKGSegmentYCabin1FamilyYClass.setYield(700);
BookingClassKey lMBookingClassKey (lM);
BookingClass& lSINBKKSegmentYCabin1FamilyMClass =
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass);
lSINBKKSegmentYCabin1FamilyMClass.setYield(500);
BookingClass& lMktBKKHKGSegmentYCabin1FamilyMClass =
lMktBKKHKGSegmentYCabin1FamilyMClass);
lMktBKKHKGSegmentYCabin1FamilyMClass);
lMktBKKHKGSegmentYCabin1FamilyMClass);
lMktBKKHKGSegmentYCabin1FamilyMClass);
lMktBKKHKGSegmentYCabin1FamilyMClass.setYield(500);
OnDString_T lSQSINBKKOnDStr =
"SQ;11,2010-Mar-08;SIN,BKK";
OnDString_T lMktSQBKKHKGOnDStr =
"SQ;1200,2010-Mar-08;BKK,HKG";
lOnDStringList.push_back (lSQSINBKKOnDStr);
lOnDStringList.push_back (lMktSQBKKHKGOnDStr);
OnDDateKey lOnDDateKey (lOnDStringList);
OnDDate& lSQ_SINHKG_OnDDate =
const WTP_T lWTP750 = 750.0;
lSQ_SINHKG_OnDDate.setTotalForecast (lY, lWTP750Mean60StdDev6);
lCabinClassPairList.push_back(lCC_YM1);
lCabinClassPairList.push_back(lCC_YM2);
lSQ_SINHKG_OnDDate.setDemandInformation (lCabinClassPairList, lYield850Mean20StdDev2);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YY1);
lCabinClassPairList.push_back(lCC_YY2);
lMean10StdDev1);
lSQ_SINHKG_OnDDate.setDemandInformation (lCabinClassPairList,
lYield1200Mean10StdDev1);
lOnDStringList.clear();
lOnDStringList.push_back (lSQSINBKKOnDStr);
lOnDDateKey = OnDDateKey(lOnDStringList);
OnDDate& lSQ_SINBKK_OnDDate =
const WTP_T lWTP400 = 400.0;
lSQ_SINBKK_OnDDate.setTotalForecast (lY, lWTP400Mean60StdDev6);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YM1);
lSQ_SINBKK_OnDDate.setDemandInformation (lCabinClassPairList,
lYield500Mean20StdDev1);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YY1);
lSQ_SINBKK_OnDDate.setDemandInformation (lCabinClassPairList,
lYield700Mean20StdDev1);
lFlightNumber = 12;
lFlightDateKey = FlightDateKey (lFlightNumber, lDate);
FlightDate& lCX12_20100308_FD =
lFlightNumber = 1100;
lMktFlightDateKey = FlightDateKey (lFlightNumber, lDate);
FlightDate& lCX1100_20100308_FD =
lSegmentDateKey = SegmentDateKey (lBKK, lHKG);
SegmentDate& lBKKHKGSegment =
lBKKHKGSegment.addLegKey (lCXBKKRoutingLegStr);
lBKKHKGSegment.setBoardingDate (lDate);
lBKKHKGSegment.setOffDate (lDate);
lBKKHKGSegment.setBoardingTime (l1200);
lBKKHKGSegment.setOffTime (l1540);
lBKKHKGSegment.setElapsedTime (l0240);
lMktSegmentDateKey = SegmentDateKey (lSIN, lBKK);
SegmentDate& lMktSINBKKSegment =
lMktSINBKKSegment.addLegKey (lSQSINRoutingLegStr);
lMktSINBKKSegment.setBoardingDate (lDate);
lMktSINBKKSegment.setOffDate (lDate);
lMktSINBKKSegment.setBoardingTime (l0820);
lMktSINBKKSegment.setOffTime (l1100);
lMktSINBKKSegment.setElapsedTime (l0340);
lLegDateKey = LegDateKey (lBKK);
lBKKLeg.setOffPoint (lHKG);
lBKKLeg.setBoardingDate (lDate);
lBKKLeg.setOffDate (lDate);
lBKKLeg.setBoardingTime (l1200);
lBKKLeg.setOffTime (l1540);
lBKKLeg.setElapsedTime (l0240);
SegmentCabin& lBKKHKGSegmentYCabin =
SegmentCabin& lMktSINBKKSegmentYCabin =
LegCabin& lBKKLegYCabin =
lBKKLegYCabin.setCapacities (lCapacity);
lBKKLegYCabin.setAvailabilityPool (lCapacity);
FareFamily& lBKKHKGSegmentYCabin1Family =
lBKKHKGSegmentYCabin1Family);
lBKKHKGSegmentYCabin1Family);
FareFamily& lMktSINBKKSegmentYCabin1Family =
lMktSINBKKSegmentYCabin1Family);
lMktSINBKKSegmentYCabin1Family);
BookingClass& lBKKHKGSegmentYCabin1FamilyYClass =
lBKKHKGSegmentYCabin1FamilyYClass);
lBKKHKGSegmentYCabin1FamilyYClass);
lBKKHKGSegmentYCabin1FamilyYClass);
lBKKHKGSegmentYCabin1FamilyYClass);
lBKKHKGSegmentYCabin1FamilyYClass.setYield(700);
BookingClass& lMktSINBKKSegmentYCabin1FamilyYClass =
lMktSINBKKSegmentYCabin1FamilyYClass);
lMktSINBKKSegmentYCabin1FamilyYClass);
lMktSINBKKSegmentYCabin1FamilyYClass);
lMktSINBKKSegmentYCabin1FamilyYClass);
lMktSINBKKSegmentYCabin1FamilyYClass.setYield(700);
BookingClass& lBKKHKGSegmentYCabin1FamilyMClass =
lBKKHKGSegmentYCabin1FamilyMClass);
lBKKHKGSegmentYCabin1FamilyMClass);
lBKKHKGSegmentYCabin1FamilyMClass);
lBKKHKGSegmentYCabin1FamilyMClass);
lBKKHKGSegmentYCabin1FamilyMClass.setYield(500);
BookingClass& lMktSINBKKSegmentYCabin1FamilyMClass =
lMktSINBKKSegmentYCabin1FamilyMClass);
lMktSINBKKSegmentYCabin1FamilyMClass);
lMktSINBKKSegmentYCabin1FamilyMClass);
lMktSINBKKSegmentYCabin1FamilyMClass);
lMktSINBKKSegmentYCabin1FamilyMClass.setYield(500);
OnDString_T lMktCXSINBKKOnDStr =
"CX;1100,2010-Mar-08;SIN,BKK";
OnDString_T lCXBKKHKGOnDStr =
"CX;12,2010-Mar-08;BKK,HKG";
lOnDStringList.clear();
lOnDStringList.push_back (lMktCXSINBKKOnDStr);
lOnDStringList.push_back (lCXBKKHKGOnDStr);
lOnDDateKey = OnDDateKey(lOnDStringList);
OnDDate& lCX_SINHKG_OnDDate =
lCX_SINHKG_OnDDate.setTotalForecast (lY, lWTP750Mean60StdDev6);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YM1);
lCabinClassPairList.push_back(lCC_YM2);
lCX_SINHKG_OnDDate.setDemandInformation (lCabinClassPairList,
lYield850Mean20StdDev2);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YY1);
lCabinClassPairList.push_back(lCC_YY2);
lCX_SINHKG_OnDDate.setDemandInformation (lCabinClassPairList,
lYield1200Mean10StdDev1);
lOnDStringList.clear();
lOnDStringList.push_back (lCXBKKHKGOnDStr);
lOnDDateKey = OnDDateKey(lOnDStringList);
OnDDate& lCX_BKKHKG_OnDDate =
lCX_BKKHKG_OnDDate.setTotalForecast (lY, lWTP400Mean60StdDev6);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YM2);
lCX_BKKHKG_OnDDate.setDemandInformation (lCabinClassPairList,
lYield500Mean20StdDev1);
lCabinClassPairList.clear();
lCabinClassPairList.push_back(lCC_YY2);
lCX_BKKHKG_OnDDate.setDemandInformation (lCabinClassPairList,
lYield700Mean10StdDev1);
const DoWStruct lDoWSrtuct ("1111111");
const Date_T lDateRangeStart (2010, boost::gregorian::Mar, 8);
const Date_T lDateRangeEnd (2010, boost::gregorian::Mar, 9);
const DatePeriod_T lDatePeriod (lDateRangeStart, lDateRangeEnd);
const PeriodStruct lPeriodStruct (lDatePeriod,lDoWSrtuct);
FlightPeriodKey lFlightPeriodKey (lFlightNumber, lPeriodStruct);
FlightPeriod& lSQ11FlightPeriod =
SegmentPeriodKey lSegmentPeriodKey (lSIN, lBKK);
SegmentPeriod& lSINBKKSegmentPeriod =
lSINBKKSegmentPeriod.setBoardingTime (l0820);
lSINBKKSegmentPeriod.setOffTime (l1100);
lSINBKKSegmentPeriod.setElapsedTime (l0340);
lSINBKKSegmentPeriod.addCabinBookingClassList (lY,lYM);
lFlightPeriodKey = FlightPeriodKey(lFlightNumber, lPeriodStruct);
FlightPeriod& lCX12FlightPeriod =
lSegmentPeriodKey = SegmentPeriodKey (lBKK, lHKG);
SegmentPeriod& lBKKHKGSegmentPeriod =
lBKKHKGSegmentPeriod.setBoardingTime (l1200);
lBKKHKGSegmentPeriod.setOffTime (l1540);
lBKKHKGSegmentPeriod.setElapsedTime (l0240);
lBKKHKGSegmentPeriod.addCabinBookingClassList (lY,lYM);
}
void CmdBomManager::buildPartnershipsSamplePricing (BomRoot& ioBomRoot) {
AirportPairKey lAirportPairKey ("SIN", "BKK");
AirportPair& lSINBKKAirportPair =
const Date_T lDateRangeStart (2010, boost::gregorian::Mar, 01);
const Date_T lDateRangeEnd (2010, boost::gregorian::Mar, 31);
const DatePeriod_T lDateRange (lDateRangeStart, lDateRangeEnd);
const DatePeriodKey lDatePeriodKey (lDateRange);
DatePeriod& lSINBKKDatePeriod =
PosChannelKey lPosChannelKey ("SIN","IN");
PosChannel& lSINPosChannel =
const Time_T lTimeRangeStart (0, 0, 0);
const Time_T lTimeRangeEnd (23, 0, 0);
const TimePeriodKey lFareTimePeriodKey (lTimeRangeStart,
lTimeRangeEnd);
TimePeriod& lSINBKKFareTimePeriod =
FareFeatures& lSINBKKFareFeatures =
lSQAirlineCodeList.push_back ("SQ");
lYClassCodeList.push_back ("Y");
const AirlineClassListKey lSQAirlineYClassListKey (lSQAirlineCodeList,
lYClassCodeList);
lMClassCodeList.push_back ("M");
const AirlineClassListKey lSQAirlineMClassListKey (lSQAirlineCodeList,
lMClassCodeList);
AirlineClassList& lSQAirlineYClassList =
lSQAirlineYClassList.setFare(700);
AirlineClassList& lSQAirlineMClassList =
lSQAirlineMClassList.setFare(500);
lAirportPairKey = AirportPairKey ("BKK", "HKG");
AirportPair& lBKKHKGAirportPair =
DatePeriod& lBKKHKGDatePeriod =
lPosChannelKey = PosChannelKey("BKK","IN");
PosChannel& lBKKPosChannel =
TimePeriod& lBKKHKGFareTimePeriod =
FareFeatures& lBKKHKGFareFeatures =
lCXAirlineCodeList.push_back ("CX");
const AirlineClassListKey lCXAirlineYClassListKey (lCXAirlineCodeList,
lYClassCodeList);
const AirlineClassListKey lCXAirlineMClassListKey (lCXAirlineCodeList,
lMClassCodeList);
AirlineClassList& lCXAirlineYClassList =
lCXAirlineYClassList.setFare(700);
AirlineClassList& lCXAirlineMClassList =
lCXAirlineMClassList.setFare(500);
lAirportPairKey = AirportPairKey ("SIN", "HKG");
AirportPair& lSINHKGAirportPair =
DatePeriod& lSINHKGDatePeriod =
lPosChannelKey = PosChannelKey("SIN","IN");
PosChannel& lOnDSINPosChannel =
TimePeriod& lSINHKGFareTimePeriod =
FareFeatures& lSINHKGFareFeatures =
lSQ_CXAirlineCodeList.push_back ("SQ");
lSQ_CXAirlineCodeList.push_back ("CX");
lY_YClassCodeList.push_back ("Y");
lY_YClassCodeList.push_back ("Y");
const AirlineClassListKey lSQ_CXAirlineYClassListKey (lSQ_CXAirlineCodeList,
lY_YClassCodeList);
lM_MClassCodeList.push_back ("M");
lM_MClassCodeList.push_back ("M");
const AirlineClassListKey lSQ_CXAirlineMClassListKey (lSQ_CXAirlineCodeList,
lM_MClassCodeList);
AirlineClassList& lSQ_CXAirlineYClassList =
lSQ_CXAirlineYClassList.setFare(1200);
lSQ_CXAirlineYClassList);
lSQ_CXAirlineYClassList);
AirlineClassList& lSQ_CXAirlineMClassList =
lSQ_CXAirlineMClassList.setFare(850);
lSQ_CXAirlineMClassList);
lSQ_CXAirlineMClassList);
PosChannel& lRAC_SINBKKPosChannel =
const TimePeriodKey lYieldTimePeriodKey (lTimeRangeStart,
lTimeRangeEnd);
TimePeriod& lSINBKKYieldTimePeriod =
lSINBKKYieldTimePeriod);
lSINBKKYieldTimePeriod);
YieldFeatures& lSINBKKYieldFeatures =
lSINBKKYieldFeatures);
lSINBKKYieldFeatures);
AirlineClassList& lRAC_SQAirlineYClassList =
lRAC_SQAirlineYClassList.setYield(700);
lRAC_SQAirlineYClassList);
lRAC_SQAirlineYClassList);
AirlineClassList& lRAC_SQAirlineMClassList =
lRAC_SQAirlineMClassList.setYield(500);
lRAC_SQAirlineMClassList);
lRAC_SQAirlineMClassList);
PosChannel& lRAC_BKKHKGPosChannel =
TimePeriod& lBKKHKGYieldTimePeriod =
lBKKHKGYieldTimePeriod);
lBKKHKGYieldTimePeriod);
YieldFeatures& lBKKHKGYieldFeatures =
lBKKHKGYieldFeatures);
lBKKHKGYieldFeatures);
AirlineClassList& lRAC_CXAirlineYClassList =
lRAC_CXAirlineYClassList.setYield(700);
lRAC_CXAirlineYClassList);
lRAC_CXAirlineYClassList);
AirlineClassList& lRAC_CXAirlineMClassList =
lRAC_CXAirlineMClassList.setYield(500);
lRAC_CXAirlineMClassList);
lRAC_CXAirlineMClassList);
PosChannel& lRAC_SINHKGChannel =
TimePeriod& lSINHKGYieldTimePeriod =
YieldFeatures& lSINHKGYieldFeatures =
lSINHKGYieldFeatures);
lSINHKGYieldFeatures);
AirlineClassList& lRAC_SQ_CXAirlineYClassList =
lRAC_SQ_CXAirlineYClassList.setYield(1200);
lRAC_SQ_CXAirlineYClassList);
lRAC_SQ_CXAirlineYClassList);
AirlineClassList& lRAC_SQ_CXAirlineMClassList =
lRAC_SQ_CXAirlineMClassList.setYield(850);
lRAC_SQ_CXAirlineMClassList);
lRAC_SQ_CXAirlineMClassList);
}
}
/
#include <cassert>
#include <sstream>
void CmdCloneBomManager::cloneBomRoot (const BomRoot& iBomRoot,
BomRoot& ioCloneBomRoot) {
const bool hasInventoryList = BomManager::hasList<Inventory> (iBomRoot);
if (hasInventoryList == true) {
BomManager::getList<Inventory> (iBomRoot);
for (InventoryList_T::const_iterator itInv = lInventoryList.begin();
itInv != lInventoryList.end(); ++itInv) {
const Inventory* lInv_ptr = *itInv;
assert (lInv_ptr != NULL);
Inventory& lCloneInventory = cloneInventory (*lInv_ptr, ioCloneBomRoot);
}
}
const bool hastAirportPairList =
BomManager::hasList<AirportPair> (iBomRoot);
if (hastAirportPairList == true) {
BomManager::getList<AirportPair> (iBomRoot);
for (AirportPairList_T::const_iterator itAirportPair =
lAirportPairList.begin();
itAirportPair != lAirportPairList.end(); ++itAirportPair) {
const AirportPair* lAirportPair_ptr = *itAirportPair;
assert (lAirportPair_ptr != NULL);
AirportPair& lCloneAirportPair = cloneAirportPair (*lAirportPair_ptr);
}
}
}
Inventory& CmdCloneBomManager::cloneInventory (const Inventory& iInventory,
BomRoot& ioCloneBomRoot) {
Inventory& lCloneInventory =
const bool hasFlighDateList = BomManager::hasList<FlightDate> (iInventory);
if (hasFlighDateList == true) {
BomManager::getList<FlightDate> (iInventory);
for (FlightDateList_T::const_iterator itFD = lFlightDateList.begin();
itFD != lFlightDateList.end(); ++itFD) {
const FlightDate* lFD_ptr = *itFD;
assert (lFD_ptr != NULL);
FlightDate& lCloneFD = cloneFlightDate (*lFD_ptr);
}
}
const bool hasPartnerList = BomManager::hasList<Inventory> (iInventory);
if (hasPartnerList == true) {
BomManager::getList<Inventory> (iInventory);
for (InventoryList_T::const_iterator itInv =
lPartnerInventoryList.begin();
itInv != lPartnerInventoryList.end(); ++itInv) {
const Inventory* lInv_ptr = *itInv;
assert (lInv_ptr != NULL);
Inventory& lClonePartnerInventory = cloneInventory (*lInv_ptr,
ioCloneBomRoot);
lClonePartnerInventory);
lClonePartnerInventory);
}
}
const bool hasOnDList = BomManager::hasList<OnDDate> (iInventory);
if (hasOnDList == true){
BomManager::getList<OnDDate> (iInventory);
for (OnDDateList_T::const_iterator itOnD = lOnDDateList.begin();
itOnD != lOnDDateList.end(); ++itOnD) {
const OnDDate* lOnDDate_ptr = *itOnD;
assert (lOnDDate_ptr != NULL);
OnDDate& lCloneOnDDate = cloneOnDDate (*lOnDDate_ptr);
}
}
const bool hasFlightPeriodList =
BomManager::hasList<FlightPeriod> (iInventory);
if (hasFlightPeriodList == true) {
BomManager::getList<FlightPeriod> (iInventory);
for (FlightPeriodList_T::const_iterator itFlightPeriod =
lFlightPeriodList.begin();
itFlightPeriod != lFlightPeriodList.end(); ++itFlightPeriod) {
const FlightPeriod* lFlightPeriod_ptr = *itFlightPeriod;
assert (lFlightPeriod_ptr != NULL);
FlightPeriod& lCloneFlightPeriod = cloneFlightPeriod (*lFlightPeriod_ptr);
}
}
const AirlineFeature* lAirlineFeature_ptr =
BomManager::getObjectPtr<AirlineFeature,Inventory> (iInventory,
iInventory.getAirlineCode());
if (lAirlineFeature_ptr != NULL) {
AirlineFeature& lCloneAirlineFeature =
cloneAirlineFeature (*lAirlineFeature_ptr);
}
return lCloneInventory;
}
AirlineFeature& CmdCloneBomManager::
cloneAirlineFeature (const AirlineFeature& iAirlineFeature) {
AirlineFeature& lCloneAirlineFeature =
return lCloneAirlineFeature;
}
OnDDate& CmdCloneBomManager::cloneOnDDate (const OnDDate& iOnDDate) {
OnDDate& lCloneOnDDate =
return lCloneOnDDate;
}
FlightDate& CmdCloneBomManager::
cloneFlightDate (const FlightDate& iFlightDate) {
FlightDate& lCloneFlightDate =
const bool hasLegDateList = BomManager::hasList<LegDate> (iFlightDate);
if (hasLegDateList == true) {
BomManager::getList<LegDate> (iFlightDate);
for (LegDateList_T::const_iterator itLD = lLegDateList.begin();
itLD != lLegDateList.end(); ++itLD) {
const LegDate* lLD_ptr = *itLD;
assert (lLD_ptr != NULL);
LegDate& lCloneLegDate = cloneLegDate (*lLD_ptr);
}
}
const bool hasSegmentDateList =
BomManager::hasList<SegmentDate> (iFlightDate);
if (hasSegmentDateList == true) {
BomManager::getList<SegmentDate> (iFlightDate);
for (SegmentDateList_T::const_iterator itSD = lSegmentDateList.begin();
itSD != lSegmentDateList.end(); ++itSD) {
const SegmentDate* lSD_ptr = *itSD;
assert (lSD_ptr != NULL);
SegmentDate& lCloneSegmentDate = cloneSegmentDate (*lSD_ptr);
}
}
return lCloneFlightDate;
}
LegDate& CmdCloneBomManager::cloneLegDate (const LegDate& iLegDate) {
LegDate& lCloneLegDate =
const bool hasLegCabinList = BomManager::hasList<LegCabin> (iLegDate);
if (hasLegCabinList == true) {
BomManager::getList<LegCabin> (iLegDate);
for (LegCabinList_T::const_iterator itLC = lLegCabinList.begin();
itLC != lLegCabinList.end(); ++itLC) {
const LegCabin* lLC_ptr = *itLC;
assert (lLC_ptr != NULL);
LegCabin& lCloneLegCabin = cloneLegCabin (*lLC_ptr);
}
}
return lCloneLegDate;
}
LegCabin& CmdCloneBomManager::cloneLegCabin (const LegCabin& iLegCabin) {
LegCabin& lCloneLegCabin =
const bool hasBucketList = BomManager::hasList<Bucket> (iLegCabin);
if (hasBucketList == true) {
BomManager::getList<Bucket> (iLegCabin);
for (BucketList_T::const_iterator itBucket = lBucketList.begin();
itBucket != lBucketList.end(); ++itBucket) {
const Bucket* lBucket_ptr = *itBucket;
assert (lBucket_ptr != NULL);
Bucket& lCloneBucket = cloneBucket (*lBucket_ptr);
}
}
return lCloneLegCabin;
}
Bucket& CmdCloneBomManager::cloneBucket (const Bucket& iBucket) {
Bucket& lCloneBucket =
return lCloneBucket;
}
SegmentDate& CmdCloneBomManager::
cloneSegmentDate (const SegmentDate& iSegmentDate) {
SegmentDate& lCloneSegmentDate =
const bool hasSegmentCabinList =
BomManager::hasList<SegmentCabin> (iSegmentDate);
if (hasSegmentCabinList == true) {
BomManager::getList<SegmentCabin> (iSegmentDate);
for (SegmentCabinList_T::const_iterator itSC = lSegmentCabinList.begin();
itSC != lSegmentCabinList.end(); ++itSC) {
const SegmentCabin* lSC_ptr = *itSC;
assert (lSC_ptr != NULL);
SegmentCabin& lCloneSegmentCabin = cloneSegmentCabin (*lSC_ptr);
linkBookingClassesWithSegment (lCloneSegmentDate,
lCloneSegmentCabin);
}
}
return lCloneSegmentDate;
}
void CmdCloneBomManager::
linkBookingClassesWithSegment (SegmentDate& iCloneSegmentDate,
SegmentCabin& iCloneSegmentCabin) {
const bool hasFareFamilyList =
BomManager::hasList<FareFamily> (iCloneSegmentCabin);
if (hasFareFamilyList == true) {
BomManager::getList<FareFamily> (iCloneSegmentCabin);
for (FareFamilyList_T::const_iterator itCloneFF = lCloneFFList.begin();
itCloneFF != lCloneFFList.end(); ++itCloneFF) {
const FareFamily* lCloneFF_ptr = *itCloneFF;
assert (lCloneFF_ptr != NULL);
const bool hasBookingClasslist =
BomManager::hasList<BookingClass> (*lCloneFF_ptr);
if (hasBookingClasslist == true) {
BomManager::getList<BookingClass> (*lCloneFF_ptr);
for (BookingClassList_T::const_iterator itCloneBC =
lCloneBCList.begin();
itCloneBC != lCloneBCList.end(); ++itCloneBC) {
const BookingClass* lCloneBC_ptr = *itCloneBC;
assert (lCloneBC_ptr != NULL);
*lCloneBC_ptr);
*lCloneBC_ptr);
}
}
}
}
}
SegmentCabin& CmdCloneBomManager::
cloneSegmentCabin (const SegmentCabin& iSegmentCabin) {
SegmentCabin& lCloneSegmentCabin =
const bool hasFareFamilyList =
BomManager::hasList<FareFamily> (iSegmentCabin);
if (hasFareFamilyList == true) {
BomManager::getList<FareFamily> (iSegmentCabin);
for (FareFamilyList_T::const_iterator itFF = lFareFamilyList.begin();
itFF != lFareFamilyList.end(); ++itFF) {
const FareFamily* lFF_ptr = *itFF;
assert (lFF_ptr != NULL);
FareFamily& lCloneFareFamily = cloneFareFamily (*lFF_ptr);
}
}
return lCloneSegmentCabin;
}
FareFamily& CmdCloneBomManager::
cloneFareFamily (const FareFamily& iFareFamily) {
FareFamily& lCloneFareFamily =
const bool hasBookingClassList =
BomManager::hasList<BookingClass> (iFareFamily);
if (hasBookingClassList == true) {
BomManager::getList<BookingClass> (iFareFamily);
for (BookingClassList_T::const_iterator itBookingClass =
lBookingClassList.begin();
itBookingClass != lBookingClassList.end(); ++itBookingClass) {
const BookingClass* lBC_ptr = *itBookingClass;
assert (lBC_ptr != NULL);
BookingClass& lCloneBookingClass = cloneBookingClass (*lBC_ptr);
}
}
return lCloneFareFamily;
}
BookingClass& CmdCloneBomManager::
cloneBookingClass (const BookingClass& iBookingClass) {
BookingClass& lCloneBookingClass =
return lCloneBookingClass;
}
AirportPair& CmdCloneBomManager::
cloneAirportPair (const AirportPair& iAirportPair) {
AirportPair& lCloneAirportPair =
const bool hasDatePeriodList =
BomManager::hasList<DatePeriod> (iAirportPair);
if (hasDatePeriodList == true) {
BomManager::getList<DatePeriod> (iAirportPair);
for (DatePeriodList_T::const_iterator itDatePeriod =
lDatePeriodList.begin();
itDatePeriod != lDatePeriodList.end(); ++itDatePeriod) {
const DatePeriod* lDatePeriod_ptr = *itDatePeriod;
assert (lDatePeriod_ptr != NULL);
DatePeriod& lCloneDatePeriod = cloneDatePeriod (*lDatePeriod_ptr);
}
}
return lCloneAirportPair;
}
DatePeriod& CmdCloneBomManager::
cloneDatePeriod (const DatePeriod& iDatePeriod) {
DatePeriod& lCloneDatePeriod =
const bool hasPosChannelList =
BomManager::hasList<PosChannel> (iDatePeriod);
if (hasPosChannelList == true) {
BomManager::getList<PosChannel> (iDatePeriod);
for (PosChannelList_T::const_iterator itPosChannel =
lPosChannelList.begin();
itPosChannel != lPosChannelList.end(); ++itPosChannel) {
const PosChannel* lPosChannel_ptr = *itPosChannel;
assert (lPosChannel_ptr != NULL);
PosChannel& lClonePosChannel = clonePosChannel (*lPosChannel_ptr);
}
}
return lCloneDatePeriod;
}
PosChannel& CmdCloneBomManager::
clonePosChannel (const PosChannel& iPosChannel) {
PosChannel& lClonePosChannel =
const bool hasTimePeriodList =
BomManager::hasList<TimePeriod> (iPosChannel);
if (hasTimePeriodList == true) {
BomManager::getList<TimePeriod> (iPosChannel);
for (TimePeriodList_T::const_iterator itTimePeriod =
lTimePeriodList.begin();
itTimePeriod != lTimePeriodList.end(); ++itTimePeriod) {
const TimePeriod* lTimePeriod_ptr = *itTimePeriod;
assert (lTimePeriod_ptr != NULL);
TimePeriod& lCloneTimePeriod = cloneTimePeriod (*lTimePeriod_ptr);
}
}
return lClonePosChannel;
}
TimePeriod& CmdCloneBomManager::
cloneTimePeriod (const TimePeriod& iTimePeriod) {
TimePeriod& lCloneTimePeriod =
const bool hasFareFeaturesList =
BomManager::hasList<FareFeatures> (iTimePeriod);
if (hasFareFeaturesList == true) {
BomManager::getList<FareFeatures> (iTimePeriod);
for (FareFeaturesList_T::const_iterator itFF = lFareFeaturesList.begin();
itFF != lFareFeaturesList.end(); ++itFF) {
const FareFeatures* lFF_ptr = *itFF;
assert (lFF_ptr != NULL);
FareFeatures& lCloneFareFeatures =
cloneFeatures<FareFeatures> (*lFF_ptr);
}
}
const bool hasYieldFeaturesList =
BomManager::hasList<YieldFeatures> (iTimePeriod);
if (hasYieldFeaturesList == true) {
BomManager::getList<YieldFeatures> (iTimePeriod);
for (YieldFeaturesList_T::const_iterator itYF =
lYieldFeaturesList.begin();
itYF != lYieldFeaturesList.end(); ++itYF) {
const YieldFeatures* lYF_ptr = *itYF;
assert (lYF_ptr != NULL);
YieldFeatures& lCloneYieldFeatures =
cloneFeatures<YieldFeatures> (*lYF_ptr);
}
}
return lCloneTimePeriod;
}
template <typename FEATURE_TYPE>
FEATURE_TYPE& CmdCloneBomManager::
cloneFeatures (const FEATURE_TYPE& iFeatures) {
FEATURE_TYPE& lCloneFeatures =
const bool hasAirlineClassListList =
BomManager::hasList<AirlineClassList> (iFeatures);
if (hasAirlineClassListList == true) {
BomManager::getList<AirlineClassList> (iFeatures);
for (AirlineClassListList_T::const_iterator itACList =
lAirlineClassList.begin();
itACList != lAirlineClassList.end(); ++itACList) {
const AirlineClassList* lACList_ptr = *itACList;
assert (lACList_ptr != NULL);
AirlineClassList& lCloneAirlineClassList =
cloneAirlineClassList (*lACList_ptr);
lCloneAirlineClassList);
lCloneAirlineClassList);
}
}
return lCloneFeatures;
}
AirlineClassList& CmdCloneBomManager::
cloneAirlineClassList (const AirlineClassList& iAirlineClassList) {
AirlineClassList& lCloneAirlineClassList =
return lCloneAirlineClassList;
}
FlightPeriod& CmdCloneBomManager::
cloneFlightPeriod (const FlightPeriod& iFlightPeriod) {
FlightPeriod& lCloneFlightPeriod =
const bool hasSegmentPeriodList =
BomManager::hasList<SegmentPeriod> (iFlightPeriod);
if (hasSegmentPeriodList == true) {
BomManager::getList<SegmentPeriod> (iFlightPeriod);
for (SegmentPeriodList_T::const_iterator itSegmentPeriod =
lSegmentPeriodList.begin();
itSegmentPeriod != lSegmentPeriodList.end(); ++itSegmentPeriod) {
const SegmentPeriod* lSegmentPeriod_ptr = *itSegmentPeriod;
assert (lSegmentPeriod_ptr != NULL);
SegmentPeriod& lCloneSegmentPeriod =
cloneSegmentPeriod (*lSegmentPeriod_ptr);
lCloneSegmentPeriod);
lCloneSegmentPeriod);
}
}
return lCloneFlightPeriod;
}
SegmentPeriod& CmdCloneBomManager::
cloneSegmentPeriod (const SegmentPeriod& iSegmentPeriod) {
SegmentPeriod& lCloneSegmentPeriod =
return lCloneSegmentPeriod;
}
}