Alexandria 2.32.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Euclid::Table::StreamRewinder Class Reference

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>

Collaboration diagram for Euclid::Table::StreamRewinder:

Public Member Functions

 StreamRewinder (std::istream &stream)
 ~StreamRewinder ()

Private Attributes

std::istreamm_stream
std::ios::iostate m_state
int m_position

Detailed Description

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.

Constructor & Destructor Documentation

◆ StreamRewinder()

Euclid::Table::StreamRewinder::StreamRewinder ( std::istream & stream)
inlineexplicit

Definition at line 49 of file AsciiReaderHelper.h.

References m_position, m_state, and m_stream.

◆ ~StreamRewinder()

Euclid::Table::StreamRewinder::~StreamRewinder ( )
inline

Definition at line 51 of file AsciiReaderHelper.h.

References m_position, m_state, and m_stream.

Member Data Documentation

◆ m_position

int Euclid::Table::StreamRewinder::m_position
private

Definition at line 60 of file AsciiReaderHelper.h.

Referenced by StreamRewinder(), and ~StreamRewinder().

◆ m_state

std::ios::iostate Euclid::Table::StreamRewinder::m_state
private

Definition at line 59 of file AsciiReaderHelper.h.

Referenced by StreamRewinder(), and ~StreamRewinder().

◆ m_stream

std::istream& Euclid::Table::StreamRewinder::m_stream
private

Definition at line 58 of file AsciiReaderHelper.h.

Referenced by StreamRewinder(), and ~StreamRewinder().


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