bioformats  5.1.3
frequency.h
Go to the documentation of this file.
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_FREQUENCY_H
48 #define OME_COMMON_UNITS_FREQUENCY_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  // Frequency types, constants and quantities.
65 
67  typedef si::frequency frequency_unit;
69  typedef quantity<si::frequency> frequency_quantity;
70 
72  typedef make_scaled_unit<si::frequency,scale<10,static_rational<-24> > >::type yoctohertz_unit;
74  typedef make_scaled_unit<si::frequency,scale<10,static_rational<-21> > >::type zeptohertz_unit;
76  typedef make_scaled_unit<si::frequency,scale<10,static_rational<-18> > >::type attohertz_unit;
78  typedef make_scaled_unit<si::frequency,scale<10,static_rational<-15> > >::type femtohertz_unit;
80  typedef make_scaled_unit<si::frequency,scale<10,static_rational<-12> > >::type picohertz_unit;
82  typedef make_scaled_unit<si::frequency,scale<10,static_rational< -9> > >::type nanohertz_unit;
84  typedef make_scaled_unit<si::frequency,scale<10,static_rational< -6> > >::type microhertz_unit;
86  typedef make_scaled_unit<si::frequency,scale<10,static_rational< -3> > >::type millihertz_unit;
88  typedef make_scaled_unit<si::frequency,scale<10,static_rational< -2> > >::type centihertz_unit;
90  typedef make_scaled_unit<si::frequency,scale<10,static_rational< -1> > >::type decihertz_unit;
92  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 0> > >::type hertz_unit;
94  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 1> > >::type dekahertz_unit;
96  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 1> > >::type decahertz_unit;
98  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 2> > >::type hectohertz_unit;
100  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 3> > >::type kilohertz_unit;
102  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 6> > >::type megahertz_unit;
104  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 9> > >::type gigahertz_unit;
106  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 12> > >::type terahertz_unit;
108  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 15> > >::type petahertz_unit;
110  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 18> > >::type exahertz_unit;
112  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 21> > >::type zettahertz_unit;
114  typedef make_scaled_unit<si::frequency,scale<10,static_rational< 24> > >::type yottahertz_unit;
115 
117  BOOST_UNITS_STATIC_CONSTANT(yoctohertz, yoctohertz_unit);
119  BOOST_UNITS_STATIC_CONSTANT(zeptohertz, zeptohertz_unit);
121  BOOST_UNITS_STATIC_CONSTANT(attohertz, attohertz_unit);
123  BOOST_UNITS_STATIC_CONSTANT(femtohertz, femtohertz_unit);
125  BOOST_UNITS_STATIC_CONSTANT(picohertz, picohertz_unit);
127  BOOST_UNITS_STATIC_CONSTANT(nanohertz, nanohertz_unit);
129  BOOST_UNITS_STATIC_CONSTANT(microhertz, microhertz_unit);
131  BOOST_UNITS_STATIC_CONSTANT(millihertz, millihertz_unit);
133  BOOST_UNITS_STATIC_CONSTANT(centihertz, centihertz_unit);
135  BOOST_UNITS_STATIC_CONSTANT(decihertz, decihertz_unit);
137  BOOST_UNITS_STATIC_CONSTANT(hertz, hertz_unit);
139  BOOST_UNITS_STATIC_CONSTANT(dekahertz, dekahertz_unit);
141  BOOST_UNITS_STATIC_CONSTANT(decahertz, decahertz_unit);
143  BOOST_UNITS_STATIC_CONSTANT(hectohertz, hectohertz_unit);
145  BOOST_UNITS_STATIC_CONSTANT(kilohertz, kilohertz_unit);
147  BOOST_UNITS_STATIC_CONSTANT(megahertz, megahertz_unit);
149  BOOST_UNITS_STATIC_CONSTANT(gigahertz, gigahertz_unit);
151  BOOST_UNITS_STATIC_CONSTANT(terahertz, terahertz_unit);
153  BOOST_UNITS_STATIC_CONSTANT(petahertz, petahertz_unit);
155  BOOST_UNITS_STATIC_CONSTANT(exahertz, exahertz_unit);
157  BOOST_UNITS_STATIC_CONSTANT(zettahertz, zettahertz_unit);
159  BOOST_UNITS_STATIC_CONSTANT(yottahertz, yottahertz_unit);
160 
162  typedef quantity<yoctohertz_unit> yoctohertz_quantity;
164  typedef quantity<zeptohertz_unit> zeptohertz_quantity;
166  typedef quantity<attohertz_unit> attohertz_quantity;
168  typedef quantity<femtohertz_unit> femtohertz_quantity;
170  typedef quantity<picohertz_unit> picohertz_quantity;
172  typedef quantity<nanohertz_unit> nanohertz_quantity;
174  typedef quantity<microhertz_unit> microhertz_quantity;
176  typedef quantity<millihertz_unit> millihertz_quantity;
178  typedef quantity<centihertz_unit> centihertz_quantity;
180  typedef quantity<decihertz_unit> decihertz_quantity;
182  typedef quantity<hertz_unit> hertz_quantity;
184  typedef quantity<dekahertz_unit> dekahertz_quantity;
186  typedef quantity<decahertz_unit> decahertz_quantity;
188  typedef quantity<hectohertz_unit> hectohertz_quantity;
190  typedef quantity<kilohertz_unit> kilohertz_quantity;
192  typedef quantity<megahertz_unit> megahertz_quantity;
194  typedef quantity<gigahertz_unit> gigahertz_quantity;
196  typedef quantity<terahertz_unit> terahertz_quantity;
198  typedef quantity<petahertz_unit> petahertz_quantity;
200  typedef quantity<exahertz_unit> exahertz_quantity;
202  typedef quantity<zettahertz_unit> zettahertz_quantity;
204  typedef quantity<yottahertz_unit> yottahertz_quantity;
205 
206  }
207  }
208 }
209 
210 #endif // OME_COMMON_UNITS_FREQUENCY_H
211 
212 /*
213  * Local Variables:
214  * mode:C++
215  * End:
216  */
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40