48 spreads_ = XMLUtils::getChildrenValuesWithAttributes<Real>(node,
"Spreads",
"Spread",
"startDate",
spreadDates_,
59 caps_ = XMLUtils::getChildrenValuesWithAttributes<Real>(node,
"Caps",
"Cap",
"startDate",
capDates_, &
parseReal);
61 XMLUtils::getChildrenValuesWithAttributes<Real>(node,
"Floors",
"Floor",
"startDate",
floorDates_, &
parseReal);
62 gearings_ = XMLUtils::getChildrenValuesWithAttributes<Real>(node,
"Gearings",
"Gearing",
"startDate",
gearingDates_,
std::vector< std::string > gearingDates_
std::vector< double > spreads_
virtual void fromXML(XMLNode *node) override
virtual XMLNode * toXML(XMLDocument &doc) const override
std::vector< std::string > capDates_
std::vector< std::string > floorDates_
std::vector< double > floors_
std::vector< double > caps_
std::vector< std::string > spreadDates_
std::vector< double > gearings_
std::set< std::string > indices_
const string & legNodeName() const
Small XML Document wrapper class.
XMLNode * allocNode(const string &nodeName)
util functions that wrap rapidxml
static void checkNode(XMLNode *n, const string &expectedName)
static string getChildValue(XMLNode *node, const string &name, bool mandatory=false, const string &defaultValue=string())
static bool getChildValueAsBool(XMLNode *node, const string &name, bool mandatory=false, bool defaultValue=true)
static XMLNode * getChildNode(XMLNode *n, const string &name="")
static void addChildrenWithOptionalAttributes(XMLDocument &doc, XMLNode *n, const string &names, const string &name, const vector< T > &values, const string &attrName, const vector< string > &attrs)
static string getNodeValue(XMLNode *node)
Get a node's value.
static int getChildValueAsInt(XMLNode *node, const string &name, bool mandatory=false, int defaultValue=0)
static XMLNode * addChild(XMLDocument &doc, XMLNode *n, const string &name)
leg data for duration adjusted cms
Real parseReal(const string &s)
Convert text to Real.
Integer parseInteger(const string &s)
Convert text to QuantLib::Integer.
leg data model and serialization
Serializable Credit Default Swap.