blob: d24c227bef7981f23cc257d08af4d7c7e5505c25 [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
Howard Hinnant08e17472011-10-17 20:05:10 +000092#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000093#pragma GCC system_header
Howard Hinnant08e17472011-10-17 20:05:10 +000094#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000095
96_LIBCPP_BEGIN_NAMESPACE_STD
97
Howard Hinnant83eade62013-03-06 23:30:19 +000098class _LIBCPP_TYPE_VIS ios_base;
Howard Hinnant52c4eb22011-01-08 20:00:48 +000099
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000100template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits;
101template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000102
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000103template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000104 class _LIBCPP_TYPE_VIS_ONLY basic_ios;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000105
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000106template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000107 class _LIBCPP_TYPE_VIS_ONLY basic_streambuf;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000108template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000109 class _LIBCPP_TYPE_VIS_ONLY basic_istream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000110template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000111 class _LIBCPP_TYPE_VIS_ONLY basic_ostream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000112template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000113 class _LIBCPP_TYPE_VIS_ONLY basic_iostream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000114
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000115template <class _CharT, class _Traits = char_traits<_CharT>,
116 class _Allocator = allocator<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000117 class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000118template <class _CharT, class _Traits = char_traits<_CharT>,
119 class _Allocator = allocator<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000120 class _LIBCPP_TYPE_VIS_ONLY basic_istringstream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000121template <class _CharT, class _Traits = char_traits<_CharT>,
122 class _Allocator = allocator<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000123 class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000124template <class _CharT, class _Traits = char_traits<_CharT>,
125 class _Allocator = allocator<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000126 class _LIBCPP_TYPE_VIS_ONLY basic_stringstream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000127
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000128template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000129 class _LIBCPP_TYPE_VIS_ONLY basic_filebuf;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000130template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000131 class _LIBCPP_TYPE_VIS_ONLY basic_ifstream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000132template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000133 class _LIBCPP_TYPE_VIS_ONLY basic_ofstream;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000134template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000135 class _LIBCPP_TYPE_VIS_ONLY basic_fstream;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000136
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000137template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000138 class _LIBCPP_TYPE_VIS_ONLY istreambuf_iterator;
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000139template <class _CharT, class _Traits = char_traits<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000140 class _LIBCPP_TYPE_VIS_ONLY ostreambuf_iterator;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000141
142typedef basic_ios<char> ios;
143typedef basic_ios<wchar_t> wios;
144
145typedef basic_streambuf<char> streambuf;
146typedef basic_istream<char> istream;
147typedef basic_ostream<char> ostream;
148typedef basic_iostream<char> iostream;
149
150typedef basic_stringbuf<char> stringbuf;
151typedef basic_istringstream<char> istringstream;
152typedef basic_ostringstream<char> ostringstream;
153typedef basic_stringstream<char> stringstream;
154
155typedef basic_filebuf<char> filebuf;
156typedef basic_ifstream<char> ifstream;
157typedef basic_ofstream<char> ofstream;
158typedef basic_fstream<char> fstream;
159
160typedef basic_streambuf<wchar_t> wstreambuf;
161typedef basic_istream<wchar_t> wistream;
162typedef basic_ostream<wchar_t> wostream;
163typedef basic_iostream<wchar_t> wiostream;
164
165typedef basic_stringbuf<wchar_t> wstringbuf;
166typedef basic_istringstream<wchar_t> wistringstream;
167typedef basic_ostringstream<wchar_t> wostringstream;
168typedef basic_stringstream<wchar_t> wstringstream;
169
170typedef basic_filebuf<wchar_t> wfilebuf;
171typedef basic_ifstream<wchar_t> wifstream;
172typedef basic_ofstream<wchar_t> wofstream;
173typedef basic_fstream<wchar_t> wfstream;
174
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000175template <class _State> class _LIBCPP_TYPE_VIS_ONLY fpos;
Howard Hinnantadff4892010-05-24 17:49:41 +0000176typedef fpos<mbstate_t> streampos;
177typedef fpos<mbstate_t> wstreampos;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000178#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
Howard Hinnantadff4892010-05-24 17:49:41 +0000179typedef fpos<mbstate_t> u16streampos;
180typedef fpos<mbstate_t> u32streampos;
Howard Hinnant324bb032010-08-22 00:02:43 +0000181#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000182
183typedef long long streamoff; // for char_traits in <string>
184
185template <class _CharT, // for <stdexcept>
186 class _Traits = char_traits<_CharT>,
Howard Hinnantc0de2e42010-09-21 16:04:28 +0000187 class _Allocator = allocator<_CharT> >
Howard Hinnant0f678bd2013-08-12 18:38:34 +0000188 class _LIBCPP_TYPE_VIS_ONLY basic_string;
Howard Hinnantbc8d3f92010-05-11 19:42:16 +0000189typedef basic_string<char, char_traits<char>, allocator<char> > string;
190typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
191
192_LIBCPP_END_NAMESPACE_STD
193
194#endif // _LIBCPP_IOSFWD