OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::RestoreOutputStreamState Class Reference

#include <RestoreOutputStreamState.h>

Collaboration diagram for OpenDDS::DCPS::RestoreOutputStreamState:
Collaboration graph
[legend]

Public Member Functions

 RestoreOutputStreamState (std::ostream &stream)
 
 ~RestoreOutputStreamState ()
 

Private Attributes

std::ostreamstream_
 
std::ios saved_
 

Detailed Description

Save and automatically restore various formatting properties of a std::ostream. This should be used in custom operator<< overload functions when changing these properties.

Definition at line 24 of file RestoreOutputStreamState.h.

Constructor & Destructor Documentation

◆ RestoreOutputStreamState()

OpenDDS::DCPS::RestoreOutputStreamState::RestoreOutputStreamState ( std::ostream stream)
inlineexplicit

Definition at line 26 of file RestoreOutputStreamState.h.

References saved_.

27  : stream_(stream)
28  , saved_(0)
29  {
30  saved_.copyfmt(stream);
31  }

◆ ~RestoreOutputStreamState()

OpenDDS::DCPS::RestoreOutputStreamState::~RestoreOutputStreamState ( )
inline

Definition at line 33 of file RestoreOutputStreamState.h.

References saved_, and stream_.

Member Data Documentation

◆ saved_

std::ios OpenDDS::DCPS::RestoreOutputStreamState::saved_
private

◆ stream_

std::ostream& OpenDDS::DCPS::RestoreOutputStreamState::stream_
private

Definition at line 39 of file RestoreOutputStreamState.h.

Referenced by ~RestoreOutputStreamState().


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