#include <time_point_get.hpp>


Public Types | |
| typedef CharT | char_type |
| Type of character the facet is instantiated on. More... | |
| typedef InputIterator | iter_type |
| Type of iterator used to scan the character buffer. More... | |
Public Member Functions | |
| time_point_get (size_t refs=0) | |
Construct a time_point_get facet. More... | |
| template<class Clock , class Duration > | |
| iter_type | get (iter_type i, iter_type e, std::ios_base &is, std::ios_base::iostate &err, time_point< Clock, Duration > &tp, const char_type *pattern, const char_type *pat_end) const |
| template<class Clock , class Duration > | |
| iter_type | get (time_point_units< CharT > const &facet, iter_type s, iter_type end, std::ios_base &ios, std::ios_base::iostate &err, time_point< Clock, Duration > &tp, const char_type *pattern, const char_type *pat_end) const |
| template<typename Rep , typename Period > | |
| iter_type | get_duration (iter_type i, iter_type e, std::ios_base &is, std::ios_base::iostate &err, duration< Rep, Period > &d) const |
| template<typename Rep , typename Period > | |
| iter_type | get_duration (duration_get< CharT > const &facet, iter_type s, iter_type end, std::ios_base &ios, std::ios_base::iostate &err, duration< Rep, Period > &d) const |
| template<class Clock > | |
| iter_type | get_epoch (iter_type i, iter_type e, std::ios_base &is, std::ios_base::iostate &err) const |
Let facet be the time_point_units facet associated to is or a new instance of the default time_point_units_default facet. More... | |
| template<class Clock > | |
| iter_type | get_epoch (time_point_units< CharT > const &facet, iter_type i, iter_type e, std::ios_base &, std::ios_base::iostate &err) const |
| ~time_point_get () | |
| Destroy the facet More... | |
Static Public Attributes | |
| static std::locale::id | id |
| Unique identifier for this type of facet. More... | |
| typedef CharT boost::chrono::time_point_get< CharT, InputIterator >::char_type |
Type of character the facet is instantiated on.
| typedef InputIterator boost::chrono::time_point_get< CharT, InputIterator >::iter_type |
Type of iterator used to scan the character buffer.
|
inlineexplicit |
Construct a time_point_get facet.
| refs | Construct a time_point_get 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 |
Destroy the facet
|
inline |
| s | start input stream iterator |
| end | end input stream iterator |
| ios | a reference to a ios_base |
| err | the ios_base state |
| d | the duration |
| pattern | begin of the formatting pattern |
| pat_end | end of the formatting pattern |
Requires: [pattern,pat_end) shall be a valid range.
Effects: The function starts by evaluating err = std::ios_base::goodbit. It then enters a loop, reading zero or more characters from s at each iteration. Unless otherwise specified below, the loop terminates when the first of the following conditions holds:
get_duration or get_epoch are called depending on whether the format is 'd' or 'e'. If the number of elements in the range [pattern,pat_end) is not sufficient to unambiguously determine whether the conversion specification is complete and valid, the function evaluates err = std::ios_base::failbit. Otherwise, the function evaluates s = do_get(s, end, ios, err, d). If err == std::ios_base::goodbit holds after the evaluation of the expression, the function increments pattern to point just past the end of the conversion specification and continues looping.Returns: s
References boost::multiprecision::backends::i.
|
inline |
|
inline |
| s | an input stream iterator |
| ios | a reference to a ios_base |
| d | the duration Stores the duration pattern from the duration_unit facet in let say str. Last as if @codeend
@Returns An iterator pointing just beyond the last character that can be determined to be part of a valid name
/
template <class Clock, class Duration>
time_point<Clock, Duration> &tp) const
{
if (std::has_facet<time_point_units<CharT> >(is.getloc()))
{
time_point_units<CharT> const &facet = std::use_facet<time_point_units<CharT> >(is.getloc());
std::basic_string<CharT> str = facet.get_pattern();
}
else
{
time_point_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
}
}
facet is either the duration_get facet associated to the ios or an instance of the default duration_get facet. |
An iterator pointing just beyond the last character that can be determined to be part of a valid duration.
Referenced by boost::chrono::time_point_get< CharT, InputIterator >::get().
|
inline |
|
inline |
Let facet be the time_point_units facet associated to is or a new instance of the default time_point_units_default facet.
Let epoch be the epoch string associated to the Clock using this facet. Scans i to match epoch or e is reached.
If not match before the e is reached std::ios_base::failbit is set in err. If e is reached std::ios_base::failbit is set in err.
An iterator pointing just beyond the last character that can be determined to be part of a valid epoch.
|
inline |
References boost::regex_constants::failbit, and boost::multiprecision::backends::i.
|
static |
Unique identifier for this type of facet.