#include <ored/portfolio/bondposition.hpp>
Definition at line 35 of file bondposition.hpp.
◆ BondPositionData() [1/2]
◆ BondPositionData() [2/2]
Definition at line 38 of file bondposition.hpp.
std::vector< BondUnderlying > underlyings_
const std::vector< BondUnderlying > & underlyings() const
◆ quantity()
◆ identifier()
const std::string & identifier |
( |
| ) |
const |
◆ underlyings()
◆ fromXML()
Implements XMLSerializable.
Definition at line 25 of file bondposition.cpp.
25 {
31 for (auto const n : c) {
34 }
35}
static void checkNode(XMLNode *n, const string &expectedName)
static vector< XMLNode * > getChildrenNodes(XMLNode *node, const string &name)
Returns all the children with a given name.
static Real getChildValueAsDouble(XMLNode *node, const string &name, bool mandatory=false, double defaultValue=0.0)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
◆ toXML()
Implements XMLSerializable.
Definition at line 37 of file bondposition.cpp.
37 {
38 XMLNode* n = doc.allocNode(
"BondBasketData");
43 }
44 return n;
45}
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
static void appendNode(XMLNode *parent, XMLNode *child)
rapidxml::xml_node< char > XMLNode
◆ populateFromBondBasketReferenceData()
void populateFromBondBasketReferenceData |
( |
const QuantLib::ext::shared_ptr< ReferenceDataManager > & |
ref | ) |
|
Definition at line 47 of file bondposition.cpp.
47 {
48 QL_REQUIRE(!
identifier_.empty(),
"BondPositionData::populateFromBondBasketReferenceData(): no identifier given");
50 DLOG(
"could not get BondBasketReferenceDatum for '" <<
identifier_ <<
"' leave data in trade unchanged");
51 } else {
53 auto r = QuantLib::ext::dynamic_pointer_cast<BondBasketReferenceDatum>(
55 QL_REQUIRE(r, "BondPositionData::populateFromBondBasketReferenceData(): internal error, could not cast "
56 "reference datum to expected type.");
59 }
60}
static constexpr const char * TYPE
#define DLOG(text)
Logging Macro (Level = Debug)
◆ quantity_
Real quantity_ = QuantLib::Null<Real>() |
|
private |
◆ identifier_
◆ underlyings_