List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
utl::ReadStream Class Reference

#include <ReadStream.h>

Public Member Functions

void Clear ()
 
template<typename T >
bool Get (T &t)
 
template<typename T >
bool GetLine (T &t, const bool trim=false)
 
template<typename T >
void GetLines (std::vector< T > &v, const bool filterComments=true, const bool trim=false)
 
std::istream & GetStream () const
 
 operator bool () const
 
 ReadStream ()=default
 
 ReadStream (std::istream &is)
 
void SetStream (std::istream &is)
 

Private Member Functions

ReadStreamoperator= (const ReadStream &)
 
 ReadStream (const ReadStream &)
 

Static Private Member Functions

static std::string FilterComments (const std::string &line)
 

Private Attributes

std::istream * fStream = nullptr
 

Detailed Description

Definition at line 68 of file ReadStream.h.

Constructor & Destructor Documentation

utl::ReadStream::ReadStream ( )
default
utl::ReadStream::ReadStream ( std::istream &  is)
inline

Definition at line 73 of file ReadStream.h.

utl::ReadStream::ReadStream ( const ReadStream )
private

Member Function Documentation

void utl::ReadStream::Clear ( )
inline

Definition at line 80 of file ReadStream.h.

References fStream.

string utl::ReadStream::FilterComments ( const std::string &  line)
staticprivate

Definition at line 10 of file ReadStream.cc.

References RdGeoCeLDFFitter::c, and ERROR.

Referenced by GetLines().

template<typename T >
bool utl::ReadStream::Get ( T &  t)
inline

Definition at line 82 of file ReadStream.h.

References utl::ThrowOnZeroDereference::Examine(), fStream, and GetStream().

template<typename T >
bool utl::ReadStream::GetLine ( T &  t,
const bool  trim = false 
)
inline

Definition at line 87 of file ReadStream.h.

References utl::ThrowOnZeroDereference::Examine(), and fStream.

template<typename T >
void utl::ReadStream::GetLines ( std::vector< T > &  v,
const bool  filterComments = true,
const bool  trim = false 
)
inline
std::istream& utl::ReadStream::GetStream ( ) const
inline

Definition at line 77 of file ReadStream.h.

References utl::ThrowOnZeroDereference::Examine(), and fStream.

Referenced by Get().

utl::ReadStream::operator bool ( ) const
inlineexplicit

Definition at line 115 of file ReadStream.h.

References fStream.

ReadStream& utl::ReadStream::operator= ( const ReadStream )
private
void utl::ReadStream::SetStream ( std::istream &  is)
inline

Definition at line 75 of file ReadStream.h.

References fStream, and is().

Member Data Documentation

std::istream* utl::ReadStream::fStream = nullptr
private

Definition at line 123 of file ReadStream.h.

Referenced by Clear(), Get(), GetLine(), GetLines(), GetStream(), operator bool(), and SetStream().


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

, generated on Tue Sep 26 2023.