22#include <ql/utilities/null.hpp>
34 const Real grossRC,
const Real netRC,
const Real ngr,
const Real scheduleIM) {
39 ccy_ = calculationCcy;
41 QL_REQUIRE(calculationCcy ==
ccy_,
"Cannot add value to IMScheduleResults in a different currency ("
42 << calculationCcy <<
"). Expected " <<
ccy_ <<
".");
45 QL_REQUIRE(grossIM != Null<Real>(),
"IMScheduleResults: Gross IM cannot be null.");
46 data_[pc].grossIM += grossIM;
81 return IMScheduleResult(QuantLib::Null<Real>(), QuantLib::Null<Real>(), QuantLib::Null<Real>(),
82 QuantLib::Null<Real>(), QuantLib::Null<Real>());
bool has(const CrifRecord::ProductClass &pc) const
bool empty() const
Return true if the container is empty, otherwise false.
IMScheduleResult get(const CrifRecord::ProductClass &pc) const
Convert Schedule IM amounts to a different currency.
std::map< CrifRecord::ProductClass, IMScheduleResult > data_
void add(const CrifRecord::ProductClass &pc, const std::string &calculationCurrency, const QuantLib::Real grossIM, const QuantLib::Real grossRC, const QuantLib::Real netRC, const QuantLib::Real ngr, const QuantLib::Real scheduleIM)
void clear()
Clear the results from the container.
Class for holding IMSchedule results.