Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
scale.hpp File Reference

10^3 Engineering & 2^10 binary scaling factors for autoprefixing. More...

#include <string>
#include <boost/units/config.hpp>
#include <boost/units/static_rational.hpp>
#include <boost/units/units_fwd.hpp>
#include <boost/units/detail/one.hpp>
#include <boost/units/detail/static_rational_power.hpp>
Include dependency graph for scale.hpp:

Classes

struct  boost::units::scaled_base_unit< S, Scale >
 
struct  boost::units::scale< Base, Exponent >
 class representing a scaling factor such as 10^3 The exponent must be a static rational. More...
 
struct  boost::units::scale< Base, static_rational< 0 > >
 INTERNAL ONLY. More...
 
struct  boost::units::scale< 10, static_rational< -24 > >
 
struct  boost::units::scale< 10, static_rational< -21 > >
 
struct  boost::units::scale< 10, static_rational< -18 > >
 
struct  boost::units::scale< 10, static_rational< -15 > >
 
struct  boost::units::scale< 10, static_rational< -12 > >
 
struct  boost::units::scale< 10, static_rational< -9 > >
 
struct  boost::units::scale< 10, static_rational< -6 > >
 
struct  boost::units::scale< 10, static_rational< -3 > >
 
struct  boost::units::scale< 10, static_rational< -2 > >
 
struct  boost::units::scale< 10, static_rational< -1 > >
 
struct  boost::units::scale< 10, static_rational< 1 > >
 
struct  boost::units::scale< 10, static_rational< 2 > >
 
struct  boost::units::scale< 10, static_rational< 3 > >
 
struct  boost::units::scale< 10, static_rational< 6 > >
 
struct  boost::units::scale< 10, static_rational< 9 > >
 
struct  boost::units::scale< 10, static_rational< 12 > >
 
struct  boost::units::scale< 10, static_rational< 15 > >
 
struct  boost::units::scale< 10, static_rational< 18 > >
 
struct  boost::units::scale< 10, static_rational< 21 > >
 
struct  boost::units::scale< 10, static_rational< 24 > >
 
struct  boost::units::scale< 2, static_rational< 10 > >
 
struct  boost::units::scale< 2, static_rational< 20 > >
 
struct  boost::units::scale< 2, static_rational< 30 > >
 
struct  boost::units::scale< 2, static_rational< 40 > >
 
struct  boost::units::scale< 2, static_rational< 50 > >
 
struct  boost::units::scale< 2, static_rational< 60 > >
 
struct  boost::units::scale< 2, static_rational< 70 > >
 
struct  boost::units::scale< 2, static_rational< 80 > >
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::units
 

Macros

#define BOOST_UNITS_SCALE_SPECIALIZATION(base_, exponent_, val_, name_, symbol_)
 
#define BOOST_UNITS_SCALE_DEF(exponent_, value_, name_, symbol_)   BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational<exponent_>,value_, name_, symbol_)
 

Functions

template<long Base, class Exponent >
std::string boost::units::symbol_string (const scale< Base, Exponent > &)
 
template<long Base, class Exponent >
std::string boost::units::name_string (const scale< Base, Exponent > &)
 

Detailed Description

10^3 Engineering & 2^10 binary scaling factors for autoprefixing.

Macro Definition Documentation

#define BOOST_UNITS_SCALE_DEF (   exponent_,
  value_,
  name_,
  symbol_ 
)    BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational<exponent_>,value_, name_, symbol_)
#define BOOST_UNITS_SCALE_SPECIALIZATION (   base_,
  exponent_,
  val_,
  name_,
  symbol_ 
)
Value:
template<> \
struct scale<base_, exponent_ > \
{ \
static const long base = base_; \
typedef exponent_ exponent; \
typedef double value_type; \
static value_type value() { return(val_); } \
static std::string name() { return(#name_); } \
static std::string symbol() { return(#symbol_); } \
}
const int name
Definition: gzip.hpp:94
symbol_type const symbol
Definition: unicode.hpp:461
basic_string< char,std::char_traits< char >,std::allocator< char > > string
Definition: container_fwd.hpp:162
typed_value< T > * value()
Creates a typed_value instance.
value_type
Special integer values that can be used for formatting.
Definition: formatting.hpp:85