Serializable Commodity Position Data. More...
#include <ored/portfolio/commodityposition.hpp>
Public Member Functions | |
CommodityPositionData () | |
CommodityPositionData (const Real quantity, const std::vector< CommodityUnderlying > &underlyings) | |
Real | quantity () const |
const std::vector< CommodityUnderlying > & | underlyings () const |
void | fromXML (XMLNode *node) override |
XMLNode * | toXML (XMLDocument &doc) const override |
Public Member Functions inherited from XMLSerializable | |
virtual | ~XMLSerializable () |
virtual void | fromXML (XMLNode *node)=0 |
virtual XMLNode * | toXML (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... | |
Private Attributes | |
Real | quantity_ = QuantLib::Null<Real>() |
std::vector< CommodityUnderlying > | underlyings_ |
Serializable Commodity Position Data.
Definition at line 34 of file commodityposition.hpp.
Definition at line 36 of file commodityposition.hpp.
CommodityPositionData | ( | const Real | quantity, |
const std::vector< CommodityUnderlying > & | underlyings | ||
) |
Definition at line 37 of file commodityposition.hpp.
Real quantity | ( | ) | const |
const std::vector< CommodityUnderlying > & underlyings | ( | ) | const |
|
overridevirtual |
Implements XMLSerializable.
Definition at line 27 of file commodityposition.cpp.
|
overridevirtual |
Implements XMLSerializable.
Definition at line 38 of file commodityposition.cpp.
|
private |
Definition at line 47 of file commodityposition.hpp.
|
private |
Definition at line 48 of file commodityposition.hpp.