Repository for currency dependent market conventions. More...
#include <ored/configuration/conventions.hpp>
Inheritance diagram for Conventions:Public Member Functions | |
| Conventions () | |
| Default constructor. | |
| QuantLib::ext::shared_ptr< Convention > | get (const string &id) const |
| std::pair< bool, QuantLib::ext::shared_ptr< Convention > > | get (const std::string &id, const Convention::Type &type) const |
| std::set< QuantLib::ext::shared_ptr< Convention > > | get (const Convention::Type &type) const |
| QuantLib::ext::shared_ptr< Convention > | getFxConvention (const string &ccy1, const string &ccy2) const |
| bool | has (const std::string &id) const |
Checks if we have a convention with the given id. | |
| bool | has (const std::string &id, const Convention::Type &type) const |
Checks if we have a convention with the given id and type. | |
| void | clear () const |
| void | add (const QuantLib::ext::shared_ptr< Convention > &convention) const |
Public Member Functions inherited from XMLSerializable | |
| void | fromFile (const std::string &filename) |
| void | toFile (const std::string &filename) const |
| void | fromXMLString (const std::string &xml) |
| Parse from XML string. | |
| std::string | toXMLString () const |
| Parse from XML string. | |
Serialisation | |
| virtual void | fromXML (XMLNode *node) override |
| virtual XMLNode * | toXML (XMLDocument &doc) const override |
Repository for currency dependent market conventions.
| QuantLib::ext::shared_ptr<Convention> get | ( | const string & | id | ) | const |
Returns the convention if found and throws if not
| std::pair<bool, QuantLib::ext::shared_ptr<Convention> > get | ( | const std::string & | id, |
| const Convention::Type & | type | ||
| ) | const |
Get a convention with the given id and type. If no convention of the given type with the given id is found, the first element of the returned pair is false and the second element is a nullptr. If a convention is found, the first element of the returned pair is true and the second element holds the convention.
| std::set<QuantLib::ext::shared_ptr<Convention> > get | ( | const Convention::Type & | type | ) | const |
Get all conventions of a given type
| QuantLib::ext::shared_ptr<Convention> getFxConvention | ( | const string & | ccy1, |
| const string & | ccy2 | ||
| ) | const |
Find a convention for an FX pair
| void clear | ( | ) | const |
Clear all conventions
| void add | ( | const QuantLib::ext::shared_ptr< Convention > & | convention | ) | const |
Add a convention. This will overwrite an existing convention with the same id