Exemple #1
0
    std::vector<Date> ECB::nextDates(const Date& date) {
        Date d = (date == Date() ?
                  Settings::instance().evaluationDate() :
                  date);

        std::set<Date>::const_iterator i =
            std::upper_bound(knownDates().begin(), knownDates().end(), d);

        QL_REQUIRE(i!=knownDates().end(),
                   "ECB dates after " << *knownDates().end() << " are unknown");
        return std::vector<Date>(i, knownDates().end());
    }
Exemple #2
0
std::vector<Date> ECB::nextDates(const Date& date) {
    Date d = (date == Date() ?
              Settings::instance().evaluationDate() :
              date);

    std::set<Date>::const_iterator i =
        std::upper_bound(knownDates().begin(), knownDates().end(), d);

    QL_REQUIRE(i!=knownDates().end(),
               "ECB dates after " << *knownDates().end() << " are unknown");

    std::vector<Date> res;
    res.reserve(knownDates().size());
    const std::set<Date>::const_iterator last = knownDates().end();
    while (i != last)
    {
        res.push_back(*i);
        ++i;
    }

    return res;
}
Exemple #3
0
 void ECB::removeDate(const Date& d) {
     knownDates(); // just to ensure inizialization
     knownDateSet.erase(d);
 }
Exemple #4
0
 void ECB::addDate(const Date& d) {
     knownDates(); // just to ensure inizialization
     knownDateSet.insert(d);
 }