Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FileStream.h « mert - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8cbf4f591a1a76fb4752903aa00c2ce7c04a6851 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef MERT_FILE_STREAM_H_
#define MERT_FILE_STREAM_H_

#include <fstream>
#include <iostream>
#include <streambuf>
#include <string>

class inputfilestream : public std::istream
{
protected:
  std::streambuf *m_streambuf;
  bool m_is_good;

public:
  explicit inputfilestream(const std::string &filePath);
  virtual ~inputfilestream();

  bool good() const {
    return m_is_good;
  }
  void close();
};

#endif // MERT_FILE_STREAM_H_