libstdc++
iosfwd
Go to the documentation of this file.
1 // Forwarding declarations -*- C++ -*-
2 
3 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
4 // 2006, 2007, 2009, 2010
5 // Free Software Foundation, Inc.
6 //
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
11 // any later version.
12 
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 
18 // Under Section 7 of GPL version 3, you are granted additional
19 // permissions described in the GCC Runtime Library Exception, version
20 // 3.1, as published by the Free Software Foundation.
21 
22 // You should have received a copy of the GNU General Public License and
23 // a copy of the GCC Runtime Library Exception along with this program;
24 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 // <http://www.gnu.org/licenses/>.
26 
27 /** @file include/iosfwd
28  * This is a Standard C++ Library header.
29  */
30 
31 //
32 // ISO C++ 14882: 27.2 Forward declarations
33 //
34 
35 #ifndef _GLIBCXX_IOSFWD
36 #define _GLIBCXX_IOSFWD 1
37 
38 #pragma GCC system_header
39 
40 #include <bits/c++config.h>
41 #include <bits/stringfwd.h> // For string forward declarations.
42 #include <bits/postypes.h>
43 
44 namespace std _GLIBCXX_VISIBILITY(default)
45 {
46 _GLIBCXX_BEGIN_NAMESPACE_VERSION
47 
48  /**
49  * @defgroup io I/O
50  *
51  * Nearly all of the I/O classes are parameterized on the type of
52  * characters they read and write. (The major exception is ios_base at
53  * the top of the hierarchy.) This is a change from pre-Standard
54  * streams, which were not templates.
55  *
56  * For ease of use and compatibility, all of the basic_* I/O-related
57  * classes are given typedef names for both of the builtin character
58  * widths (wide and narrow). The typedefs are the same as the
59  * pre-Standard names, for example:
60  *
61  * @code
62  * typedef basic_ifstream<char> ifstream;
63  * @endcode
64  *
65  * Because properly forward-declaring these classes can be difficult, you
66  * should not do it yourself. Instead, include the &lt;iosfwd&gt;
67  * header, which contains only declarations of all the I/O classes as
68  * well as the typedefs. Trying to forward-declare the typedefs
69  * themselves (e.g., <code>class ostream;</code>) is not valid ISO C++.
70  *
71  * For more specific declarations, see
72  * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
73  *
74  * @{
75  */
76  class ios_base;
77 
78  template<typename _CharT, typename _Traits = char_traits<_CharT> >
79  class basic_ios;
80 
81  template<typename _CharT, typename _Traits = char_traits<_CharT> >
83 
84  template<typename _CharT, typename _Traits = char_traits<_CharT> >
86 
87  template<typename _CharT, typename _Traits = char_traits<_CharT> >
89 
90  template<typename _CharT, typename _Traits = char_traits<_CharT> >
92 
93  template<typename _CharT, typename _Traits = char_traits<_CharT>,
94  typename _Alloc = allocator<_CharT> >
96 
97  template<typename _CharT, typename _Traits = char_traits<_CharT>,
98  typename _Alloc = allocator<_CharT> >
100 
101  template<typename _CharT, typename _Traits = char_traits<_CharT>,
102  typename _Alloc = allocator<_CharT> >
104 
105  template<typename _CharT, typename _Traits = char_traits<_CharT>,
106  typename _Alloc = allocator<_CharT> >
108 
109  template<typename _CharT, typename _Traits = char_traits<_CharT> >
110  class basic_filebuf;
111 
112  template<typename _CharT, typename _Traits = char_traits<_CharT> >
113  class basic_ifstream;
114 
115  template<typename _CharT, typename _Traits = char_traits<_CharT> >
116  class basic_ofstream;
117 
118  template<typename _CharT, typename _Traits = char_traits<_CharT> >
119  class basic_fstream;
120 
121  template<typename _CharT, typename _Traits = char_traits<_CharT> >
123 
124  template<typename _CharT, typename _Traits = char_traits<_CharT> >
126 
127 
128  /// Base class for @c char streams.
129  typedef basic_ios<char> ios;
130 
131  /// Base class for @c char buffers.
133 
134  /// Base class for @c char input streams.
136 
137  /// Base class for @c char output streams.
139 
140  /// Base class for @c char mixed input and output streams.
142 
143  /// Class for @c char memory buffers.
145 
146  /// Class for @c char input memory streams.
148 
149  /// Class for @c char output memory streams.
151 
152  /// Class for @c char mixed input and output memory streams.
154 
155  /// Class for @c char file buffers.
157 
158  /// Class for @c char input file streams.
160 
161  /// Class for @c char output file streams.
163 
164  /// Class for @c char mixed input and output file streams.
166 
167 #ifdef _GLIBCXX_USE_WCHAR_T
168  /// Base class for @c wchar_t streams.
170 
171  /// Base class for @c wchar_t buffers.
173 
174  /// Base class for @c wchar_t input streams.
176 
177  /// Base class for @c wchar_t output streams.
179 
180  /// Base class for @c wchar_t mixed input and output streams.
182 
183  /// Class for @c wchar_t memory buffers.
185 
186  /// Class for @c wchar_t input memory streams.
188 
189  /// Class for @c wchar_t output memory streams.
191 
192  /// Class for @c wchar_t mixed input and output memory streams.
194 
195  /// Class for @c wchar_t file buffers.
197 
198  /// Class for @c wchar_t input file streams.
200 
201  /// Class for @c wchar_t output file streams.
203 
204  /// Class for @c wchar_t mixed input and output file streams.
206 #endif
207  /** @} */
208 
209 _GLIBCXX_END_NAMESPACE_VERSION
210 } // namespace
211 
212 #endif /* _GLIBCXX_IOSFWD */