duration_units
facet gives useful information about the duration units, as the number of plural forms, the plural form associated to a duration, the text associated to a plural form and a duration's period,
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 (size_t refs=0) | |
Construct a duration_units facet. More... | |
virtual const string_type * | get_n_d_valid_units_start () const =0 |
virtual const string_type * | get_n_d_valid_units_end () const =0 |
calls the do_... More... | |
virtual const string_type * | get_valid_units_start () const =0 |
virtual const string_type * | get_valid_units_end () const =0 |
virtual bool | match_n_d_valid_unit (const string_type *k) const =0 |
virtual bool | match_valid_unit (const string_type *k, rt_ratio &rt) const =0 |
virtual string_type | get_pattern () const =0 |
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 Attributes | |
static std::locale::id | id |
Unique identifier for this type of facet. More... | |
Protected Member Functions | |
virtual | ~duration_units () |
Destroys the facet More... | |
virtual string_type | do_get_n_d_unit (duration_style style, rt_ratio rt, intmax_t v) const =0 |
virtual string_type | do_get_unit (duration_style style, rt_ratio rt, intmax_t v) const =0 |
virtual bool | do_is_named_unit (rt_ratio rt) const =0 |
duration_units
facet gives useful information about the duration units, as the number of plural forms, the plural form associated to a duration, the text associated to a plural form and a duration's period,
typedef CharT boost::chrono::duration_units< CharT >::char_type |
Type of character the facet is instantiated on.
typedef std::basic_string<CharT> boost::chrono::duration_units< CharT >::string_type |
Type of character string passed to member functions.
|
inlineexplicit |
Construct a duration_units
facet.
refs | Construct a duration_units 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. |
|
inlineprotectedvirtual |
Destroys the facet
|
protectedpure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_units< CharT >::get_n_d_unit().
|
protectedpure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_units< CharT >::get_unit().
|
protectedpure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_units< CharT >::is_named_unit().
|
inline |
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().
|
pure virtual |
calls the do_...
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_n_d_valid_unit().
|
pure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_n_d_valid_unit().
|
pure virtual |
calls the do_...
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_put< CharT, OutputIterator >::put().
|
inline |
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().
|
pure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_valid_unit().
|
pure virtual |
Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_valid_unit().
|
inline |
calls the do_...
References boost::chrono::duration_units< CharT >::do_is_named_unit().
|
pure virtual |
k | the found pointer to the [N/D] unit. |
k
matches a valid unit. Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_n_d_valid_unit().
|
pure virtual |
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. Implemented in boost::chrono::duration_units_default< CharT >.
Referenced by boost::chrono::duration_get< CharT, InputIterator >::do_get_valid_unit().
|
static |
Unique identifier for this type of facet.