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

Convertible Bond Reference data. More...

#include <ored/portfolio/convertiblebondreferencedata.hpp>

+ Inheritance diagram for ConvertibleBondReferenceDatum:
+ Collaboration diagram for ConvertibleBondReferenceDatum:

Public Member Functions

 ConvertibleBondReferenceDatum ()
 
 ConvertibleBondReferenceDatum (const string &id)
 
 ConvertibleBondReferenceDatum (const string &id, const BondReferenceDatum::BondData &bondData, const ConvertibleBondData::CallabilityData &callData, const ConvertibleBondData::CallabilityData &putData, const ConvertibleBondData::ConversionData &conversionData, const ConvertibleBondData::DividendProtectionData &dividendProtectionData)
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
const BondReferenceDatum::BondDatabondData () const
 
const ConvertibleBondData::CallabilityDatacallData () const
 
const ConvertibleBondData::CallabilityDataputData () const
 
const ConvertibleBondData::ConversionDataconversionData () const
 
const ConvertibleBondData::DividendProtectionDatadividendProtectionData () const
 
std::string detachable () const
 
void setBondData (const BondReferenceDatum::BondData &bondData)
 
void setCallData (const ConvertibleBondData::CallabilityData &callData)
 
void setPutData (const ConvertibleBondData::CallabilityData &putData)
 
void setConversionData (const ConvertibleBondData::ConversionData &conversionData)
 
void setDividendProtectionData (const ConvertibleBondData::DividendProtectionData &dividendProtectionData)
 
- 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 = "ConvertibleBond"
 

Private Attributes

BondReferenceDatum::BondData bondData_
 
ConvertibleBondData::CallabilityData callData_
 
ConvertibleBondData::CallabilityData putData_
 
ConvertibleBondData::ConversionData conversionData_
 
ConvertibleBondData::DividendProtectionData dividendProtectionData_
 
std::string detachable_
 

Detailed Description

Convertible Bond Reference data.

Definition at line 44 of file convertiblebondreferencedata.hpp.

Constructor & Destructor Documentation

◆ ConvertibleBondReferenceDatum() [1/3]

Definition at line 48 of file convertiblebondreferencedata.hpp.

48: callData_("CallData"), putData_("PutData") {}
ConvertibleBondData::CallabilityData callData_
ConvertibleBondData::CallabilityData putData_

◆ ConvertibleBondReferenceDatum() [2/3]

ConvertibleBondReferenceDatum ( const string &  id)

Definition at line 50 of file convertiblebondreferencedata.hpp.

51 : ReferenceDatum(TYPE, id), callData_("CallData"), putData_("PutData") {}
ReferenceDatum()
Default Constructor.

◆ ConvertibleBondReferenceDatum() [3/3]

ConvertibleBondReferenceDatum ( const string &  id,
const BondReferenceDatum::BondData bondData,
const ConvertibleBondData::CallabilityData callData,
const ConvertibleBondData::CallabilityData putData,
const ConvertibleBondData::ConversionData conversionData,
const ConvertibleBondData::DividendProtectionData dividendProtectionData 
)

Definition at line 53 of file convertiblebondreferencedata.hpp.

const ConvertibleBondData::CallabilityData & callData() const
ConvertibleBondData::DividendProtectionData dividendProtectionData_
const ConvertibleBondData::DividendProtectionData & dividendProtectionData() const
ConvertibleBondData::ConversionData conversionData_
const ConvertibleBondData::CallabilityData & putData() const
const BondReferenceDatum::BondData & bondData() const
const ConvertibleBondData::ConversionData & conversionData() const

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 26 of file convertiblebondreferencedata.cpp.

26 {
28 XMLNode* innerNode = XMLUtils::getChildNode(node, "ConvertibleBondReferenceData");
29 bondData_.fromXML(XMLUtils::getChildNode(innerNode, "BondData"));
30 if (auto n = XMLUtils::getChildNode(innerNode, "CallData")) {
31 if (!XMLUtils::getChildrenNodes(n, "").empty()) {
33 }
34 }
35 if (auto n = XMLUtils::getChildNode(innerNode, "PutData")) {
36 if (!XMLUtils::getChildrenNodes(n, "").empty())
38 }
39 if (auto n = XMLUtils::getChildNode(innerNode, "ConversionData")) {
40 if (!XMLUtils::getChildrenNodes(n, "").empty())
42 }
43 if (auto n = XMLUtils::getChildNode(innerNode, "DividendProtectionData")) {
44 if (!XMLUtils::getChildrenNodes(n, "").empty())
46 }
47 detachable_ = XMLUtils::getChildValue(innerNode, "Detachable", false);
48}
void fromXML(ore::data::XMLNode *node) override
void fromXML(ore::data::XMLNode *node) override
void fromXML(XMLNode *node) override
static vector< XMLNode * > getChildrenNodes(XMLNode *node, const string &name)
Returns all the children with a given name.
Definition: xmlutils.cpp:428
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
void fromXML(XMLNode *node) override
+ Here is the call graph for this function:

◆ toXML()

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

Implements XMLSerializable.

Definition at line 50 of file convertiblebondreferencedata.cpp.

50 {
51 XMLNode* node0 = ReferenceDatum::toXML(doc);
52 XMLNode* node = XMLUtils::addChild(doc, node0, "ConvertibleBondReferenceData");
62 if (!detachable_.empty())
63 XMLUtils::addChild(doc, node, "Detachable");
64 return node0;
65}
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
ore::data::XMLNode * toXML(ore::data::XMLDocument &doc) const override
XMLNode * toXML(ore::data::XMLDocument &doc) const override
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
static void appendNode(XMLNode *parent, XMLNode *child)
Definition: xmlutils.cpp:406
XMLNode * toXML(ore::data::XMLDocument &doc) const override
+ Here is the call graph for this function:

◆ bondData()

const BondReferenceDatum::BondData & bondData ( ) const

Definition at line 64 of file convertiblebondreferencedata.hpp.

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

◆ callData()

const ConvertibleBondData::CallabilityData & callData ( ) const

Definition at line 65 of file convertiblebondreferencedata.hpp.

65{ return callData_; }
+ Here is the caller graph for this function:

◆ putData()

const ConvertibleBondData::CallabilityData & putData ( ) const

Definition at line 66 of file convertiblebondreferencedata.hpp.

66{ return putData_; }
+ Here is the caller graph for this function:

◆ conversionData()

const ConvertibleBondData::ConversionData & conversionData ( ) const

Definition at line 67 of file convertiblebondreferencedata.hpp.

67{ return conversionData_; }
+ Here is the caller graph for this function:

◆ dividendProtectionData()

const ConvertibleBondData::DividendProtectionData & dividendProtectionData ( ) const

Definition at line 68 of file convertiblebondreferencedata.hpp.

68 {
70 }
+ Here is the caller graph for this function:

◆ detachable()

std::string detachable ( ) const

Definition at line 71 of file convertiblebondreferencedata.hpp.

71{ return detachable_; }

◆ setBondData()

void setBondData ( const BondReferenceDatum::BondData bondData)

Definition at line 73 of file convertiblebondreferencedata.hpp.

+ Here is the call graph for this function:

◆ setCallData()

void setCallData ( const ConvertibleBondData::CallabilityData callData)

Definition at line 74 of file convertiblebondreferencedata.hpp.

+ Here is the call graph for this function:

◆ setPutData()

void setPutData ( const ConvertibleBondData::CallabilityData putData)

Definition at line 75 of file convertiblebondreferencedata.hpp.

75{ putData_ = putData; }
+ Here is the call graph for this function:

◆ setConversionData()

void setConversionData ( const ConvertibleBondData::ConversionData conversionData)

Definition at line 76 of file convertiblebondreferencedata.hpp.

+ Here is the call graph for this function:

◆ setDividendProtectionData()

void setDividendProtectionData ( const ConvertibleBondData::DividendProtectionData dividendProtectionData)

Definition at line 79 of file convertiblebondreferencedata.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ TYPE

constexpr const char* TYPE = "ConvertibleBond"
staticconstexpr

Definition at line 46 of file convertiblebondreferencedata.hpp.

◆ bondData_

BondReferenceDatum::BondData bondData_
private

Definition at line 84 of file convertiblebondreferencedata.hpp.

◆ callData_

Definition at line 85 of file convertiblebondreferencedata.hpp.

◆ putData_

Definition at line 86 of file convertiblebondreferencedata.hpp.

◆ conversionData_

ConvertibleBondData::ConversionData conversionData_
private

Definition at line 87 of file convertiblebondreferencedata.hpp.

◆ dividendProtectionData_

ConvertibleBondData::DividendProtectionData dividendProtectionData_
private

Definition at line 88 of file convertiblebondreferencedata.hpp.

◆ detachable_

std::string detachable_
private

Definition at line 89 of file convertiblebondreferencedata.hpp.