QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
petroleumunitsofmeasure.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 J. Erik Radmall
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file petroleumunitsofmeasure.hpp
21 \brief Petroleum units of measure
22*/
23
24#ifndef quantlib_petroleum_units_of_measure_hpp
25#define quantlib_petroleum_units_of_measure_hpp
26
28
29namespace QuantLib {
30
32 public:
34 static ext::shared_ptr<Data> data(
35 new Data("Barrels", "BBL", UnitOfMeasure::Volume));
36 data_ = data;
37 }
38 };
39
41 public:
43 static ext::shared_ptr<Data> data(
44 new Data("Metric Tonnes", "MT", UnitOfMeasure::Mass));
45 data_ = data;
46 }
47 };
48
50 public:
52 static ext::shared_ptr<Data> data(
53 new Data("1000 Barrels", "MB", UnitOfMeasure::Volume,
55 data_ = data;
56 }
57 };
58
60 public:
62 static ext::shared_ptr<Data> data(
63 new Data("US Gallons", "GAL", UnitOfMeasure::Volume,
65 data_ = data;
66 }
67 };
68
70 public:
72 static ext::shared_ptr<Data> data(
73 new Data("Litres", "l", UnitOfMeasure::Volume,
75 data_ = data;
76 }
77 };
78
80 public:
82 static ext::shared_ptr<Data> data(
83 new Data("Kilolitres", "kl", UnitOfMeasure::Volume,
85 data_ = data;
86 }
87 };
88
90 public:
92 static ext::shared_ptr<Data> data(
93 new Data("Tokyo Kilolitres", "KL_tk", UnitOfMeasure::Volume,
95 data_ = data;
96 }
97 };
98
99}
100
101
102#endif
Unit of measure specification
ext::shared_ptr< Data > data_
Definition: any.hpp:35
Unit of measure.