ReFRACtor
|
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>
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... | |
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.
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.
|
inlinevirtual |
Definition at line 20 of file ifstream_cs.h.
|
protectedinherited |
Underlying ifstream.
Definition at line 66 of file filtering_fstream.h.
|
protectedinherited |
Filtering streambuf.
Definition at line 72 of file filtering_fstream.h.