ReFRACtor
FullPhysics::IfstreamCs Class Reference

It can be convenient to allow comments in a text data file that are ignored by the program reading it. More...

#include <ifstream_cs.h>

+ Inheritance diagram for FullPhysics::IfstreamCs:
+ Collaboration diagram for FullPhysics::IfstreamCs:

Public Member Functions

 IfstreamCs (const std::string &Fname, const std::string &Comment_start="#")
 Open file to read, decompressing if necessary and filtering comments. More...
 
virtual ~IfstreamCs ()
 

Protected Attributes

std::ifstream f
 Underlying ifstream. More...
 
boost::iostreams::filtering_istreambuf sb
 Filtering streambuf. More...
 

Detailed Description

It can be convenient to allow comments in a text data file that are ignored by the program reading it.

This class supports that, by reading files as a normal ifstream, except comment beginning with "#" (or another specified character) are stripped out to the end of the line.

We also handle automatic decompression. If the file ends with ".gz", then we gunzip the file.

Definition at line 17 of file ifstream_cs.h.

Constructor & Destructor Documentation

◆ IfstreamCs()

IfstreamCs::IfstreamCs ( const std::string &  Fname,
const std::string &  Comment_char = "#" 
)

Open file to read, decompressing if necessary and filtering comments.

Definition at line 12 of file ifstream_cs.cc.

◆ ~IfstreamCs()

virtual FullPhysics::IfstreamCs::~IfstreamCs ( )
inlinevirtual

Definition at line 20 of file ifstream_cs.h.

Member Data Documentation

◆ f

std::ifstream FullPhysics::FilteringIstream::f
protectedinherited

Underlying ifstream.

Definition at line 66 of file filtering_fstream.h.

◆ sb

boost::iostreams::filtering_istreambuf FullPhysics::FilteringIstream::sb
protectedinherited

Filtering streambuf.

Definition at line 72 of file filtering_fstream.h.


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

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12