Celeritas 0.7.0-dev.245+develop.a7be925e
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::ScopedStreamFormat Class Reference

Save a stream's state and restore on destruction. More...

#include <ScopedStreamFormat.hh>

Public Member Functions

 ScopedStreamFormat (std::ios *s)
 Construct with defaults.
 
 ~ScopedStreamFormat ()
 Restore formats on destruction.
 
 ScopedStreamFormat (ScopedStreamFormat const &)=delete
 
ScopedStreamFormatoperator= (ScopedStreamFormat const &)=delete
 
 ScopedStreamFormat (ScopedStreamFormat &&)=delete
 
ScopedStreamFormatoperator= (ScopedStreamFormat &&)=delete
 

Detailed Description

Save a stream's state and restore on destruction.

Example:

{
ScopedStreamFormat save_fmt(&std::cout);
std::cout << setprecision(16) << 1.0;
}
Save a stream's state and restore on destruction.
Definition ScopedStreamFormat.hh:28

Constructor & Destructor Documentation

◆ ScopedStreamFormat() [1/2]

celeritas::ScopedStreamFormat::ScopedStreamFormat ( ScopedStreamFormat const )
delete

Prevent copying and moving for RAII class

◆ ScopedStreamFormat() [2/2]

celeritas::ScopedStreamFormat::ScopedStreamFormat ( ScopedStreamFormat &&  )
delete

Prevent copying and moving for RAII class

Member Function Documentation

◆ operator=() [1/2]

ScopedStreamFormat & celeritas::ScopedStreamFormat::operator= ( ScopedStreamFormat &&  )
delete

Prevent copying and moving for RAII class

◆ operator=() [2/2]

ScopedStreamFormat & celeritas::ScopedStreamFormat::operator= ( ScopedStreamFormat const )
delete

Prevent copying and moving for RAII class


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