QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
IndexManager Class Reference

global repository for past index fixings More...

#include <ql/indexes/indexmanager.hpp>

+ Inheritance diagram for IndexManager:
+ Collaboration diagram for IndexManager:

Classes

struct  CaseInsensitiveCompare
 

Public Member Functions

bool hasHistory (const std::string &name) const
 returns whether historical fixings were stored for the index More...
 
const TimeSeries< Real > & getHistory (const std::string &name) const
 returns the (possibly empty) history of the index fixings More...
 
void setHistory (const std::string &name, TimeSeries< Real > history)
 stores the historical fixings of the index More...
 
ext::shared_ptr< Observablenotifier (const std::string &name) const
 observer notifying of changes in the index fixings More...
 
std::vector< std::string > histories () const
 returns all names of the indexes for which fixings were stored More...
 
void clearHistory (const std::string &name)
 clears the historical fixings of the index More...
 
void clearHistories ()
 clears all stored fixings More...
 
bool hasHistoricalFixing (const std::string &name, const Date &fixingDate) const
 returns whether a specific historical fixing was stored for the index and date More...
 
- Public Member Functions inherited from Singleton< IndexManager >
 Singleton (const Singleton &)=delete
 
 Singleton (Singleton &&)=delete
 
Singletonoperator= (const Singleton &)=delete
 
Singletonoperator= (Singleton &&)=delete
 
 ~Singleton ()=default
 

Private Member Functions

 IndexManager ()=default
 

Private Attributes

std::map< std::string, ObservableValue< TimeSeries< Real > >, CaseInsensitiveComparedata_
 

Friends

class Singleton< IndexManager >
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< IndexManager >
static IndexManagerinstance ()
 access to the unique instance More...
 
- Protected Member Functions inherited from Singleton< IndexManager >
 Singleton ()=default
 

Detailed Description

global repository for past index fixings

Note
index names are case insensitive

Definition at line 37 of file indexmanager.hpp.

Constructor & Destructor Documentation

◆ IndexManager()

IndexManager ( )
privatedefault

Member Function Documentation

◆ hasHistory()

bool hasHistory ( const std::string &  name) const

returns whether historical fixings were stored for the index

Definition at line 24 of file indexmanager.cpp.

◆ getHistory()

const TimeSeries< Real > & getHistory ( const std::string &  name) const

returns the (possibly empty) history of the index fixings

Definition at line 28 of file indexmanager.cpp.

+ Here is the caller graph for this function:

◆ setHistory()

void setHistory ( const std::string &  name,
TimeSeries< Real history 
)

stores the historical fixings of the index

Definition at line 32 of file indexmanager.cpp.

+ Here is the caller graph for this function:

◆ notifier()

ext::shared_ptr< Observable > notifier ( const std::string &  name) const

observer notifying of changes in the index fixings

Definition at line 36 of file indexmanager.cpp.

◆ histories()

std::vector< std::string > histories ( ) const

returns all names of the indexes for which fixings were stored

Definition at line 40 of file indexmanager.cpp.

◆ clearHistory()

void clearHistory ( const std::string &  name)

clears the historical fixings of the index

Definition at line 48 of file indexmanager.cpp.

+ Here is the caller graph for this function:

◆ clearHistories()

void clearHistories ( )

clears all stored fixings

Definition at line 50 of file indexmanager.cpp.

◆ hasHistoricalFixing()

bool hasHistoricalFixing ( const std::string &  name,
const Date fixingDate 
) const

returns whether a specific historical fixing was stored for the index and date

Definition at line 52 of file indexmanager.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Singleton< IndexManager >

friend class Singleton< IndexManager >
friend

Definition at line 1 of file indexmanager.hpp.

Member Data Documentation

◆ data_

std::map<std::string, ObservableValue<TimeSeries<Real> >, CaseInsensitiveCompare> data_
mutableprivate

Definition at line 70 of file indexmanager.hpp.