28 return out << c.
code();
30 return out <<
"null unit of measure";
34 ext::shared_ptr<UnitOfMeasure::Data> >
38 const std::string& code,
41 ext::shared_ptr<UnitOfMeasure::Data> >::const_iterator i =
46 data_ = ext::make_shared<UnitOfMeasure::Data>(
57 : name(
std::move(name)), code(
std::move(code)), unitType(unitType),
58 triangulationUnitOfMeasure(
std::move(triangulationUnitOfMeasure)), rounding(rounding) {}
Unit of measure specification
const std::string & code() const
code, e.g, "BBL", "MT"
const std::string & name() const
name, e.g, "Barrels"
bool empty() const
is this a usable instance?
static std::map< std::string, ext::shared_ptr< UnitOfMeasure::Data > > unitsOfMeasure_
Type unitType() const
unit type (mass, volume...)
ext::shared_ptr< Data > data_
UnitOfMeasure()=default
default constructor
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
Data(std::string name, std::string code, UnitOfMeasure::Type unitType, UnitOfMeasure triangulationUnitOfMeasure=UnitOfMeasure(), const Rounding &rounding=Rounding(0))