InputContext which serves the content of a plain file.
More...
#include <FileHandler.h>
|
| FileContext (const std::string &filename, bool compressed) |
| Open the given filename.
|
|
virtual int | readXmlData (char *buffer, int buffsize) override |
| Return a block of the data.
|
|
virtual | ~FileContext () |
| Close the file.
|
|
|
boost::iostreams::filtering_istream | m_stream |
| stream to read data from
|
|
InputContext which serves the content of a plain file.
Definition at line 23 of file FileHandler.h.
◆ FileContext()
FileContext |
( |
const std::string & |
filename, |
|
|
bool |
compressed |
|
) |
| |
Open the given filename.
- Parameters
-
filename | absolute filename name of the file |
compressed | if true, decompress the file on the fly |
Definition at line 28 of file FileHandler.cc.
29 {
30 B2DEBUG(100, "Opening " << filename << (compressed ? " (gzip)" : ""));
31 if (compressed)
m_stream.push(io::gzip_decompressor());
32 m_stream.push(io::file_source(filename));
33 }
boost::iostreams::filtering_istream m_stream
stream to read data from
◆ ~FileContext()
◆ readXmlData()
virtual int readXmlData |
( |
char * |
buffer, |
|
|
int |
buffsize |
|
) |
| |
|
inlineoverridevirtual |
◆ m_stream
boost::iostreams::filtering_istream m_stream |
|
protected |
The documentation for this class was generated from the following files: