Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
This class gets a stream as argument during construction and when it is deleted it sets the position of the stream back to where it was during the constructor call. More...
#include <AsciiReaderHelper.h>
Public Member Functions | |
StreamRewinder (std::istream &stream) | |
~StreamRewinder () | |
Private Attributes | |
std::istream & | m_stream |
std::ios::iostate | m_state |
int | m_position |
This class gets a stream as argument during construction and when it is deleted it sets the position of the stream back to where it was during the constructor call.
Definition at line 47 of file AsciiReaderHelper.h.
|
inlineexplicit |
Definition at line 49 of file AsciiReaderHelper.h.
|
inline |
Definition at line 51 of file AsciiReaderHelper.h.
References std::istream::clear(), m_position, m_state, m_stream, std::istream::seekg(), and std::istream::setstate().
|
private |
Definition at line 60 of file AsciiReaderHelper.h.
Referenced by ~StreamRewinder().
|
private |
Definition at line 59 of file AsciiReaderHelper.h.
Referenced by ~StreamRewinder().
|
private |
Definition at line 58 of file AsciiReaderHelper.h.
Referenced by ~StreamRewinder().