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
CboReferenceDatum Class Reference

#include <ored/portfolio/cbo.hpp>

+ Inheritance diagram for CboReferenceDatum:
+ Collaboration diagram for CboReferenceDatum:

Classes

struct  CboStructure
 

Public Member Functions

 CboReferenceDatum ()
 
 CboReferenceDatum (const string &id)
 
 CboReferenceDatum (const string &id, const CboStructure &cboStructure)
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
const CboStructurecbostructure () const
 
void setCboStructure (const CboStructure &cboStructure)
 
- 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 = "CBO"
 

Private Attributes

CboStructure cboStructure_
 

Detailed Description

Definition at line 36 of file cbo.hpp.

Constructor & Destructor Documentation

◆ CboReferenceDatum() [1/3]

Definition at line 57 of file cbo.hpp.

57{ setType(TYPE); }
static constexpr const char * TYPE
Definition: cbo.hpp:38
void setType(const string &type)
setters
+ Here is the call graph for this function:

◆ CboReferenceDatum() [2/3]

CboReferenceDatum ( const string &  id)

Definition at line 58 of file cbo.hpp.

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

◆ CboReferenceDatum() [3/3]

CboReferenceDatum ( const string &  id,
const CboStructure cboStructure 
)

Definition at line 59 of file cbo.hpp.

59: ReferenceDatum(TYPE, id), cboStructure_(cboStructure) {}
CboStructure cboStructure_
Definition: cbo.hpp:68

Member Function Documentation

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 347 of file cbo.cpp.

347 {
348
350 cboStructure_.fromXML(XMLUtils::getChildNode(node, "CboReferenceData"));
351
352}
void fromXML(XMLNode *node) override
static XMLNode * getChildNode(XMLNode *n, const string &name="")
Definition: xmlutils.cpp:387
void fromXML(XMLNode *node) override
Definition: cbo.cpp:290
+ Here is the call graph for this function:

◆ toXML()

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

Implements XMLSerializable.

Definition at line 354 of file cbo.cpp.

354 {
355
356 XMLNode* node = ReferenceDatum::toXML(doc);
357 XMLNode* dataNode = cboStructure_.toXML(doc);
358 XMLUtils::setNodeName(doc, dataNode, "CboReferenceData");
359 XMLUtils::appendNode(node, dataNode);
360
361 return node;
362}
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
XMLNode * toXML(ore::data::XMLDocument &doc) const override
Definition: cbo.cpp:323
+ Here is the call graph for this function:

◆ cbostructure()

const CboStructure & cbostructure ( ) const

Definition at line 64 of file cbo.hpp.

64{ return cboStructure_; }

◆ setCboStructure()

void setCboStructure ( const CboStructure cboStructure)

Definition at line 65 of file cbo.hpp.

65{ cboStructure_ = cboStructure; }

Member Data Documentation

◆ TYPE

constexpr const char* TYPE = "CBO"
staticconstexpr

Definition at line 38 of file cbo.hpp.

◆ cboStructure_

CboStructure cboStructure_
private

Definition at line 68 of file cbo.hpp.