24#ifndef quantlib_index_manager_hpp
25#define quantlib_index_manager_hpp
45 bool hasHistory(
const std::string& name)
const;
51 ext::shared_ptr<Observable>
notifier(
const std::string& name)
const;
53 std::vector<std::string>
histories()
const;
63 bool operator()(
const std::string& s1,
const std::string& s2)
const {
64 return std::lexicographical_compare(s1.begin(), s1.end(), s2.begin(), s2.end(), [](
const auto& c1,
const auto& c2) {
65 return std::toupper(static_cast<unsigned char>(c1)) < std::toupper(static_cast<unsigned char>(c2));
global repository for past index fixings
const TimeSeries< Real > & getHistory(const std::string &name) const
returns the (possibly empty) history of the index fixings
bool hasHistoricalFixing(const std::string &name, const Date &fixingDate) const
returns whether a specific historical fixing was stored for the index and date
void setHistory(const std::string &name, TimeSeries< Real > history)
stores the historical fixings of the index
void clearHistories()
clears all stored fixings
std::map< std::string, ObservableValue< TimeSeries< Real > >, CaseInsensitiveCompare > data_
ext::shared_ptr< Observable > notifier(const std::string &name) const
observer notifying of changes in the index fixings
std::vector< std::string > histories() const
returns all names of the indexes for which fixings were stored
void clearHistory(const std::string &name)
clears the historical fixings of the index
bool hasHistory(const std::string &name) const
returns whether historical fixings were stored for the index
Basic support for the singleton pattern.
Container for historical data.
observable and assignable proxy to concrete value
basic support for the singleton pattern
bool operator()(const std::string &s1, const std::string &s2) const
Container for historical data.