Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::UnitOfMeasure Class Reference

#include <unitofmeasure.hpp>

Inherited by QuantLib::BarrelUnitOfMeasure, QuantLib::GallonUnitOfMeasure, QuantLib::KilolitreUnitOfMeasure, QuantLib::LitreUnitOfMeasure, QuantLib::LotUnitOfMeasure, QuantLib::MBUnitOfMeasure, QuantLib::MTUnitOfMeasure, and QuantLib::TokyoKilolitreUnitOfMeasure.

List of all members.


Detailed Description

Unit of measure specification

Definition at line 37 of file unitofmeasure.hpp.


Public Types

enum  Type { Mass, Volume, Energy, Quantity }

Public Member Functions

 UnitOfMeasure (const std::string &name, const std::string &code, Type unitType)
 UnitOfMeasure ()
 default constructor
Inspectors
const std::string & code () const
 code, e.g, "BBL", "MT"
const std::string & name () const
 name, e.g, "Barrels"
Type unitType () const
 unit type (mass, volume...)
Other information
bool empty () const
 is this a usable instance?
const Roundingrounding () const
const UnitOfMeasuretriangulationUnitOfMeasure () const
 unit used for triangulation when required

Protected Attributes

boost::shared_ptr< Data > data_

Static Private Attributes

static std::map< std::string,
boost::shared_ptr
< UnitOfMeasure::Data > > 
unitsOfMeasure_

Related Functions

(Note that these are not member functions.)

bool operator!= (const UnitOfMeasure &, const UnitOfMeasure &)
std::ostream & operator<< (std::ostream &, const UnitOfMeasure &)
bool operator== (const UnitOfMeasure &, const UnitOfMeasure &)

Classes

struct  Data

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index