blob: 852d9e5f3e8b5e6b19a6f6fcaa6ef2a17aae019e [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001// -*- C++ -*-
2//===--------------------------- iosfwd -----------------------------------===//
3//
Howard Hinnantf5256e12010-05-11 21:36:01 +00004// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00005//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00006// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00008//
9//===----------------------------------------------------------------------===//
10
11#ifndef _LIBCPP_IOSFWD
12#define _LIBCPP_IOSFWD
13
14/*
15 iosfwd synopsis
16
17namespace std
18{
19
20template<class charT> struct char_traits;
21template<class T> class allocator;
22
Howard Hinnant0a111112011-05-13 21:52:40 +000023class ios_base;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000024template <class charT, class traits = char_traits<charT> > class basic_ios;
25
26template <class charT, class traits = char_traits<charT> > class basic_streambuf;
27template <class charT, class traits = char_traits<charT> > class basic_istream;
28template <class charT, class traits = char_traits<charT> > class basic_ostream;
29template <class charT, class traits = char_traits<charT> > class basic_iostream;
30
31template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
32 class basic_stringbuf;
33template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
34 class basic_istringstream;
35template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
36 class basic_ostringstream;
37template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
38 class basic_stringstream;
39
40template <class charT, class traits = char_traits<charT> > class basic_filebuf;
41template <class charT, class traits = char_traits<charT> > class basic_ifstream;
42template <class charT, class traits = char_traits<charT> > class basic_ofstream;
43template <class charT, class traits = char_traits<charT> > class basic_fstream;
44
45template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
46template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
47
48typedef basic_ios<char> ios;
49typedef basic_ios<wchar_t> wios;
50
51typedef basic_streambuf<char> streambuf;
52typedef basic_istream<char> istream;
53typedef basic_ostream<char> ostream;
54typedef basic_iostream<char> iostream;
55
56typedef basic_stringbuf<char> stringbuf;
57typedef basic_istringstream<char> istringstream;
58typedef basic_ostringstream<char> ostringstream;
59typedef basic_stringstream<char> stringstream;
60
61typedef basic_filebuf<char> filebuf;
62typedef basic_ifstream<char> ifstream;
63typedef basic_ofstream<char> ofstream;
64typedef basic_fstream<char> fstream;
65
66typedef basic_streambuf<wchar_t> wstreambuf;
67typedef basic_istream<wchar_t> wistream;
68typedef basic_ostream<wchar_t> wostream;
69typedef basic_iostream<wchar_t> wiostream;
70
71typedef basic_stringbuf<wchar_t> wstringbuf;
72typedef basic_istringstream<wchar_t> wistringstream;
73typedef basic_ostringstream<wchar_t> wostringstream;
74typedef basic_stringstream<wchar_t> wstringstream;
75
76typedef basic_filebuf<wchar_t> wfilebuf;
77typedef basic_ifstream<wchar_t> wifstream;
78typedef basic_ofstream<wchar_t> wofstream;
79typedef basic_fstream<wchar_t> wfstream;
80
81template <class state> class fpos;
82typedef fpos<char_traits<char>::state_type> streampos;
83typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
84
85} // std
86
87*/
88
89#include <__config>
Howard Hinnantadff4892010-05-24 17:49:41 +000090#include <wchar.h> // for mbstate_t
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000091
92#pragma GCC system_header
93
94_LIBCPP_BEGIN_NAMESPACE_STD
95
Howard Hinnant52c4eb22011-01-08 20:00:48 +000096class ios_base;
97
Howard Hinnant36cdf022010-09-10 16:42:26 +000098template<class _CharT> struct _LIBCPP_VISIBLE char_traits;
99template<class _Tp> class _LIBCPP_VISIBLE allocator;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000100
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000101template <class _CharT, class _Traits = char_traits<_CharT> >
102 class _LIBCPP_VISIBLE basic_ios;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000103
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000104template <class _CharT, class _Traits = char_traits<_CharT> >
105 class _LIBCPP_VISIBLE basic_streambuf;
106template <class _CharT, class _Traits = char_traits<_CharT> >
107 class _LIBCPP_VISIBLE basic_istream;
108template <class _CharT, class _Traits = char_traits<_CharT> >
109 class _LIBCPP_VISIBLE basic_ostream;
110template <class _CharT, class _Traits = char_traits<_CharT> >
111 class _LIBCPP_VISIBLE basic_iostream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000112
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000113template <class _CharT, class _Traits = char_traits<_CharT>,
114 class _Allocator = allocator<_CharT> >
115 class _LIBCPP_VISIBLE basic_stringbuf;
116template <class _CharT, class _Traits = char_traits<_CharT>,
117 class _Allocator = allocator<_CharT> >
118 class _LIBCPP_VISIBLE basic_istringstream;
119template <class _CharT, class _Traits = char_traits<_CharT>,
120 class _Allocator = allocator<_CharT> >
121 class _LIBCPP_VISIBLE basic_ostringstream;
122template <class _CharT, class _Traits = char_traits<_CharT>,
123 class _Allocator = allocator<_CharT> >
124 class _LIBCPP_VISIBLE basic_stringstream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000125
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000126template <class _CharT, class _Traits = char_traits<_CharT> >
127 class _LIBCPP_VISIBLE basic_filebuf;
128template <class _CharT, class _Traits = char_traits<_CharT> >
129 class _LIBCPP_VISIBLE basic_ifstream;
130template <class _CharT, class _Traits = char_traits<_CharT> >
131 class _LIBCPP_VISIBLE basic_ofstream;
132template <class _CharT, class _Traits = char_traits<_CharT> >
133 class _LIBCPP_VISIBLE basic_fstream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000134
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000135template <class _CharT, class _Traits = char_traits<_CharT> >
136 class _LIBCPP_VISIBLE istreambuf_iterator;
137template <class _CharT, class _Traits = char_traits<_CharT> >
138 class _LIBCPP_VISIBLE ostreambuf_iterator;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000139
140typedef basic_ios<char> ios;
141typedef basic_ios<wchar_t> wios;
142
143typedef basic_streambuf<char> streambuf;
144typedef basic_istream<char> istream;
145typedef basic_ostream<char> ostream;
146typedef basic_iostream<char> iostream;
147
148typedef basic_stringbuf<char> stringbuf;
149typedef basic_istringstream<char> istringstream;
150typedef basic_ostringstream<char> ostringstream;
151typedef basic_stringstream<char> stringstream;
152
153typedef basic_filebuf<char> filebuf;
154typedef basic_ifstream<char> ifstream;
155typedef basic_ofstream<char> ofstream;
156typedef basic_fstream<char> fstream;
157
158typedef basic_streambuf<wchar_t> wstreambuf;
159typedef basic_istream<wchar_t> wistream;
160typedef basic_ostream<wchar_t> wostream;
161typedef basic_iostream<wchar_t> wiostream;
162
163typedef basic_stringbuf<wchar_t> wstringbuf;
164typedef basic_istringstream<wchar_t> wistringstream;
165typedef basic_ostringstream<wchar_t> wostringstream;
166typedef basic_stringstream<wchar_t> wstringstream;
167
168typedef basic_filebuf<wchar_t> wfilebuf;
169typedef basic_ifstream<wchar_t> wifstream;
170typedef basic_ofstream<wchar_t> wofstream;
171typedef basic_fstream<wchar_t> wfstream;
172
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000173template <class _State> class _LIBCPP_VISIBLE fpos;
Howard Hinnantadff4892010-05-24 17:49:41 +0000174typedef fpos<mbstate_t> streampos;
175typedef fpos<mbstate_t> wstreampos;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000176#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
Howard Hinnantadff4892010-05-24 17:49:41 +0000177typedef fpos<mbstate_t> u16streampos;
178typedef fpos<mbstate_t> u32streampos;
Howard Hinnant324bb032010-08-22 00:02:43 +0000179#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000180
181typedef long long streamoff; // for char_traits in <string>
182
183template <class _CharT, // for <stdexcept>
184 class _Traits = char_traits<_CharT>,
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000185 class _Allocator = allocator<_CharT> >
186 class _LIBCPP_VISIBLE basic_string;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000187typedef basic_string<char, char_traits<char>, allocator<char> > string;
188typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
189
190_LIBCPP_END_NAMESPACE_STD
191
192#endif // _LIBCPP_IOSFWD