Logo
Reference manual - version orea_version
Public Member Functions | List of all members
SimmBasicNameMapper Class Reference
+ Inheritance diagram for SimmBasicNameMapper:

Public Member Functions

std::string qualifier (const std::string &externalName) const override
 
std::string validTo (const std::string &externalName) const
 Qualifier mapping expiry (ISO date), may be blank and interpreted as QL::maxDate()
 
QuantLib::Date validToDate (const std::string &externalName) const
 Qualifier mapping expiry (QuantLib date)
 
std::string validFrom (const std::string &externalName) const
 Qualifier mapping start date (ISO date), may be blank and interpreted as QL::minDate()
 
QuantLib::Date validFromDate (const std::string &externalName) const
 Qualifier mapping startDate (QuantLib date)
 
bool hasQualifier (const std::string &externalName) const override
 Has qualifier.
 
bool hasValidQualifier (const std::string &externalName, const QuantLib::Date &referenceDate) const
 Has qualifier that is valid w.r.t. given reference date.
 
std::string externalName (const std::string &qualifier) const override
 reverse lookup on qualifier
 
- Public Member Functions inherited from SimmNameMapper
virtual ~SimmNameMapper ()
 Destructor.
 
- Public Member Functions inherited from XMLSerializable
void fromXMLString (const std::string &xml)
 
std::string toXMLString () const
 

Serialisation

std::map< std::string, std::string > mapping_
 
std::map< std::string, std::string > validFrom_
 
std::map< std::string, std::string > validTo_
 
ore::data::XMLNode * toXML (ore::data::XMLDocument &doc) const override
 
void fromXML (ore::data::XMLNode *node) override
 
void addMapping (const std::string &externalName, const std::string &qualifier, const std::string &validFrom="", const std::string &validTo="")
 Add a single mapping. More...
 

Member Function Documentation

◆ qualifier()

std::string qualifier ( const std::string &  externalName) const
overridevirtual

Return the SIMM Qualifier for a given external name.

Warning:
If the externalName cannot be mapped to a qualifier the externalName itself is returned. In this way, the mapper is basic and places the burden on the caller to call it only when a mapping is needed.

Implements SimmNameMapper.

◆ addMapping()

void addMapping ( const std::string &  externalName,
const std::string &  qualifier,
const std::string &  validFrom = "",
const std::string &  validTo = "" 
)

Add a single mapping.

Member Data Documentation

◆ mapping_

std::map<std::string, std::string> mapping_
protected

A mapping from external name to SIMM Qualifier

◆ validFrom_

std::map<std::string, std::string> validFrom_
protected

Start and expiry date (ISO) of each mapping