ome-common 5.3.2

electric-potential.h
1 /*
2 * #%L
3 * OME-COMMON C++ library for C++ compatibility/portability
4 * %%
5 * Copyright © 2015 Open Microscopy Environment:
6 * - Massachusetts Institute of Technology
7 * - National Institutes of Health
8 * - University of Dundee
9 * - Board of Regents of the University of Wisconsin-Madison
10 * - Glencoe Software, Inc.
11 * %%
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 *
33 * The views and conclusions contained in the software and documentation are
34 * those of the authors and should not be interpreted as representing official
35 * policies, either expressed or implied, of any organization.
36 * #L%
37 */
38
47 #ifndef OME_COMMON_UNITS_ELECTRIC_POTENTIAL_H
48 #define OME_COMMON_UNITS_ELECTRIC_POTENTIAL_H
49
50 #include <ome/common/config.h>
51 #include <ome/common/units/types.h>
52
53 #include <boost/units/unit.hpp>
54 #include <boost/units/quantity.hpp>
55 #include <boost/units/systems/si.hpp>
56
57 namespace ome
58 {
59 namespace common
60 {
61 namespace units
62 {
63
64 // Electric potential types, constants and quantities.
65
67 typedef si::electric_potential electric_potential_unit;
69 typedef quantity<si::electric_potential> electric_potential_quantity;
70
72 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational<-24> > >::type yoctovolt_unit;
74 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational<-21> > >::type zeptovolt_unit;
76 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational<-18> > >::type attovolt_unit;
78 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational<-15> > >::type femtovolt_unit;
80 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational<-12> > >::type picovolt_unit;
82 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< -9> > >::type nanovolt_unit;
84 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< -6> > >::type microvolt_unit;
86 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< -3> > >::type millivolt_unit;
88 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< -2> > >::type centivolt_unit;
90 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< -1> > >::type decivolt_unit;
92 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 0> > >::type volt_unit;
94 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 1> > >::type dekavolt_unit;
96 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 1> > >::type decavolt_unit;
98 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 2> > >::type hectovolt_unit;
100 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 3> > >::type kilovolt_unit;
102 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 6> > >::type megavolt_unit;
104 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 9> > >::type gigavolt_unit;
106 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 12> > >::type teravolt_unit;
108 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 15> > >::type petavolt_unit;
110 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 18> > >::type exavolt_unit;
112 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 21> > >::type zettavolt_unit;
114 typedef make_scaled_unit<si::electric_potential,scale<10,static_rational< 24> > >::type yottavolt_unit;
115
117 BOOST_UNITS_STATIC_CONSTANT(yoctovolt, yoctovolt_unit);
119 BOOST_UNITS_STATIC_CONSTANT(zeptovolt, zeptovolt_unit);
121 BOOST_UNITS_STATIC_CONSTANT(attovolt, attovolt_unit);
123 BOOST_UNITS_STATIC_CONSTANT(femtovolt, femtovolt_unit);
125 BOOST_UNITS_STATIC_CONSTANT(picovolt, picovolt_unit);
127 BOOST_UNITS_STATIC_CONSTANT(nanovolt, nanovolt_unit);
129 BOOST_UNITS_STATIC_CONSTANT(microvolt, microvolt_unit);
131 BOOST_UNITS_STATIC_CONSTANT(millivolt, millivolt_unit);
133 BOOST_UNITS_STATIC_CONSTANT(centivolt, centivolt_unit);
135 BOOST_UNITS_STATIC_CONSTANT(decivolt, decivolt_unit);
137 BOOST_UNITS_STATIC_CONSTANT(volt, volt_unit);
139 BOOST_UNITS_STATIC_CONSTANT(dekavolt, dekavolt_unit);
141 BOOST_UNITS_STATIC_CONSTANT(decavolt, decavolt_unit);
143 BOOST_UNITS_STATIC_CONSTANT(hectovolt, hectovolt_unit);
145 BOOST_UNITS_STATIC_CONSTANT(kilovolt, kilovolt_unit);
147 BOOST_UNITS_STATIC_CONSTANT(megavolt, megavolt_unit);
149 BOOST_UNITS_STATIC_CONSTANT(gigavolt, gigavolt_unit);
151 BOOST_UNITS_STATIC_CONSTANT(teravolt, teravolt_unit);
153 BOOST_UNITS_STATIC_CONSTANT(petavolt, petavolt_unit);
155 BOOST_UNITS_STATIC_CONSTANT(exavolt, exavolt_unit);
157 BOOST_UNITS_STATIC_CONSTANT(zettavolt, zettavolt_unit);
159 BOOST_UNITS_STATIC_CONSTANT(yottavolt, yottavolt_unit);
160
162 BOOST_UNITS_STATIC_CONSTANT(yoctovolts, yoctovolt_unit);
164 BOOST_UNITS_STATIC_CONSTANT(zeptovolts, zeptovolt_unit);
166 BOOST_UNITS_STATIC_CONSTANT(attovolts, attovolt_unit);
168 BOOST_UNITS_STATIC_CONSTANT(femtovolts, femtovolt_unit);
170 BOOST_UNITS_STATIC_CONSTANT(picovolts, picovolt_unit);
172 BOOST_UNITS_STATIC_CONSTANT(nanovolts, nanovolt_unit);
174 BOOST_UNITS_STATIC_CONSTANT(microvolts, microvolt_unit);
176 BOOST_UNITS_STATIC_CONSTANT(millivolts, millivolt_unit);
178 BOOST_UNITS_STATIC_CONSTANT(centivolts, centivolt_unit);
180 BOOST_UNITS_STATIC_CONSTANT(decivolts, decivolt_unit);
182 BOOST_UNITS_STATIC_CONSTANT(volts, volt_unit);
184 BOOST_UNITS_STATIC_CONSTANT(dekavolts, dekavolt_unit);
186 BOOST_UNITS_STATIC_CONSTANT(decavolts, decavolt_unit);
188 BOOST_UNITS_STATIC_CONSTANT(hectovolts, hectovolt_unit);
190 BOOST_UNITS_STATIC_CONSTANT(kilovolts, kilovolt_unit);
192 BOOST_UNITS_STATIC_CONSTANT(megavolts, megavolt_unit);
194 BOOST_UNITS_STATIC_CONSTANT(gigavolts, gigavolt_unit);
196 BOOST_UNITS_STATIC_CONSTANT(teravolts, teravolt_unit);
198 BOOST_UNITS_STATIC_CONSTANT(petavolts, petavolt_unit);
200 BOOST_UNITS_STATIC_CONSTANT(exavolts, exavolt_unit);
202 BOOST_UNITS_STATIC_CONSTANT(zettavolts, zettavolt_unit);
204 BOOST_UNITS_STATIC_CONSTANT(yottavolts, yottavolt_unit);
205
207 typedef quantity<yoctovolt_unit> yoctovolt_quantity;
209 typedef quantity<zeptovolt_unit> zeptovolt_quantity;
211 typedef quantity<attovolt_unit> attovolt_quantity;
213 typedef quantity<femtovolt_unit> femtovolt_quantity;
215 typedef quantity<picovolt_unit> picovolt_quantity;
217 typedef quantity<nanovolt_unit> nanovolt_quantity;
219 typedef quantity<microvolt_unit> microvolt_quantity;
221 typedef quantity<millivolt_unit> millivolt_quantity;
223 typedef quantity<centivolt_unit> centivolt_quantity;
225 typedef quantity<decivolt_unit> decivolt_quantity;
227 typedef quantity<volt_unit> volt_quantity;
229 typedef quantity<dekavolt_unit> dekavolt_quantity;
231 typedef quantity<decavolt_unit> decavolt_quantity;
233 typedef quantity<hectovolt_unit> hectovolt_quantity;
235 typedef quantity<kilovolt_unit> kilovolt_quantity;
237 typedef quantity<megavolt_unit> megavolt_quantity;
239 typedef quantity<gigavolt_unit> gigavolt_quantity;
241 typedef quantity<teravolt_unit> teravolt_quantity;
243 typedef quantity<petavolt_unit> petavolt_quantity;
245 typedef quantity<exavolt_unit> exavolt_quantity;
247 typedef quantity<zettavolt_unit> zettavolt_quantity;
249 typedef quantity<yottavolt_unit> yottavolt_quantity;
250
251 }
252 }
253 }
254
255 #endif // OME_COMMON_UNITS_ELECTRIC_POTENTIAL_H
256
257 /*
258 * Local Variables:
259 * mode:C++
260 * End:
261 */
ome::common::units::picovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational<-12 > > >::type picovolt_unit
Unit definition for picovolt electric potential.
Definition: electric-potential.h:80
ome::common::units::BOOST_UNITS_STATIC_CONSTANT
BOOST_UNITS_STATIC_CONSTANT(radian, radian_unit)
Numeric constant for radian.
ome::common::units::petavolt_quantity
quantity< petavolt_unit > petavolt_quantity
Measured quantity in petavolts.
Definition: electric-potential.h:243
ome::common::units::gigavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 9 > > >::type gigavolt_unit
Unit definition for gigavolt electric potential.
Definition: electric-potential.h:104
ome::common::units::femtovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational<-15 > > >::type femtovolt_unit
Unit definition for femtovolt electric potential.
Definition: electric-potential.h:78
ome::common::units::megavolt_quantity
quantity< megavolt_unit > megavolt_quantity
Measured quantity in megavolts.
Definition: electric-potential.h:237
ome::common::units::volt_quantity
quantity< volt_unit > volt_quantity
Measured quantity in volts.
Definition: electric-potential.h:227
ome::common::units::decavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 1 > > >::type decavolt_unit
Unit definition for decavolt electric potential.
Definition: electric-potential.h:96
ome::common::units::millivolt_quantity
quantity< millivolt_unit > millivolt_quantity
Measured quantity in millivolts.
Definition: electric-potential.h:221
ome::common::units::teravolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 12 > > >::type teravolt_unit
Unit definition for teravolt electric potential.
Definition: electric-potential.h:106
ome::common::units::yottavolt_quantity
quantity< yottavolt_unit > yottavolt_quantity
Measured quantity in yottavolts.
Definition: electric-potential.h:249
ome::common::units::zettavolt_quantity
quantity< zettavolt_unit > zettavolt_quantity
Measured quantity in zettavolts.
Definition: electric-potential.h:247
ome::common::units::centivolt_quantity
quantity< centivolt_unit > centivolt_quantity
Measured quantity in centivolts.
Definition: electric-potential.h:223
ome::common::units::dekavolt_quantity
quantity< dekavolt_unit > dekavolt_quantity
Measured quantity in dekavolts.
Definition: electric-potential.h:229
ome::common::units::decivolt_quantity
quantity< decivolt_unit > decivolt_quantity
Measured quantity in decivolts.
Definition: electric-potential.h:225
ome::common::units::zeptovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational<-21 > > >::type zeptovolt_unit
Unit definition for zeptovolt electric potential.
Definition: electric-potential.h:74
ome::common::units::kilovolt_quantity
quantity< kilovolt_unit > kilovolt_quantity
Measured quantity in kilovolts.
Definition: electric-potential.h:235
ome::common::units::yottavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 24 > > >::type yottavolt_unit
Unit definition for yottavolt electric potential.
Definition: electric-potential.h:114
ome::common::units::femtovolt_quantity
quantity< femtovolt_unit > femtovolt_quantity
Measured quantity in femtovolts.
Definition: electric-potential.h:213
ome::common::units::volt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 0 > > >::type volt_unit
Unit definition for volt electric potential.
Definition: electric-potential.h:92
ome::common::units::yoctovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational<-24 > > >::type yoctovolt_unit
Unit definition for yoctovolt electric potential.
Definition: electric-potential.h:72
ome::common::units::centivolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< -2 > > >::type centivolt_unit
Unit definition for centivolt electric potential.
Definition: electric-potential.h:88
ome::common::units::hectovolt_quantity
quantity< hectovolt_unit > hectovolt_quantity
Measured quantity in hectovolts.
Definition: electric-potential.h:233
ome::common::units::gigavolt_quantity
quantity< gigavolt_unit > gigavolt_quantity
Measured quantity in gigavolts.
Definition: electric-potential.h:239
ome::common::units::megavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 6 > > >::type megavolt_unit
Unit definition for megavolt electric potential.
Definition: electric-potential.h:102
ome::common::units::picovolt_quantity
quantity< picovolt_unit > picovolt_quantity
Measured quantity in picovolts.
Definition: electric-potential.h:215
ome
Open Microscopy Environment C++.
Definition: base64.h:49
ome::common::units::petavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 15 > > >::type petavolt_unit
Unit definition for petavolt electric potential.
Definition: electric-potential.h:108
ome::common::units::microvolt_quantity
quantity< microvolt_unit > microvolt_quantity
Measured quantity in microvolts.
Definition: electric-potential.h:219
ome::common::units::nanovolt_quantity
quantity< nanovolt_unit > nanovolt_quantity
Measured quantity in nanovolts.
Definition: electric-potential.h:217
ome::common::units::dekavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 1 > > >::type dekavolt_unit
Unit definition for dekavolt electric potential.
Definition: electric-potential.h:94
ome::common::units::hectovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 2 > > >::type hectovolt_unit
Unit definition for hectovolt electric potential.
Definition: electric-potential.h:98
ome::common::units::electric_potential_unit
si::electric_potential electric_potential_unit
Unit definition for electric potential.
Definition: electric-potential.h:67
ome::common::units::yoctovolt_quantity
quantity< yoctovolt_unit > yoctovolt_quantity
Measured quantity in yoctovolts.
Definition: electric-potential.h:207
ome::common::units::microvolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< -6 > > >::type microvolt_unit
Unit definition for microvolt electric potential.
Definition: electric-potential.h:84
ome::common::units::kilovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 3 > > >::type kilovolt_unit
Unit definition for kilovolt electric potential.
Definition: electric-potential.h:100
ome::common::units::attovolt_quantity
quantity< attovolt_unit > attovolt_quantity
Measured quantity in attovolts.
Definition: electric-potential.h:211
ome::common::units::decavolt_quantity
quantity< decavolt_unit > decavolt_quantity
Measured quantity in decavolts.
Definition: electric-potential.h:231
ome::common::units::attovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational<-18 > > >::type attovolt_unit
Unit definition for attovolt electric potential.
Definition: electric-potential.h:76
ome::common::units::zeptovolt_quantity
quantity< zeptovolt_unit > zeptovolt_quantity
Measured quantity in zeptovolts.
Definition: electric-potential.h:209
ome::common::units::electric_potential_quantity
quantity< si::electric_potential > electric_potential_quantity
Measured quantity (electric potential, volts).
Definition: electric-potential.h:69
ome::common::units::zettavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 21 > > >::type zettavolt_unit
Unit definition for zettavolt electric potential.
Definition: electric-potential.h:112
ome::common::units::nanovolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< -9 > > >::type nanovolt_unit
Unit definition for nanovolt electric potential.
Definition: electric-potential.h:82
ome::common::units::decivolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< -1 > > >::type decivolt_unit
Unit definition for decivolt electric potential.
Definition: electric-potential.h:90
ome::common::units::teravolt_quantity
quantity< teravolt_unit > teravolt_quantity
Measured quantity in teravolts.
Definition: electric-potential.h:241
ome::common::units::millivolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< -3 > > >::type millivolt_unit
Unit definition for millivolt electric potential.
Definition: electric-potential.h:86
ome::common::units::exavolt_quantity
quantity< exavolt_unit > exavolt_quantity
Measured quantity in exavolts.
Definition: electric-potential.h:245
ome::common::units::exavolt_unit
make_scaled_unit< si::electric_potential, scale< 10, static_rational< 18 > > >::type exavolt_unit
Unit definition for exavolt electric potential.
Definition: electric-potential.h:110