|
| | duration_put (size_t refs=0) |
| | Construct a duration_put facet. More...
|
| |
| template<typename Rep , typename Period > |
| iter_type | put (iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d, const CharT *pattern, const CharT *pat_end) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put (duration_units< CharT > const &units_facet, iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d, const CharT *pattern, const CharT *pat_end) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put (iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put_value (iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put_value (iter_type s, std::ios_base &ios, char_type fill, duration< process_times< Rep >, Period > const &d) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put_unit (iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put_unit (duration_units< CharT > const &facet, iter_type s, std::ios_base &ios, char_type fill, duration< Rep, Period > const &d) const |
| |
| template<typename Rep , typename Period > |
| iter_type | put_unit (duration_units< CharT > const &facet, iter_type s, std::ios_base &ios, char_type fill, duration< process_times< Rep >, Period > const &d) const |
| |
| | ~duration_put () |
| | Destroy the facet More...
|
| |
template<class CharT, class OutputIterator = std::ostreambuf_iterator<CharT>>
class boost::chrono::duration_put< CharT, OutputIterator >
- Template Parameters
-
| ChatT | a character type |
| OutputIterator | a model of OutputIterator |
The duration_put facet provides facilities for formatted output of duration values. The member function of duration_put take a duration and format it into character string representation.
template<class CharT, class OutputIterator = std::ostreambuf_iterator<CharT>>
template<typename Rep , typename Period >
- Parameters
-
| s | an output stream iterator |
| ios | a reference to a ios_base |
| fill | the character used as filler |
| d | the duration |
| 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_value or put_unit; 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 'v' for the duration value or 'u' for the duration unit. . For each valid pattern sequence identified, calls put_value(s, ios, fill, d) or put_unit(s, ios, fill, d).
An iterator pointing immediately after the last character produced.
Referenced by boost::chrono::operator<<(), boost::chrono::duration_put< CharT, OutputIterator >::put(), boost::chrono::time_point_put< CharT, OutputIterator >::put_duration(), boost::chrono::duration_put< CharT, OutputIterator >::put_unit(), and boost::chrono::duration_put< CharT, OutputIterator >::put_value().