bioformats  5.1.3
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  */
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40