Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::chrono::time_fmt_io_saver< CharT, Traits > Struct Template Reference

time_fmt_io_saver i/o saver. More...

#include <time_point_io.hpp>

Public Types

typedef std::basic_ostream
< CharT, Traits > 
state_type
 the type of the state to restore More...
 
typedef std::basic_string
< CharT, Traits > 
aspect_type
 the type of aspect to save More...
 

Public Member Functions

 time_fmt_io_saver (state_type &s)
 Explicit construction from an i/o stream. More...
 
 time_fmt_io_saver (state_type &s, aspect_type new_value)
 Construction from an i/o stream and a time format to restore. More...
 
 ~time_fmt_io_saver ()
 Destructor. More...
 
void restore ()
 Restores the i/o stream with the time format to be restored. More...
 

Detailed Description

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
struct boost::chrono::time_fmt_io_saver< CharT, Traits >

time_fmt_io_saver i/o saver.

See Boost.IO i/o state savers for a motivating compression.

Member Typedef Documentation

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
typedef std::basic_string<CharT, Traits> boost::chrono::time_fmt_io_saver< CharT, Traits >::aspect_type

the type of aspect to save

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
typedef std::basic_ostream<CharT, Traits> boost::chrono::time_fmt_io_saver< CharT, Traits >::state_type

the type of the state to restore

Constructor & Destructor Documentation

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
boost::chrono::time_fmt_io_saver< CharT, Traits >::time_fmt_io_saver ( state_type s)
inlineexplicit

Explicit construction from an i/o stream.

Store a reference to the i/o stream and the value of the associated time format .

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
boost::chrono::time_fmt_io_saver< CharT, Traits >::time_fmt_io_saver ( state_type s,
aspect_type  new_value 
)
inline

Construction from an i/o stream and a time format to restore.

Stores a reference to the i/o stream and the value new_value to restore given as parameter.

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
boost::chrono::time_fmt_io_saver< CharT, Traits >::~time_fmt_io_saver ( )
inline

Destructor.

Restores the i/o stream with the format to be restored.

References boost::chrono::time_fmt_io_saver< CharT, Traits >::restore().

Member Function Documentation

template<typename CharT = char, typename Traits = std::char_traits<CharT>>
void boost::chrono::time_fmt_io_saver< CharT, Traits >::restore ( )
inline

Restores the i/o stream with the time format to be restored.

References boost::chrono::set_time_fmt().

Referenced by boost::chrono::time_fmt_io_saver< CharT, Traits >::~time_fmt_io_saver().


The documentation for this struct was generated from the following file: