QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
commodity type More...
#include <ql/experimental/commodities/commoditytype.hpp>
Classes | |
struct | Data |
Public Member Functions | |
CommodityType ()=default | |
default constructor More... | |
CommodityType (const std::string &code, const std::string &name) | |
Inspectors | |
const std::string & | code () const |
commodity code, e.g, "HO" More... | |
const std::string & | name () const |
name, e.g, "Heating Oil" More... | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const CommodityType &, const CommodityType &) |
bool | operator!= (const CommodityType &, const CommodityType &) |
std::ostream & | operator<< (std::ostream &, const CommodityType &) |
Other information | |
ext::shared_ptr< Data > | data_ |
static std::map< std::string, ext::shared_ptr< Data > > | commodityTypes_ |
bool | empty () const |
is this a usable instance? More... | |
commodity type
Definition at line 37 of file commoditytype.hpp.
|
default |
default constructor
Instances built via this constructor have undefined behavior. Such instances can only act as placeholders and must be reassigned to a valid currency before being used.
CommodityType | ( | const std::string & | code, |
const std::string & | name | ||
) |
const std::string & code | ( | ) | const |
commodity code, e.g, "HO"
Definition at line 95 of file commoditytype.hpp.
const std::string & name | ( | ) | const |
name, e.g, "Heating Oil"
Definition at line 99 of file commoditytype.hpp.
bool empty | ( | ) | const |
is this a usable instance?
Definition at line 103 of file commoditytype.hpp.
|
related |
|
related |
Definition at line 111 of file commoditytype.hpp.
|
related |
|
protected |
Definition at line 63 of file commoditytype.hpp.
|
staticprotected |
Definition at line 72 of file commoditytype.hpp.