Added boost header

This commit is contained in:
Christophe Riccio
2012-01-08 01:26:07 +00:00
parent 9c3faaca40
commit c7d752cdf8
8946 changed files with 1732316 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// No include guards. This header is intended to be included
// multiple times.
// imperial units
#if 0
#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED) &&\
!defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED)
#define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gallon_base_unit, double, 1./8.);
#endif
#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED) &&\
!defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED)
#define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::quart_base_unit, double, 1./2.);
#endif
#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED) &&\
!defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED)
#define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gill_base_unit, double, 4.);
#endif
#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED) &&\
!defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED)
#define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::fluid_ounce_base_unit, double, 20.);
#endif
#endif

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<16, static_rational<-2> > > drachm_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::drachm_base_unit> {
static const char* name() { return("drachm"); }
static const char* symbol() { return("drachm"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED
#define BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pint.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pint_base_unit, scale<20, static_rational<-1> > > fluid_ounce_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::fluid_ounce_base_unit> {
static const char* name() { return("fluid ounce (imp.)"); }
static const char* symbol() { return("fl oz"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<3, static_rational<-1> > > foot_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::foot_base_unit> {
static const char* name() { return("foot"); }
static const char* symbol() { return("ft"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<220, static_rational<1> > > furlong_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::furlong_base_unit> {
static const char* name() { return("furlong"); }
static const char* symbol() { return("furlong"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP

View File

@@ -0,0 +1,40 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED
#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pint.hpp>
namespace boost {
namespace units {
namespace imperial {
//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<3> > > gallon_base_unit;
typedef scaled_base_unit<pint_base_unit, scale<8, static_rational<1> > > gallon_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::gallon_base_unit> {
static const char* name() { return("gallon (imp.)"); }
static const char* symbol() { return("gal"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED

View File

@@ -0,0 +1,40 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED
#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pint.hpp>
namespace boost {
namespace units {
namespace imperial {
//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-2> > > gill_base_unit;
typedef scaled_base_unit<pint_base_unit, scale<4, static_rational<-1> > > gill_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::gill_base_unit> {
static const char* name() { return("gill (imp.)"); }
static const char* symbol() { return("gill"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<7000, static_rational<-1> > > grain_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::grain_base_unit> {
static const char* name() { return("grain"); }
static const char* symbol() { return("grain"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<112, static_rational<1> > > hundredweight_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::hundredweight_base_unit> {
static const char* name() { return("hundredweight"); }
static const char* symbol() { return("cwt"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<36, static_rational<-1> > > inch_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::inch_base_unit> {
static const char* name() { return("inch"); }
static const char* symbol() { return("in"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<5280, static_rational<1> > > league_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::league_base_unit> {
static const char* name() { return("league"); }
static const char* symbol() { return("league"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<1760, static_rational<1> > > mile_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::mile_base_unit> {
static const char* name() { return("mile"); }
static const char* symbol() { return("mi"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<2, static_rational<-4> > > ounce_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::ounce_base_unit> {
static const char* name() { return("ounce"); }
static const char* symbol() { return("oz"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED

View File

@@ -0,0 +1,29 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED
#define BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED
#include <string>
#include <boost/units/systems/si/volume.hpp>
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pint, "pint (imp.)", "pt", 4.54609e-3/8., si::volume, -303); // exact conversion
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pint_base_unit)
#endif
#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED

View File

@@ -0,0 +1,34 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED
#include <string>
#include <boost/units/config.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/base_units/cgs/gram.hpp>
#include <boost/units/conversion.hpp>
// can't define in terms of kilogram because it is a scaled_base_unit
//BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 0.45359237, si::kilogram_base_unit, -302); // exact conversion
BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -302); // exact conversion
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pound_base_unit)
#endif
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED

View File

@@ -0,0 +1,40 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED
#define BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pint.hpp>
namespace boost {
namespace units {
namespace imperial {
//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<1> > > quart_base_unit;
typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<1> > > quart_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::quart_base_unit> {
static const char* name() { return("quart (imp.)"); }
static const char* symbol() { return("qt"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<28, static_rational<1> > > quarter_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::quarter_base_unit> {
static const char* name() { return("quarter"); }
static const char* symbol() { return("quarter"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<14, static_rational<1> > > stone_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::stone_base_unit> {
static const char* name() { return("stone"); }
static const char* symbol() { return("st"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED

View File

@@ -0,0 +1,39 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP
#define BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/yard.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<yard_base_unit, scale<36000, static_rational<-1> > > thou_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::thou_base_unit> {
static const char* name() { return("thou"); }
static const char* symbol() { return("thou"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP

View File

@@ -0,0 +1,40 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED
#define BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED
#include <boost/units/scaled_base_unit.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/scale.hpp>
#include <boost/units/base_units/imperial/pound.hpp>
namespace boost {
namespace units {
namespace imperial {
typedef scaled_base_unit<pound_base_unit, scale<2240, static_rational<1> > > ton_base_unit;
} // namespace imperial
template<>
struct base_unit_info<imperial::ton_base_unit> {
static const char* name() { return("long ton"); }
static const char* symbol() { return("t"); }
};
} // namespace units
} // namespace boost
#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED

View File

@@ -0,0 +1,32 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP
#define BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP
#include <string>
#include <boost/units/config.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/base_units/si/meter.hpp>
#include <boost/units/conversion.hpp>
BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, yard, "yard", "yd", 0.9144, si::meter_base_unit, -301); // exact conversion
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::yard_base_unit)
#endif
#endif // BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP