7 #include <stdair/basic/BasConst_Inventory.hpp>
8 #include <stdair/bom/BomManager.hpp>
9 #include <stdair/bom/FlightDate.hpp>
10 #include <stdair/bom/SegmentDate.hpp>
11 #include <stdair/bom/SegmentCabin.hpp>
12 #include <stdair/bom/LegCabin.hpp>
25 const stdair::SegmentDateList_T& lSDList =
26 stdair::BomManager::getList<stdair::SegmentDate> (ioFlightDate);
27 for (stdair::SegmentDateList_T::const_iterator itSD = lSDList.begin();
28 itSD != lSDList.end(); ++itSD) {
29 const stdair::SegmentDate* lSD_ptr = *itSD;
30 assert (lSD_ptr != NULL);
33 const stdair::SegmentCabinList_T& lSCList =
34 stdair::BomManager::getList<stdair::SegmentCabin> (*lSD_ptr);
35 for (stdair::SegmentCabinList_T::const_iterator itSC = lSCList.begin();
36 itSC != lSCList.end(); ++itSC) {
37 stdair::SegmentCabin* lSC_ptr = *itSC;
38 assert (lSC_ptr != NULL);
52 const stdair::SegmentDateList_T& lSegmentDateList =
53 stdair::BomManager::getList<stdair::SegmentDate> (iFlightDate);
56 for (stdair::SegmentDateList_T::const_iterator itSegmentDate =
57 lSegmentDateList.begin();
58 itSegmentDate != lSegmentDateList.end(); ++itSegmentDate) {
59 stdair::SegmentDate* lCurrentSegmentDate_ptr = *itSegmentDate;
60 assert (lCurrentSegmentDate_ptr != NULL);
68 const stdair::SegmentCabin& iSegmentCabin,
69 const stdair::PartySize_T& iNbOfBookings) {
71 const stdair::LegCabinList_T& lLegCabinList =
72 stdair::BomManager::getList<stdair::LegCabin> (iSegmentCabin);
73 for (stdair::LegCabinList_T::const_iterator itLegCabin =
74 lLegCabinList.begin();
75 itLegCabin != lLegCabinList.end(); ++itLegCabin) {
76 stdair::LegCabin* lLegCabin_ptr = *itLegCabin;
77 assert (lLegCabin_ptr != NULL);
78 lLegCabin_ptr->updateFromReservation (iNbOfBookings);
83 const stdair::CabinCode_T& lCabinCode = iSegmentCabin.getCabinCode();
93 const stdair::CabinCode_T& iCabinCode){
94 const stdair::SegmentDateList_T& lSegmentDateList =
95 stdair::BomManager::getList<stdair::SegmentDate> (iFlightDate);
96 for (stdair::SegmentDateList_T::const_iterator itSegmentDate =
97 lSegmentDateList.begin(); itSegmentDate != lSegmentDateList.end();
99 const stdair::SegmentDate* lSegmentDate_ptr = *itSegmentDate;
100 assert (lSegmentDate_ptr != NULL);
101 stdair::SegmentCabin& lSegmentCabin =
102 stdair::BomManager::getObject<stdair::SegmentCabin> (*lSegmentDate_ptr,
107 const stdair::LegCabinList_T& lLegCabinList =
108 stdair::BomManager::getList<stdair::LegCabin> (lSegmentCabin);
109 stdair::Availability_T lAvailabilityPool = stdair::MAXIMAL_AVAILABILITY;
110 for (stdair::LegCabinList_T::const_iterator itLegCabin =
111 lLegCabinList.begin();
112 itLegCabin != lLegCabinList.end(); ++itLegCabin) {
113 const stdair::LegCabin* lLegCabin_ptr = *itLegCabin;
114 assert (lLegCabin_ptr != NULL);
115 const stdair::Availability_T& lLegCabinAvailabilityPool =
116 lLegCabin_ptr->getAvailabilityPool();
117 if (lAvailabilityPool > lLegCabinAvailabilityPool) {
118 lAvailabilityPool = lLegCabinAvailabilityPool;
121 lSegmentCabin.setAvailabilityPool (lAvailabilityPool);
128 const stdair::CabinCode_T& iCabinCode){
129 const stdair::SegmentDateList_T& lSegmentDateList =
130 stdair::BomManager::getList<stdair::SegmentDate> (iFlightDate);
131 for (stdair::SegmentDateList_T::const_iterator itSegmentDate =
132 lSegmentDateList.begin(); itSegmentDate != lSegmentDateList.end();
134 const stdair::SegmentDate* lSegmentDate_ptr = *itSegmentDate;
135 assert (lSegmentDate_ptr != NULL);
136 stdair::SegmentCabin& lSegmentCabin =
137 stdair::BomManager::getObject<stdair::SegmentCabin> (*lSegmentDate_ptr,
146 const stdair::SegmentDateList_T& lSegmentDateList =
147 stdair::BomManager::getList<stdair::SegmentDate> (iFlightDate);
148 for (stdair::SegmentDateList_T::const_iterator itSegmentDate =
149 lSegmentDateList.begin(); itSegmentDate != lSegmentDateList.end();
151 const stdair::SegmentDate* lSegmentDate_ptr = *itSegmentDate;
152 assert (lSegmentDate_ptr != NULL);
153 const stdair::SegmentCabinList_T& lSegmentCabinList =
154 stdair::BomManager::getList<stdair::SegmentCabin> (*lSegmentDate_ptr);
155 for (stdair::SegmentCabinList_T::const_iterator itSegmentCabin =
156 lSegmentCabinList.begin();
157 itSegmentCabin != lSegmentCabinList.end(); ++itSegmentCabin) {
158 const stdair::SegmentCabin* lSegmentCabin_ptr = *itSegmentCabin;
159 assert (lSegmentCabin_ptr != NULL);