Base class for reference data. More...
#include <ored/portfolio/referencedata.hpp>
Public Member Functions | |
ReferenceDatum () | |
Default Constructor. | |
ReferenceDatum (const std::string &type, const std::string &id) | |
Base class constructor. | |
ReferenceDatum (const std::string &type, const std::string &id, const QuantLib::Date &validFrom) | |
Base class constructor. | |
void | setType (const string &type) |
setters | |
void | setId (const string &id) |
void | setValidFrom (const QuantLib::Date &validFrom) |
const std::string & | type () const |
getters | |
const std::string & | id () const |
const QuantLib::Date & | validFrom () const |
void | fromXML (XMLNode *node) override |
XMLNode * | toXML (ore::data::XMLDocument &doc) override |
Public Member Functions inherited from XMLSerializable | |
void | fromFile (const std::string &filename) |
void | toFile (const std::string &filename) |
void | fromXMLString (const std::string &xml) |
Parse from XML string. | |
std::string | toXMLString () |
Parse from XML string. | |
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.