Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
BondReferenceDatum Class Reference

#include <ored/portfolio/referencedata.hpp>

+ Inheritance diagram for BondReferenceDatum:
+ Collaboration diagram for BondReferenceDatum:

Classes

struct  BondData
 

Public Member Functions

 BondReferenceDatum ()
 
 BondReferenceDatum (const string &id)
 
 BondReferenceDatum (const string &id, const QuantLib::Date &validFrom)
 
 BondReferenceDatum (const string &id, const BondData &bondData)
 
 BondReferenceDatum (const string &id, const QuantLib::Date &validFrom, const BondData &bondData)
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
const BondDatabondData () const
 
void setBondData (const BondData &bondData)
 
- Public Member Functions inherited from ReferenceDatum
 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
 
XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
- Public Member Functions inherited from XMLSerializable
virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (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...
 

Static Public Attributes

static constexpr const char * TYPE = "Bond"
 

Private Attributes

BondData bondData_
 

Detailed Description

Definition at line 93 of file referencedata.hpp.

Constructor & Destructor Documentation

◆ BondReferenceDatum() [1/5]

Definition at line 115 of file referencedata.hpp.

115{ setType(TYPE); }
static constexpr const char * TYPE
void setType(const string &type)
setters
+ Here is the call graph for this function:

◆ BondReferenceDatum() [2/5]

BondReferenceDatum ( const string &  id)

Definition at line 117 of file referencedata.hpp.

117: ReferenceDatum(TYPE, id) {}
ReferenceDatum()
Default Constructor.

◆ BondReferenceDatum() [3/5]

BondReferenceDatum ( const string &  id,
const QuantLib::Date &  validFrom 
)

Definition at line 119 of file referencedata.hpp.

const QuantLib::Date & validFrom() const

◆ BondReferenceDatum() [4/5]

BondReferenceDatum ( const string &  id,
const BondData bondData 
)

Definition at line 121 of file referencedata.hpp.

◆ BondReferenceDatum() [5/5]

BondReferenceDatum ( const string &  id,
const QuantLib::Date &  validFrom,
const BondData bondData 
)

Definition at line 123 of file referencedata.hpp.

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Reimplemented from ReferenceDatum.

Definition at line 98 of file referencedata.cpp.

98 {
100 bondData_.fromXML(XMLUtils::getChildNode(node, "BondReferenceData"));
101}
void fromXML(XMLNode *node) override
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
void fromXML(XMLNode *node) override
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( ore::data::XMLDocument doc) const
overridevirtual

Reimplemented from ReferenceDatum.

Definition at line 103 of file referencedata.cpp.

103 {
104 XMLNode* node = ReferenceDatum::toXML(doc);
105 XMLNode* dataNode = bondData_.toXML(doc);
106 XMLUtils::setNodeName(doc, dataNode, "BondReferenceData");
107 XMLUtils::appendNode(node, dataNode);
108 return node;
109}
XMLNode * toXML(ore::data::XMLDocument &doc) const override
static void setNodeName(XMLDocument &doc, XMLNode *node, const string &name)
Definition: xmlutils.cpp:478
static void appendNode(XMLNode *parent, XMLNode *child)
Definition: xmlutils.cpp:406
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
XMLNode * toXML(ore::data::XMLDocument &doc) const override
+ Here is the call graph for this function:

◆ bondData()

const BondData & bondData ( ) const

Definition at line 129 of file referencedata.hpp.

129{ return bondData_; }
+ Here is the caller graph for this function:

◆ setBondData()

void setBondData ( const BondData bondData)

Definition at line 130 of file referencedata.hpp.

130{ bondData_ = bondData; }
+ Here is the call graph for this function:

Member Data Documentation

◆ TYPE

constexpr const char* TYPE = "Bond"
staticconstexpr

Definition at line 95 of file referencedata.hpp.

◆ bondData_

BondData bondData_
private

Definition at line 133 of file referencedata.hpp.