Base class for reference data. More...
#include <ored/portfolio/referencedata.hpp>
Public Member Functions | |
ReferenceDatum () | |
Default Constructor. More... | |
ReferenceDatum (const std::string &type, const std::string &id) | |
Base class constructor. More... | |
ReferenceDatum (const std::string &type, const std::string &id, const QuantLib::Date &validFrom) | |
Base class constructor. More... | |
void | setType (const string &type) |
setters More... | |
void | setId (const string &id) |
void | setValidFrom (const QuantLib::Date &validFrom) |
const std::string & | type () const |
getters More... | |
const std::string & | id () const |
const QuantLib::Date & | validFrom () const |
void | fromXML (XMLNode *node) override |
XMLNode * | toXML (ore::data::XMLDocument &doc) const override |
Public Member Functions inherited from XMLSerializable | |
virtual | ~XMLSerializable () |
virtual void | fromXML (XMLNode *node)=0 |
virtual XMLNode * | toXML (XMLDocument &doc) const =0 |
void | fromFile (const std::string &filename) |
void | toFile (const std::string &filename) const |
void | fromXMLString (const std::string &xml) |
Parse from XML string. More... | |
std::string | toXMLString () const |
Parse from XML string. More... | |
Private Attributes | |
std::string | type_ |
std::string | id_ |
QuantLib::Date | validFrom_ |
Base class for reference data.
Each reference datum object is a subclass of this base and has it's own accessor functions. Instances of ReferenceDatum can be gotten from the ReferenceDataManager below, and then cast up as required. Each instance should be uniquely identified by it's type (which defines it's subclass, e.g. "Bond" for BondReferenceDatum) and it's id, which is a string. Here it can be any string but in applications there can be a naming scheme like ISIN for Bonds.
Definition at line 47 of file referencedata.hpp.
ReferenceDatum | ( | ) |
Default Constructor.
Definition at line 50 of file referencedata.hpp.
ReferenceDatum | ( | const std::string & | type, |
const std::string & | id | ||
) |
Base class constructor.
Definition at line 52 of file referencedata.hpp.
ReferenceDatum | ( | const std::string & | type, |
const std::string & | id, | ||
const QuantLib::Date & | validFrom | ||
) |
Base class constructor.
Definition at line 55 of file referencedata.hpp.
void setType | ( | const string & | type | ) |
setters
Definition at line 59 of file referencedata.hpp.
void setId | ( | const string & | id | ) |
void setValidFrom | ( | const QuantLib::Date & | validFrom | ) |
const std::string & type | ( | ) | const |
getters
Definition at line 64 of file referencedata.hpp.
const std::string & id | ( | ) | const |
const QuantLib::Date & validFrom | ( | ) | const |
|
overridevirtual |
Implements XMLSerializable.
Reimplemented in BondReferenceDatum, CreditIndexReferenceDatum, IndexReferenceDatum, CurrencyHedgedEquityIndexReferenceDatum, PortfolioBasketReferenceDatum, CreditReferenceDatum, EquityReferenceDatum, and BondBasketReferenceDatum.
Definition at line 31 of file referencedata.cpp.
|
overridevirtual |
Implements XMLSerializable.
Reimplemented in BondReferenceDatum, CreditIndexReferenceDatum, IndexReferenceDatum, CurrencyHedgedEquityIndexReferenceDatum, PortfolioBasketReferenceDatum, CreditReferenceDatum, EquityReferenceDatum, and BondBasketReferenceDatum.
Definition at line 43 of file referencedata.cpp.
|
private |
Definition at line 72 of file referencedata.hpp.
|
private |
Definition at line 73 of file referencedata.hpp.
|
private |
Definition at line 74 of file referencedata.hpp.