unitType (3) - Linux Manuals
unitType: Unit of measure specification
NAME
QuantLib::UnitOfMeasure - Unit of measure specification
SYNOPSIS
#include <ql/experimental/commodities/unitofmeasure.hpp>
Inherited by BarrelUnitOfMeasure, GallonUnitOfMeasure, KilolitreUnitOfMeasure, LitreUnitOfMeasure, LotUnitOfMeasure, MBUnitOfMeasure, MTUnitOfMeasure, and TokyoKilolitreUnitOfMeasure.
Public Types
enum Type { Mass, Volume, Energy, Quantity }
Public Member Functions
UnitOfMeasure ()
default constructor
UnitOfMeasure (const std::string &name, const std::string &code, Type unitType)
Inspectors
const std::string & name () const
name, e.g, 'Barrels'
const std::string & code () const
code, e.g, 'BBL', 'MT'
Type unitType () const
unit type (mass, volume...)
Other information
bool empty () const
is this a usable instance?
const Rounding & rounding () const
const UnitOfMeasure & triangulationUnitOfMeasure () const
unit used for triangulation when required
Protected Attributes
boost::shared_ptr< Data > data_
Related Functions
(Note that these are not member functions.)bool operator== (const UnitOfMeasure &, const UnitOfMeasure &)
bool operator!= (const UnitOfMeasure &, const UnitOfMeasure &)
std::ostream & operator<< (std::ostream &, const UnitOfMeasure &)
Detailed Description
Constructor & Destructor Documentation
UnitOfMeasure ()
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.
Friends And Related Function Documentation
bool operator== (const UnitOfMeasure &, const UnitOfMeasure &) [related]
bool operator!= (const UnitOfMeasure &, const UnitOfMeasure &) [related]
std::ostream & operator<< (std::ostream &, const UnitOfMeasure &) [related]
Author
Generated automatically by Doxygen for QuantLib from the source code.