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

Container for storing Swap Index conventions. More...

#include <ored/configuration/conventions.hpp>

+ Inheritance diagram for SwapIndexConvention:
+ Collaboration diagram for SwapIndexConvention:

Public Member Functions

 SwapIndexConvention ()
 
 SwapIndexConvention (const string &id, const string &conventions, const string &fixingCalendar="")
 
const string & conventions () const
 
const string & fixingCalendar () const
 
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
virtual void build () override
 
- Public Member Functions inherited from Convention
virtual ~Convention ()
 Default destructor. More...
 
const string & id () const
 
Type type () 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...
 

Private Attributes

string strConventions_
 
string fixingCalendar_
 

Additional Inherited Members

- Public Types inherited from Convention
enum class  Type {
  Zero , Deposit , Future , FRA ,
  OIS , Swap , AverageOIS , TenorBasisSwap ,
  TenorBasisTwoSwap , BMABasisSwap , FX , CrossCcyBasis ,
  CrossCcyFixFloat , CDS , IborIndex , OvernightIndex ,
  SwapIndex , ZeroInflationIndex , InflationSwap , SecuritySpread ,
  CMSSpreadOption , CommodityForward , CommodityFuture , FxOption ,
  BondYield
}
 Supported convention types. More...
 
- Protected Member Functions inherited from Convention
 Convention ()
 
 Convention (const string &id, Type type)
 
- Protected Attributes inherited from Convention
Type type_
 
string id_
 

Detailed Description

Container for storing Swap Index conventions.

Definition at line 494 of file conventions.hpp.

Constructor & Destructor Documentation

◆ SwapIndexConvention() [1/2]

Definition at line 496 of file conventions.hpp.

496{}

◆ SwapIndexConvention() [2/2]

SwapIndexConvention ( const string &  id,
const string &  conventions,
const string &  fixingCalendar = "" 
)

Member Function Documentation

◆ conventions()

const string & conventions ( ) const

Definition at line 499 of file conventions.hpp.

499{ return strConventions_; }

◆ fixingCalendar()

const string & fixingCalendar ( ) const

Definition at line 500 of file conventions.hpp.

500{ return fixingCalendar_; }

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 446 of file conventions.cpp.

446 {
447
448 XMLUtils::checkNode(node, "SwapIndex");
450 id_ = XMLUtils::getChildValue(node, "Id", true);
451
452 // Get string values from xml
453 strConventions_ = XMLUtils::getChildValue(node, "Conventions", true);
454 fixingCalendar_ = XMLUtils::getChildValue(node, "FixingCalendar", false);
455}
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
+ Here is the call graph for this function:

◆ toXML()

XMLNode * toXML ( XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 457 of file conventions.cpp.

457 {
458
459 XMLNode* node = doc.allocNode("SwapIndex");
460 XMLUtils::addChild(doc, node, "Id", id_);
461 XMLUtils::addChild(doc, node, "Conventions", strConventions_);
462 XMLUtils::addChild(doc, node, "FixingCalendar", fixingCalendar_);
463
464 return node;
465}
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
Definition: xmlutils.cpp:181
rapidxml::xml_node< char > XMLNode
Definition: xmlutils.hpp:60
+ Here is the call graph for this function:

◆ build()

virtual void build ( )
overridevirtual

Implements Convention.

Definition at line 504 of file conventions.hpp.

504{};

Member Data Documentation

◆ strConventions_

string strConventions_
private

Definition at line 507 of file conventions.hpp.

◆ fixingCalendar_

string fixingCalendar_
private

Definition at line 508 of file conventions.hpp.