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

#include <ored/model/calibrationinstruments/yoyswap.hpp>

+ Inheritance diagram for YoYSwap:
+ Collaboration diagram for YoYSwap:

Public Member Functions

 YoYSwap ()
 Default constructor. More...
 
 YoYSwap (const QuantLib::Period &tenor)
 Detailed constructor. More...
 
Inspectors
const QuantLib::Period & tenor () const
 
- Public Member Functions inherited from CalibrationInstrument
 CalibrationInstrument (const std::string &instrumentType)
 Constructor. More...
 
virtual ~CalibrationInstrument ()
 Destructor. More...
 
const std::string & instrumentType () const
 
- 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...
 

Serialisation

QuantLib::Period tenor_
 
void fromXML (XMLNode *node) override
 
XMLNodetoXML (XMLDocument &doc) const override
 

Additional Inherited Members

- Protected Attributes inherited from CalibrationInstrument
std::string instrumentType_
 

Detailed Description

Class for holding details of a year on year inflation cap floor calibration instrument.

Definition at line 35 of file yoyswap.hpp.

Constructor & Destructor Documentation

◆ YoYSwap() [1/2]

YoYSwap ( )

Default constructor.

Definition at line 28 of file yoyswap.cpp.

28: CalibrationInstrument("YoYSwap") {}
CalibrationInstrument(const std::string &instrumentType)
Constructor.

◆ YoYSwap() [2/2]

YoYSwap ( const QuantLib::Period &  tenor)

Detailed constructor.

Member Function Documentation

◆ tenor()

const QuantLib::Period & tenor ( ) const

Definition at line 34 of file yoyswap.cpp.

34 {
35 return tenor_;
36}
QuantLib::Period tenor_
Definition: yoyswap.hpp:55

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 38 of file yoyswap.cpp.

38 {
40 tenor_ = parsePeriod(XMLUtils::getChildValue(node, "Tenor", true));
41}
static void checkNode(XMLNode *n, const string &expectedName)
Definition: xmlutils.cpp:175
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
Definition: xmlutils.cpp:277
Period parsePeriod(const string &s)
Convert text to QuantLib::Period.
Definition: parsers.cpp:171
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 43 of file yoyswap.cpp.

43 {
44 XMLNode* node = doc.allocNode(instrumentType_);
45 XMLUtils::addChild(doc, node, "Tenor", to_string(tenor_));
46 return node;
47}
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
std::string to_string(const LocationInfo &l)
Definition: ast.cpp:28
+ Here is the call graph for this function:

Member Data Documentation

◆ tenor_

QuantLib::Period tenor_
private

Definition at line 55 of file yoyswap.hpp.