Panzer Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
panzer::basic_ios_all_saver< Ch, Tr > Class Template Reference

RAII helper that saves a stream's formatting state on construction and restores it on destruction (or explicit restore()). More...

#include <Panzer_IosAllSaver.hpp>

Public Types

typedef ::std::basic_ios< Ch, Tr > state_type
 

Public Member Functions

 basic_ios_all_saver (state_type &s)
 Captures the current formatting state of the given stream.
 
 ~basic_ios_all_saver ()
 Restores the stream's formatting state as captured at construction.
 
void restore ()
 Restores the stream's formatting state as captured at construction.
 

Private Member Functions

basic_ios_all_saveroperator= (const basic_ios_all_saver &)
 

Private Attributes

state_types_save_
 
state_type::fmtflags const a1_save_
 
::std::streamsize const a2_save_
 
::std::streamsize const a3_save_
 
state_type::iostate const a4_save_
 
state_type::iostate const a5_save_
 
::std::basic_ostream< Ch, Tr > *const a6_save_
 
::std::basic_streambuf< Ch, Tr > *const a7_save_
 
state_type::char_type const a8_save_
 

Detailed Description

template<typename Ch, class Tr>
class panzer::basic_ios_all_saver< Ch, Tr >

RAII helper that saves a stream's formatting state on construction and restores it on destruction (or explicit restore()).

Captures the flags, precision, width, error state, exception mask, tied stream, stream buffer, and fill character of the given std::basic_ios, and restores all of them when the saver is destroyed (or restore() is called explicitly).

Definition at line 52 of file Panzer_IosAllSaver.hpp.

Member Typedef Documentation

◆ state_type

template<typename Ch , class Tr >
typedef ::std::basic_ios<Ch, Tr> panzer::basic_ios_all_saver< Ch, Tr >::state_type

Definition at line 55 of file Panzer_IosAllSaver.hpp.

Constructor & Destructor Documentation

◆ basic_ios_all_saver()

template<typename Ch , class Tr >
panzer::basic_ios_all_saver< Ch, Tr >::basic_ios_all_saver ( state_type s)
inlineexplicit

Captures the current formatting state of the given stream.

Definition at line 58 of file Panzer_IosAllSaver.hpp.

◆ ~basic_ios_all_saver()

template<typename Ch , class Tr >
panzer::basic_ios_all_saver< Ch, Tr >::~basic_ios_all_saver ( )
inline

Restores the stream's formatting state as captured at construction.

Definition at line 66 of file Panzer_IosAllSaver.hpp.

Member Function Documentation

◆ restore()

template<typename Ch , class Tr >
void panzer::basic_ios_all_saver< Ch, Tr >::restore ( )
inline

Restores the stream's formatting state as captured at construction.

Definition at line 70 of file Panzer_IosAllSaver.hpp.

◆ operator=()

template<typename Ch , class Tr >
basic_ios_all_saver & panzer::basic_ios_all_saver< Ch, Tr >::operator= ( const basic_ios_all_saver< Ch, Tr > &  )
private

Member Data Documentation

◆ s_save_

template<typename Ch , class Tr >
state_type& panzer::basic_ios_all_saver< Ch, Tr >::s_save_
private

Definition at line 83 of file Panzer_IosAllSaver.hpp.

◆ a1_save_

template<typename Ch , class Tr >
state_type::fmtflags const panzer::basic_ios_all_saver< Ch, Tr >::a1_save_
private

Definition at line 84 of file Panzer_IosAllSaver.hpp.

◆ a2_save_

template<typename Ch , class Tr >
::std::streamsize const panzer::basic_ios_all_saver< Ch, Tr >::a2_save_
private

Definition at line 85 of file Panzer_IosAllSaver.hpp.

◆ a3_save_

template<typename Ch , class Tr >
::std::streamsize const panzer::basic_ios_all_saver< Ch, Tr >::a3_save_
private

Definition at line 86 of file Panzer_IosAllSaver.hpp.

◆ a4_save_

template<typename Ch , class Tr >
state_type::iostate const panzer::basic_ios_all_saver< Ch, Tr >::a4_save_
private

Definition at line 87 of file Panzer_IosAllSaver.hpp.

◆ a5_save_

template<typename Ch , class Tr >
state_type::iostate const panzer::basic_ios_all_saver< Ch, Tr >::a5_save_
private

Definition at line 88 of file Panzer_IosAllSaver.hpp.

◆ a6_save_

template<typename Ch , class Tr >
::std::basic_ostream<Ch, Tr>* const panzer::basic_ios_all_saver< Ch, Tr >::a6_save_
private

Definition at line 89 of file Panzer_IosAllSaver.hpp.

◆ a7_save_

template<typename Ch , class Tr >
::std::basic_streambuf<Ch, Tr>* const panzer::basic_ios_all_saver< Ch, Tr >::a7_save_
private

Definition at line 90 of file Panzer_IosAllSaver.hpp.

◆ a8_save_

template<typename Ch , class Tr >
state_type::char_type const panzer::basic_ios_all_saver< Ch, Tr >::a8_save_
private

Definition at line 91 of file Panzer_IosAllSaver.hpp.


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