QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
repository of conversion factors between units of measure More...
#include <unitofmeasureconversionmanager.hpp>
Public Member Functions | |
UnitOfMeasureConversion | lookup (const CommodityType &commodityType, const UnitOfMeasure &, const UnitOfMeasure &, UnitOfMeasureConversion::Type type=UnitOfMeasureConversion::Derived) const |
void | add (const UnitOfMeasureConversion &) |
void | clear () |
Public Member Functions inherited from Singleton< UnitOfMeasureConversionManager > | |
Singleton (const Singleton &)=delete | |
Singleton (Singleton &&)=delete | |
Singleton & | operator= (const Singleton &)=delete |
Singleton & | operator= (Singleton &&)=delete |
~Singleton ()=default | |
Private Member Functions | |
UnitOfMeasureConversionManager () | |
void | addKnownConversionFactors () |
UnitOfMeasureConversion | directLookup (const CommodityType &commodityType, const UnitOfMeasure &source, const UnitOfMeasure &target) const |
UnitOfMeasureConversion | smartLookup (const CommodityType &commodityType, const UnitOfMeasure &source, const UnitOfMeasure &target, std::list< std::string > forbidden=std::list< std::string >()) const |
Private Attributes | |
std::list< UnitOfMeasureConversion > | data_ |
Friends | |
class | Singleton< UnitOfMeasureConversionManager > |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< UnitOfMeasureConversionManager > | |
static UnitOfMeasureConversionManager & | instance () |
access to the unique instance More... | |
Protected Member Functions inherited from Singleton< UnitOfMeasureConversionManager > | |
Singleton ()=default | |
repository of conversion factors between units of measure
Definition at line 36 of file unitofmeasureconversionmanager.hpp.
|
private |
Definition at line 57 of file unitofmeasureconversionmanager.cpp.
UnitOfMeasureConversion lookup | ( | const CommodityType & | commodityType, |
const UnitOfMeasure & | source, | ||
const UnitOfMeasure & | target, | ||
UnitOfMeasureConversion::Type | type = UnitOfMeasureConversion::Derived |
||
) | const |
Definition at line 73 of file unitofmeasureconversionmanager.cpp.
void add | ( | const UnitOfMeasureConversion & | c | ) |
Definition at line 61 of file unitofmeasureconversionmanager.cpp.
void clear | ( | ) |
Definition at line 101 of file unitofmeasureconversionmanager.cpp.
|
private |
Definition at line 106 of file unitofmeasureconversionmanager.cpp.
|
private |
Definition at line 137 of file unitofmeasureconversionmanager.cpp.
|
private |
Definition at line 165 of file unitofmeasureconversionmanager.cpp.
|
friend |
Definition at line 1 of file unitofmeasureconversionmanager.hpp.
|
private |
Definition at line 51 of file unitofmeasureconversionmanager.hpp.