-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathfstream.h
More file actions
45 lines (40 loc) · 1.14 KB
/
fstream.h
File metadata and controls
45 lines (40 loc) · 1.14 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _GHLIBCPP_FSTREAM
#define _GHLIBCPP_FSTREAM
#include "istream.h"
#include "ostream.h"
namespace std {
template <class CharT, class Traits>
class basic_fstream : public std::basic_iostream<CharT, Traits> {
public:
// constructors
basic_fstream();
explicit basic_fstream(const char *s);
basic_fstream(const basic_fstream &);
basic_fstream(basic_fstream &&);
// members
bool is_open() const;
void open(const string &s);
void close();
};
template <typename CharT, class Traits> class basic_ifstream {
public:
basic_ifstream();
basic_ifstream(const basic_ifstream &);
basic_ifstream(basic_ifstream &&);
basic_ifstream(const char *);
};
template <typename CharT, class Traits> class basic_ofstream {
public:
basic_ofstream();
basic_ofstream(const basic_ofstream &);
basic_ofstream(basic_ofstream &&);
basic_ofstream(const char *);
};
using fstream = basic_fstream<char>;
using wfstream = basic_fstream<wchar_t>;
using ifstream = basic_ifstream<char>;
using wifstream = basic_ifstream<wchar_t>;
using ofstream = basic_ofstream<char>;
using wofstream = basic_ofstream<wchar_t>;
} // namespace std
#endif // _GHLIBCPP_FSTREAM