#include <time_point_put.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... | |
typedef OutputIterator | iter_type |
Type of iterator used to write in the character buffer. More... | |
Public Member Functions | |
time_point_put (size_t refs=0) | |
Construct a time_point_put facet. More... | |
template<class Clock , class Duration > | |
iter_type | put (iter_type i, std::ios_base &ios, char_type fill, time_point< Clock, Duration > const &tp, const CharT *pattern, const CharT *pat_end) const |
template<class Clock , class Duration > | |
iter_type | put (time_point_units< CharT > const &units_facet, iter_type s, std::ios_base &ios, char_type fill, time_point< Clock, Duration > const &tp, const CharT *pattern, const CharT *pat_end) const |
template<class Clock , class Duration > | |
iter_type | put (iter_type i, std::ios_base &ios, char_type fill, time_point< Clock, Duration > const &tp) const |
template<typename Rep , typename Period > | |
iter_type | put_duration (iter_type i, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d) const |
template<typename Clock > | |
iter_type | put_epoch (iter_type i, std::ios_base &os) const |
template<typename Clock > | |
iter_type | put_epoch (time_point_units< CharT > const &facet, iter_type s, std::ios_base &) const |
~time_point_put () | |
Destroy the facet More... | |
Static Public Attributes | |
static std::locale::id | id |
Unique identifier for this type of facet. More... | |
ChatT | a character type |
OutputIterator | a model of OutputIterator |
The time_point_put
facet provides facilities for formatted output of time_point
values. The member function of time_point_put
take a time_point
and format it into character string representation.
typedef CharT boost::chrono::time_point_put< CharT, OutputIterator >::char_type |
Type of character the facet is instantiated on.
typedef OutputIterator boost::chrono::time_point_put< CharT, OutputIterator >::iter_type |
Type of iterator used to write in the character buffer.
typedef std::basic_string<CharT> boost::chrono::time_point_put< CharT, OutputIterator >::string_type |
Type of character string passed to member functions.
|
inlineexplicit |
Construct a time_point_put facet.
refs | Construct a time_point_put 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 |
i | an output stream iterator |
ios | a reference to a ios_base |
fill | the character used as filler |
tp | the time_point |
pattern | begin of the formatting pattern |
pat_end | end of the formatting pattern |
Steps through the sequence from pattern
to pat_end
, identifying characters that are part of a pattern sequence. Each character that is not part of a pattern sequence is written to s
immediately, and each pattern sequence, as it is identified, results in a call to put_duration
or put_epoch
; thus, pattern elements and other characters are interleaved in the output in the order in which they appear in the pattern. Pattern sequences are identified by converting each character c
to a char
value as if by ct.narrow(c,0)
, where ct
is a reference to ctype<charT>
obtained from ios.getloc()
. The first character of each sequence is equal to ''
, followed by a pattern specifier character spec
, which can be 'd'
for the duration value or 'e'
for the epoch. For each valid pattern sequence identified, calls put_duration(s, ios, fill, tp.time_since_epoch())
or put_epoch(s, ios)
.
An iterator pointing immediately after the last character produced.
Referenced by boost::chrono::operator<<(), and boost::chrono::time_point_put< CharT, OutputIterator >::put().
|
inline |
|
inline |
i | an output stream iterator |
ios | a reference to a ios_base |
fill | the character used as filler |
tp | the time_point |
pattern | begin of the formatting pattern |
pat_end | end of the formatting pattern |
Stores the time_point pattern from the time_point_unit
facet in let say str
. Last as if
An iterator pointing immediately after the last character produced.
References boost::chrono::time_point_units< CharT >::get_pattern(), boost::chrono::time_point_units_default< CharT >::get_pattern(), boost::chrono::time_point_put< CharT, OutputIterator >::put(), and boost::str().
|
inline |
i | an output stream iterator |
ios | a reference to a ios_base |
fill | the character used as filler |
d | the duration As if facet.put(s, ios, fill, d) where facet is the duration_put<CharT> facet associated to the ios or a new instance of duration_put<CharT> . An iterator pointing immediately after the last character produced. |
References boost::chrono::duration_put< CharT, OutputIterator >::put().
Referenced by boost::chrono::time_point_put< CharT, OutputIterator >::put().
|
inline |
i | an output stream iterator |
ios | a reference to a ios_base As if string_type str = facet.template get_epoch<Clock>();
time_point_units<CharT> facet associated to the ios or a new instance of time_point_units_default<CharT> . s, iterator pointing immediately after the last character produced. |
References boost::multiprecision::backends::i.
|
inline |
References boost::filesystem::detail::copy(), boost::asio::s, and boost::str().
|
static |
Unique identifier for this type of facet.