Alexandria 2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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:
Collaboration graph
[legend]

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.

◆ ~StreamRewinder()

Euclid::Table::StreamRewinder::~StreamRewinder ( )
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().

Here is the call graph for this function:

Member Data Documentation

◆ m_position

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

Definition at line 60 of file AsciiReaderHelper.h.

Referenced by ~StreamRewinder().

◆ m_state

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

Definition at line 59 of file AsciiReaderHelper.h.

Referenced by ~StreamRewinder().

◆ m_stream

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

Definition at line 58 of file AsciiReaderHelper.h.

Referenced by ~StreamRewinder().


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