25 Policy::Policy (
const Policy& iPolicy)
31 Policy::Policy (
const Key_T& iKey) : _key (iKey), _parent (NULL) {
40 std::ostringstream oStr;
43 oStr << std::fixed << std::setprecision (2)
46 <<
"; " << _yield << std::endl;
53 return BomManager::getList<BookingClass> (*this);
59 for (YieldDemandMap_T::const_iterator itYD = _yieldDemandMap.begin();
60 itYD != _yieldDemandMap.end(); ++itYD) {
61 const Yield_T& lYield = itYD->first;
62 const double& lDemand = itYD->second;
63 oTotalRevenue += lYield*lDemand;
72 YieldDemandMap_T::iterator itYD = _yieldDemandMap.find (iYield);
73 if (itYD == _yieldDemandMap.end()) {
74 bool insert = _yieldDemandMap.insert (YieldDemandMap_T::value_type
75 (iYield, iDemand)).second;
76 assert (insert ==
true);
void addYieldDemand(const Yield_T &, const NbOfBookings_T &)
const BookingClassList_T & getBookingClassList() const
Handle on the StdAir library context.
NbOfRequests_T NbOfBookings_T
const std::string describeKey() const
const Revenue_T getTotalRevenue() const
std::list< BookingClass * > BookingClassList_T
const PolicyCode_T DEFAULT_POLICY_CODE
Key of a given policy, made of a policy code.
std::string toString() const