#include <ored/portfolio/collateralbalance.hpp>
Definition at line 36 of file collateralbalance.hpp.
◆ CollateralBalance() [1/4]
default constructor
Definition at line 41 of file collateralbalance.hpp.
43 im_(QuantLib::Null<QuantLib::Real>()),
vm_(QuantLib::Null<QuantLib::Real>()) {}
std::string nettingSetId_
NettingSetDetails nettingSetDetails_
Serializable object holding netting set identification data.
◆ CollateralBalance() [2/4]
◆ CollateralBalance() [3/4]
CollateralBalance |
( |
const std::string & |
nettingSetId, |
|
|
const std::string & |
currency, |
|
|
const QuantLib::Real & |
im, |
|
|
const QuantLib::Real & |
vm = QuantLib::Null<QuantLib::Real>() |
|
) |
| |
Definition at line 47 of file collateralbalance.hpp.
const std::string & currency() const
const std::string & nettingSetId() const
◆ CollateralBalance() [4/4]
CollateralBalance |
( |
const NettingSetDetails & |
nettingSetDetails, |
|
|
const std::string & |
currency, |
|
|
const QuantLib::Real & |
im, |
|
|
const QuantLib::Real & |
vm = QuantLib::Null<QuantLib::Real>() |
|
) |
| |
◆ fromXML()
Implements XMLSerializable.
Definition at line 80 of file collateralbalance.cpp.
80 {
82
84 if (nettingSetDetailsNode) {
86 } else {
89 }
90
92
95 im_ = QuantLib::Null<QuantLib::Real>();
96 else
98
101 vm_ = QuantLib::Null<QuantLib::Real>();
102 else
104
109}
const QuantLib::Real & variationMargin() const
const QuantLib::Real & initialMargin() const
virtual void fromXML(XMLNode *node) override
static void checkNode(XMLNode *n, const string &expectedName)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static string getNodeValue(XMLNode *node)
Get a node's value.
Real parseReal(const string &s)
Convert text to Real.
#define DLOG(text)
Logging Macro (Level = Debug)
rapidxml::xml_node< char > XMLNode
◆ toXML()
Implements XMLSerializable.
Definition at line 111 of file collateralbalance.cpp.
111 {
116 } else {
118 }
119 if (
im_ != QuantLib::Null<QuantLib::Real>())
121 if (
vm_ != QuantLib::Null<QuantLib::Real>())
123 return node;
124}
bool empty() const
Check if the netting set details have been populated.
virtual XMLNode * toXML(XMLDocument &doc) const override
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
static void appendNode(XMLNode *parent, XMLNode *child)
◆ nettingSetId()
const std::string & nettingSetId |
( |
| ) |
const |
◆ nettingSetDetails()
◆ currency()
const std::string & currency |
( |
| ) |
const |
◆ initialMargin() [1/2]
const QuantLib::Real & initialMargin |
( |
| ) |
const |
◆ variationMargin() [1/2]
const QuantLib::Real & variationMargin |
( |
| ) |
const |
◆ initialMargin() [2/2]
QuantLib::Real & initialMargin |
( |
| ) |
|
◆ variationMargin() [2/2]
QuantLib::Real & variationMargin |
( |
| ) |
|
◆ nettingSetId_
std::string nettingSetId_ |
|
private |
◆ nettingSetDetails_
◆ currency_
◆ im_
◆ vm_