This class is used to define the strings for the default English. More...
#include <duration_units.hpp>
Public Types | |
typedef CharT | char_type |
Type of character the facet is instantiated on. More... | |
typedef std::basic_string< CharT > | string_type |
Type of character string passed to member functions. More... | |
Public Member Functions | |
duration_units_default (size_t refs=0) | |
Construct a duration_units_default facet. More... | |
~duration_units_default () | |
Destroys the facet. More... | |
bool | match_n_d_valid_unit (const string_type *k) const |
bool | match_valid_unit (const string_type *k, rt_ratio &rt) const |
virtual const string_type * | get_n_d_valid_units_start () const |
virtual const string_type * | get_n_d_valid_units_end () const |
virtual const string_type * | get_valid_units_start () const |
virtual const string_type * | get_valid_units_end () const |
string_type | get_pattern () const |
calls the do_... More... | |
template<typename Rep , typename Period > | |
string_type | get_unit (duration_style style, duration< Rep, Period > const &d) const |
calls the do_... More... | |
template<typename Rep , typename Period > | |
string_type | get_n_d_unit (duration_style style, duration< Rep, Period > const &d) const |
calls the do_... More... | |
template<typename Period > | |
bool | is_named_unit () const |
calls the do_... More... | |
Static Public Member Functions | |
template<typename Period > | |
static string_type * | static_fill_units (string_type *it, Period) |
static string_type * | static_init_valid_units (string_type *it) |
Static Public Attributes | |
static std::locale::id | id |
Unique identifier for this type of facet. More... | |
Protected Member Functions | |
bool | do_is_named_unit (rt_ratio rt) const |
This facet names the units associated to the following periods: atto,femto,pico,nano,micro,milli,centi,deci,ratio<1>,deca,hecto,kilo,mega,giga,tera,peta,exa,ratio<60> and ratio<3600>. More... | |
string_type | do_get_n_d_unit (duration_style style, rt_ratio, intmax_t v) const |
In English the suffix used after [N/D] is the one associated to the period ratio<1>. More... | |
string_type | do_get_unit (duration_style style, rt_ratio rt, intmax_t v) const |
virtual std::size_t | do_get_plural_forms () const |
virtual std::size_t | do_get_plural_form (int_least64_t value) const |
Gets the associated plural form. More... | |
virtual string_type | do_get_unit (duration_style style, ratio< 1 > u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, ratio< 60 > u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, ratio< 3600 > u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, atto u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, femto u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, pico u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, nano u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, micro u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, milli u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, centi u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, deci u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, deca u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, hecto u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, kilo u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, mega u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, giga u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, tera u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, peta u, std::size_t pf) const |
virtual string_type | do_get_unit (duration_style style, exa u, std::size_t pf) const |
virtual string_type | do_get_ratio_prefix (duration_style style, atto u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, femto u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, pico u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, nano u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, micro u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, milli u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, centi u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, deci u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, deca u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, hecto u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, kilo u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, mega u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, giga u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, tera u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, peta u) const |
virtual string_type | do_get_ratio_prefix (duration_style style, exa u) const |
template<typename Period > | |
string_type * | fill_units (string_type *it, Period) const |
Static Protected Member Functions | |
static std::size_t | static_get_plural_forms () |
static std::size_t | static_get_plural_form (int_least64_t value) |
static string_type | static_get_unit (duration_style style, ratio< 1 >, std::size_t pf) |
static string_type | static_get_unit (duration_style style, ratio< 60 >, std::size_t pf) |
static string_type | static_get_unit (duration_style style, ratio< 3600 >, std::size_t pf) |
static string_type | static_get_unit (duration_style style, atto u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, femto u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, pico u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, nano u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, micro u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, milli u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, centi u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, deci u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, deca u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, hecto u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, kilo u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, mega u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, giga u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, tera u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, peta u, std::size_t pf) |
static string_type | static_get_unit (duration_style style, exa u, std::size_t pf) |
static string_type | static_get_ratio_prefix (duration_style style, atto) |
static string_type | static_get_ratio_prefix (duration_style style, femto) |
static string_type | static_get_ratio_prefix (duration_style style, pico) |
static string_type | static_get_ratio_prefix (duration_style style, nano) |
static string_type | static_get_ratio_prefix (duration_style style, micro) |
static string_type | static_get_ratio_prefix (duration_style style, milli) |
static string_type | static_get_ratio_prefix (duration_style style, centi) |
static string_type | static_get_ratio_prefix (duration_style style, deci) |
static string_type | static_get_ratio_prefix (duration_style style, deca) |
static string_type | static_get_ratio_prefix (duration_style style, hecto) |
static string_type | static_get_ratio_prefix (duration_style style, kilo) |
static string_type | static_get_ratio_prefix (duration_style style, mega) |
static string_type | static_get_ratio_prefix (duration_style style, giga) |
static string_type | static_get_ratio_prefix (duration_style style, tera) |
static string_type | static_get_ratio_prefix (duration_style style, peta) |
static string_type | static_get_ratio_prefix (duration_style style, exa) |
Static Protected Attributes | |
static const std::size_t | pfs_ = 2 |
This class is used to define the strings for the default English.
typedef CharT boost::chrono::duration_units_default< CharT >::char_type |
Type of character the facet is instantiated on.
typedef std::basic_string<CharT> boost::chrono::duration_units_default< CharT >::string_type |
Type of character string passed to member functions.
|
inlineexplicit |
Construct a duration_units_default
facet.
refs | Construct a duration_units_default facet. If the refs argument is 0 then destruction of the object is delegated to the locale , or locales, containing it. This allows the user to ignore lifetime management issues. On the other had, if refs is 1 then the object must be explicitly deleted; the locale will not do so. In this case, the object can be maintained across the lifetime of multiple locales. |
|
inline |
Destroys the facet.
|
inlineprotectedvirtual |
In English the suffix used after [N/D] is the one associated to the period ratio<1>.
Implements boost::chrono::duration_units< CharT >.
References boost::chrono::duration_units_default< CharT >::do_get_plural_form(), and boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
Gets the associated plural form.
value | the duration representation |
value
parameter. In English there are 2 plural forms 0 singular (-1 or 1) 1 plural for all others References boost::chrono::duration_units_default< CharT >::static_get_plural_form().
Referenced by boost::chrono::duration_units_default< CharT >::do_get_n_d_unit(), and boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
References boost::chrono::duration_units_default< CharT >::static_get_plural_forms().
Referenced by boost::chrono::duration_units_default< CharT >::fill_units().
|
inlineprotectedvirtual |
style | the duration style. |
u | the period tag atto. |
style
return the ratio_string symbol or prefix. References boost::chrono::duration_units_default< CharT >::static_get_ratio_prefix().
Referenced by boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Implements boost::chrono::duration_units< CharT >.
References BOOST_ASSERT, BOOST_RATIO_INTMAX_C, boost::chrono::rt_ratio::den, boost::chrono::duration_units_default< CharT >::do_get_plural_form(), and boost::chrono::rt_ratio::num.
Referenced by boost::chrono::duration_units_default< CharT >::do_get_n_d_unit(), boost::chrono::duration_units_default< CharT >::do_get_unit(), and boost::chrono::duration_units_default< CharT >::fill_units().
|
inlineprotectedvirtual |
style | the duration style. |
period | the period associated to the duration seconds. |
pf | the requested plural form. |
References boost::chrono::duration_units_default< CharT >::static_get_unit().
|
inlineprotectedvirtual |
style | the duration style. |
period | the period associated to the duration minutes. |
pf | the requested plural form. |
References boost::chrono::duration_units_default< CharT >::static_get_unit().
|
inlineprotectedvirtual |
style | the duration style. |
period | the period associated to the duration hours. |
pf | the requested plural form. |
References boost::chrono::duration_units_default< CharT >::static_get_unit().
|
inlineprotectedvirtual |
style | the duration style. |
u | the period tag atto. |
pf | the requested plural form. |
period
+ the one associated to seconds. References boost::chrono::duration_units_default< CharT >::do_get_ratio_prefix(), and boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
style | the duration style. |
u | the period tag femto. |
pf | the requested plural form. |
u
+ the one associated to seconds. References boost::chrono::duration_units_default< CharT >::do_get_ratio_prefix(), and boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
style | the duration style. |
u | the period tag femto. |
pf | the requested plural form. |
u
+ the one associated to seconds. References boost::chrono::duration_units_default< CharT >::do_get_ratio_prefix(), and boost::chrono::duration_units_default< CharT >::do_get_unit().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
This facet names the units associated to the following periods: atto,femto,pico,nano,micro,milli,centi,deci,ratio<1>,deca,hecto,kilo,mega,giga,tera,peta,exa,ratio<60> and ratio<3600>.
Implements boost::chrono::duration_units< CharT >.
References BOOST_RATIO_INTMAX_C, boost::chrono::rt_ratio::den, and boost::chrono::rt_ratio::num.
|
inlineprotected |
|
inlineinherited |
calls the do_...
References boost::chrono::duration< Rep, Period >::count(), and boost::chrono::duration_units< CharT >::do_get_n_d_unit().
Referenced by boost::chrono::duration_put< CharT, OutputIterator >::put_unit().
|
inlinevirtual |
Implements boost::chrono::duration_units< CharT >.
|
inlinevirtual |
Implements boost::chrono::duration_units< CharT >.
Referenced by boost::chrono::duration_units_default< CharT >::match_n_d_valid_unit().
|
inlinevirtual |
calls the do_...
Implements boost::chrono::duration_units< CharT >.
References boost::flyweights::t.
Referenced by boost::chrono::duration_put< CharT, OutputIterator >::put().
|
inlineinherited |
calls the do_...
References boost::chrono::duration< Rep, Period >::count(), and boost::chrono::duration_units< CharT >::do_get_unit().
Referenced by boost::chrono::duration_put< CharT, OutputIterator >::put_unit().
|
inlinevirtual |
Implements boost::chrono::duration_units< CharT >.
|
inlinevirtual |
Implements boost::chrono::duration_units< CharT >.
Referenced by boost::chrono::duration_units_default< CharT >::match_valid_unit().
|
inlineinherited |
calls the do_...
References boost::chrono::duration_units< CharT >::do_is_named_unit().
|
inlinevirtual |
k | the found pointer to the [N/D] unit. |
k
matches a valid unit. Implements boost::chrono::duration_units< CharT >.
References boost::chrono::duration_units_default< CharT >::get_n_d_valid_units_start().
|
inlinevirtual |
k | the found pointer to the unit. rt is set to the valid Period when the k matches a valid unit. |
k
matches a valid unit. Implements boost::chrono::duration_units< CharT >.
References boost::chrono::duration_units_default< CharT >::get_valid_units_start().
|
inlinestatic |
References boost::it, boost::chrono::duration_units_default< CharT >::static_get_plural_forms(), boost::chrono::duration_units_default< CharT >::static_get_unit(), and boost::spirit::x3::unicode::symbol.
Referenced by boost::chrono::detail::duration_units_default_initializer_t< CharT >::duration_units_default_initializer_t(), and boost::chrono::duration_units_default< CharT >::static_init_valid_units().
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
References boost::ratio_string< Ratio, CharT >::prefix(), boost::ratio_string< Ratio, CharT >::symbol(), and boost::spirit::x3::unicode::symbol.
Referenced by boost::chrono::duration_units_default< CharT >::do_get_ratio_prefix(), and boost::chrono::duration_units_default< CharT >::static_get_unit().
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
References BOOST_ASSERT, boost::spirit::x3::unicode::symbol, and boost::flyweights::t.
Referenced by boost::chrono::duration_units_default< CharT >::do_get_unit(), boost::chrono::duration_units_default< CharT >::static_fill_units(), and boost::chrono::duration_units_default< CharT >::static_get_unit().
|
inlinestaticprotected |
References BOOST_ASSERT, boost::spirit::x3::unicode::symbol, and boost::flyweights::t.
|
inlinestaticprotected |
References BOOST_ASSERT, boost::spirit::x3::unicode::symbol, and boost::flyweights::t.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestatic |
|
staticinherited |
Unique identifier for this type of facet.
|
staticprotected |