QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
global repository for past index fixings More...
#include <indexmanager.hpp>
Classes | |
struct | CaseInsensitiveCompare |
Public Member Functions | |
std::vector< std::string > | histories () const |
returns all names of the indexes for which fixings were stored More... | |
void | clearHistories () |
clears all stored fixings More... | |
bool | hasHistory (const std::string &name) const |
const TimeSeries< Real > & | getHistory (const std::string &name) const |
void | clearHistory (const std::string &name) |
bool | hasHistoricalFixing (const std::string &name, const Date &fixingDate) const |
void | setHistory (const std::string &name, TimeSeries< Real > history) |
ext::shared_ptr< Observable > | notifier (const std::string &name) const |
![]() | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&)=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&)=delete |
~Singleton ()=default | |
Private Member Functions | |
IndexManager ()=default | |
void | addFixing (const std::string &name, const Date &fixingDate, Real fixing, bool forceOverwrite=false) |
add a fixing More... | |
template<class DateIterator , class ValueIterator > | |
void | addFixings (const std::string &name, DateIterator dBegin, DateIterator dEnd, ValueIterator vBegin, bool forceOverwrite=false, const std::function< bool(const Date &d)> &isValidFixingDate={}) |
add fixings More... | |
Private Attributes | |
std::map< std::string, TimeSeries< Real >, CaseInsensitiveCompare > | data_ |
std::map< std::string, ext::shared_ptr< Observable > > | notifiers_ |
Friends | |
class | Singleton< IndexManager > |
class | Index |
Additional Inherited Members | |
![]() | |
static IndexManager & | instance () |
access to the unique instance More... | |
![]() | |
Singleton ()=default | |
global repository for past index fixings
Definition at line 38 of file indexmanager.hpp.
|
privatedefault |
std::vector< std::string > histories | ( | ) | const |
returns all names of the indexes for which fixings were stored
Definition at line 55 of file indexmanager.cpp.
void clearHistories | ( | ) |
clears all stored fixings
Definition at line 70 of file indexmanager.cpp.
bool hasHistory | ( | const std::string & | name | ) | const |
Definition at line 24 of file indexmanager.cpp.
const TimeSeries< Real > & getHistory | ( | const std::string & | name | ) | const |
Definition at line 28 of file indexmanager.cpp.
void clearHistory | ( | const std::string & | name | ) |
Definition at line 63 of file indexmanager.cpp.
Definition at line 78 of file indexmanager.cpp.
void setHistory | ( | const std::string & | name, |
TimeSeries< Real > | history | ||
) |
Definition at line 32 of file indexmanager.cpp.
ext::shared_ptr< Observable > notifier | ( | const std::string & | name | ) | const |
Definition at line 46 of file indexmanager.cpp.
|
private |
add a fixing
Definition at line 39 of file indexmanager.cpp.
|
private |
add fixings
Definition at line 108 of file indexmanager.hpp.
|
friend |
Definition at line 1 of file indexmanager.hpp.
|
friend |
Definition at line 40 of file indexmanager.hpp.
|
mutableprivate |
Definition at line 98 of file indexmanager.hpp.
|
mutableprivate |
Definition at line 99 of file indexmanager.hpp.