2012-02-20 04:46:08 +04:00
|
|
|
#ifndef MERT_FILE_STREAM_H_
|
|
|
|
#define MERT_FILE_STREAM_H_
|
2011-11-12 06:44:39 +04:00
|
|
|
|
|
|
|
#include <fstream>
|
2012-03-10 14:04:43 +04:00
|
|
|
#include <iostream>
|
2011-11-12 06:44:39 +04:00
|
|
|
#include <streambuf>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class inputfilestream : public std::istream
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::streambuf *m_streambuf;
|
2012-03-10 12:12:34 +04:00
|
|
|
bool m_is_good;
|
2011-11-12 06:44:39 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit inputfilestream(const std::string &filePath);
|
2012-02-20 05:23:59 +04:00
|
|
|
virtual ~inputfilestream();
|
|
|
|
|
2013-05-29 21:16:15 +04:00
|
|
|
bool good() const {
|
|
|
|
return m_is_good;
|
|
|
|
}
|
2011-11-12 06:44:39 +04:00
|
|
|
void close();
|
|
|
|
};
|
|
|
|
|
2012-02-20 04:46:08 +04:00
|
|
|
#endif // MERT_FILE_STREAM_H_
|