Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
List of all members
FraConvention Class Reference

Container for storing Forward rate Agreement conventions. More...

#include <ored/configuration/conventions.hpp>

+ Inheritance diagram for FraConvention:
+ Collaboration diagram for FraConvention:

Public Member Functions

Constructors
 FraConvention ()
 Default constructor. More...
 
 FraConvention (const string &id, const string &index)
 Index based constructor. More...
 
Inspectors
QuantLib::ext::shared_ptr< IborIndexindex () const
 
const string & indexName () const
 
- 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...
 

Serialisation

string strIndex_
 
virtual void fromXML (XMLNode *node) override
 
virtual XMLNodetoXML (XMLDocument &doc) const override
 
virtual void build () override
 

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 Forward rate Agreement conventions.

Definition at line 342 of file conventions.hpp.

Constructor & Destructor Documentation

◆ FraConvention() [1/2]

Default constructor.

Definition at line 347 of file conventions.hpp.

347{}

◆ FraConvention() [2/2]

FraConvention ( const string &  id,
const string &  index 
)

Index based constructor.

Definition at line 261 of file conventions.cpp.

263}
QuantLib::ext::shared_ptr< IborIndex > index() const
QuantLib::ext::shared_ptr< IborIndex > parseIborIndex(const string &s, const Handle< YieldTermStructure > &h)
Convert std::string to QuantLib::IborIndex.
+ Here is the call graph for this function:

Member Function Documentation

◆ index()

QuantLib::ext::shared_ptr< IborIndex > index ( ) const

Definition at line 283 of file conventions.cpp.

283{ return parseIborIndex(strIndex_); }
+ Here is the call graph for this function:

◆ indexName()

const string & indexName ( ) const

Definition at line 355 of file conventions.hpp.

355{ return strIndex_; }

◆ fromXML()

void fromXML ( XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 265 of file conventions.cpp.

265 {
266
267 XMLUtils::checkNode(node, "FRA");
269 id_ = XMLUtils::getChildValue(node, "Id", true);
270 strIndex_ = XMLUtils::getChildValue(node, "Index", true);
272}
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 274 of file conventions.cpp.

274 {
275
276 XMLNode* node = doc.allocNode("FRA");
277 XMLUtils::addChild(doc, node, "Id", id_);
278 XMLUtils::addChild(doc, node, "Index", strIndex_);
279
280 return node;
281}
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 362 of file conventions.hpp.

362{}

Member Data Documentation

◆ strIndex_

string strIndex_
private

Definition at line 366 of file conventions.hpp.