47 #ifndef OME_COMMON_UNITS_TIME_H
48 #define OME_COMMON_UNITS_TIME_H
50 #include <ome/common/config.h>
51 #include <ome/common/units/types.h>
53 #include <boost/units/unit.hpp>
54 #include <boost/units/base_units/metric/minute.hpp>
55 #include <boost/units/base_units/metric/hour.hpp>
56 #include <boost/units/base_units/metric/day.hpp>
57 #include <boost/units/quantity.hpp>
58 #include <boost/units/systems/si.hpp>
70 typedef si::time time_unit;
72 typedef quantity<si::time> time_quantity;
75 typedef make_scaled_unit<si::time,scale<10,static_rational<-24> > >::type yoctosecond_unit;
77 typedef make_scaled_unit<si::time,scale<10,static_rational<-21> > >::type zeptosecond_unit;
79 typedef make_scaled_unit<si::time,scale<10,static_rational<-18> > >::type attosecond_unit;
81 typedef make_scaled_unit<si::time,scale<10,static_rational<-15> > >::type femtosecond_unit;
83 typedef make_scaled_unit<si::time,scale<10,static_rational<-12> > >::type picosecond_unit;
85 typedef make_scaled_unit<si::time,scale<10,static_rational< -9> > >::type nanosecond_unit;
87 typedef make_scaled_unit<si::time,scale<10,static_rational< -6> > >::type microsecond_unit;
89 typedef make_scaled_unit<si::time,scale<10,static_rational< -3> > >::type millisecond_unit;
91 typedef make_scaled_unit<si::time,scale<10,static_rational< -2> > >::type centisecond_unit;
93 typedef make_scaled_unit<si::time,scale<10,static_rational< -1> > >::type decisecond_unit;
95 typedef make_scaled_unit<si::time,scale<10,static_rational< 0> > >::type second_unit;
97 typedef make_scaled_unit<si::time,scale<10,static_rational< 1> > >::type dekasecond_unit;
99 typedef make_scaled_unit<si::time,scale<10,static_rational< 1> > >::type decasecond_unit;
101 typedef make_scaled_unit<si::time,scale<10,static_rational< 2> > >::type hectosecond_unit;
103 typedef make_scaled_unit<si::time,scale<10,static_rational< 3> > >::type kilosecond_unit;
105 typedef make_scaled_unit<si::time,scale<10,static_rational< 6> > >::type megasecond_unit;
107 typedef make_scaled_unit<si::time,scale<10,static_rational< 9> > >::type gigasecond_unit;
109 typedef make_scaled_unit<si::time,scale<10,static_rational< 12> > >::type terasecond_unit;
111 typedef make_scaled_unit<si::time,scale<10,static_rational< 15> > >::type petasecond_unit;
113 typedef make_scaled_unit<si::time,scale<10,static_rational< 18> > >::type exasecond_unit;
115 typedef make_scaled_unit<si::time,scale<10,static_rational< 21> > >::type zettasecond_unit;
117 typedef make_scaled_unit<si::time,scale<10,static_rational< 24> > >::type yottasecond_unit;
120 BOOST_UNITS_STATIC_CONSTANT(yoctosecond, yoctosecond_unit);
122 BOOST_UNITS_STATIC_CONSTANT(zeptosecond, zeptosecond_unit);
124 BOOST_UNITS_STATIC_CONSTANT(attosecond, attosecond_unit);
126 BOOST_UNITS_STATIC_CONSTANT(femtosecond, femtosecond_unit);
128 BOOST_UNITS_STATIC_CONSTANT(picosecond, picosecond_unit);
130 BOOST_UNITS_STATIC_CONSTANT(nanosecond, nanosecond_unit);
132 BOOST_UNITS_STATIC_CONSTANT(microsecond, microsecond_unit);
134 BOOST_UNITS_STATIC_CONSTANT(millisecond, millisecond_unit);
136 BOOST_UNITS_STATIC_CONSTANT(centisecond, centisecond_unit);
138 BOOST_UNITS_STATIC_CONSTANT(decisecond, decisecond_unit);
140 BOOST_UNITS_STATIC_CONSTANT(second, second_unit);
142 BOOST_UNITS_STATIC_CONSTANT(dekasecond, dekasecond_unit);
144 BOOST_UNITS_STATIC_CONSTANT(decasecond, decasecond_unit);
146 BOOST_UNITS_STATIC_CONSTANT(hectosecond, hectosecond_unit);
148 BOOST_UNITS_STATIC_CONSTANT(kilosecond, kilosecond_unit);
150 BOOST_UNITS_STATIC_CONSTANT(megasecond, megasecond_unit);
152 BOOST_UNITS_STATIC_CONSTANT(gigasecond, gigasecond_unit);
154 BOOST_UNITS_STATIC_CONSTANT(terasecond, terasecond_unit);
156 BOOST_UNITS_STATIC_CONSTANT(petasecond, petasecond_unit);
158 BOOST_UNITS_STATIC_CONSTANT(exasecond, exasecond_unit);
160 BOOST_UNITS_STATIC_CONSTANT(zettasecond, zettasecond_unit);
162 BOOST_UNITS_STATIC_CONSTANT(yottasecond, yottasecond_unit);
165 BOOST_UNITS_STATIC_CONSTANT(yoctoseconds, yoctosecond_unit);
167 BOOST_UNITS_STATIC_CONSTANT(zeptoseconds, zeptosecond_unit);
169 BOOST_UNITS_STATIC_CONSTANT(attoseconds, attosecond_unit);
171 BOOST_UNITS_STATIC_CONSTANT(femtoseconds, femtosecond_unit);
173 BOOST_UNITS_STATIC_CONSTANT(picoseconds, picosecond_unit);
175 BOOST_UNITS_STATIC_CONSTANT(nanoseconds, nanosecond_unit);
177 BOOST_UNITS_STATIC_CONSTANT(microseconds, microsecond_unit);
179 BOOST_UNITS_STATIC_CONSTANT(milliseconds, millisecond_unit);
181 BOOST_UNITS_STATIC_CONSTANT(centiseconds, centisecond_unit);
183 BOOST_UNITS_STATIC_CONSTANT(deciseconds, decisecond_unit);
185 BOOST_UNITS_STATIC_CONSTANT(seconds, second_unit);
187 BOOST_UNITS_STATIC_CONSTANT(dekaseconds, dekasecond_unit);
189 BOOST_UNITS_STATIC_CONSTANT(decaseconds, decasecond_unit);
191 BOOST_UNITS_STATIC_CONSTANT(hectoseconds, hectosecond_unit);
193 BOOST_UNITS_STATIC_CONSTANT(kiloseconds, kilosecond_unit);
195 BOOST_UNITS_STATIC_CONSTANT(megaseconds, megasecond_unit);
197 BOOST_UNITS_STATIC_CONSTANT(gigaseconds, gigasecond_unit);
199 BOOST_UNITS_STATIC_CONSTANT(teraseconds, terasecond_unit);
201 BOOST_UNITS_STATIC_CONSTANT(petaseconds, petasecond_unit);
203 BOOST_UNITS_STATIC_CONSTANT(exaseconds, exasecond_unit);
205 BOOST_UNITS_STATIC_CONSTANT(zettaseconds, zettasecond_unit);
207 BOOST_UNITS_STATIC_CONSTANT(yottaseconds, yottasecond_unit);
210 typedef quantity<yoctosecond_unit> yoctosecond_quantity;
212 typedef quantity<zeptosecond_unit> zeptosecond_quantity;
214 typedef quantity<attosecond_unit> attosecond_quantity;
216 typedef quantity<femtosecond_unit> femtosecond_quantity;
218 typedef quantity<picosecond_unit> picosecond_quantity;
220 typedef quantity<nanosecond_unit> nanosecond_quantity;
222 typedef quantity<microsecond_unit> microsecond_quantity;
224 typedef quantity<millisecond_unit> millisecond_quantity;
226 typedef quantity<centisecond_unit> centisecond_quantity;
228 typedef quantity<decisecond_unit> decisecond_quantity;
230 typedef quantity<second_unit> second_quantity;
232 typedef quantity<dekasecond_unit> dekasecond_quantity;
234 typedef quantity<decasecond_unit> decasecond_quantity;
236 typedef quantity<hectosecond_unit> hectosecond_quantity;
238 typedef quantity<kilosecond_unit> kilosecond_quantity;
240 typedef quantity<megasecond_unit> megasecond_quantity;
242 typedef quantity<gigasecond_unit> gigasecond_quantity;
244 typedef quantity<terasecond_unit> terasecond_quantity;
246 typedef quantity<petasecond_unit> petasecond_quantity;
248 typedef quantity<exasecond_unit> exasecond_quantity;
250 typedef quantity<zettasecond_unit> zettasecond_quantity;
252 typedef quantity<yottasecond_unit> yottasecond_quantity;
255 typedef boost::units::metric::minute_base_unit::unit_type minute_unit;
257 BOOST_UNITS_STATIC_CONSTANT(minute, minute_unit);
259 BOOST_UNITS_STATIC_CONSTANT(minutes, minute_unit);
261 typedef quantity<minute_unit> minute_quantity;
264 typedef boost::units::metric::hour_base_unit::unit_type hour_unit;
266 BOOST_UNITS_STATIC_CONSTANT(hour, hour_unit);
268 BOOST_UNITS_STATIC_CONSTANT(hours, hour_unit);
270 typedef quantity<hour_unit> hour_quantity;
273 typedef boost::units::metric::day_base_unit::unit_type day_unit;
275 BOOST_UNITS_STATIC_CONSTANT(day, day_unit);
277 BOOST_UNITS_STATIC_CONSTANT(days, day_unit);
279 typedef quantity<day_unit> day_quantity;
284 #endif // OME_COMMON_UNITS_TIME_H
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40