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 */
The actual work of input and output (for std::string).This class associates either or both of its inp...
Definition: iosfwd:95
Controlling output.This is the base class for all output streams. It provides text formatting of all ...
Definition: iosfwd:88
basic_iostream< wchar_t > wiostream
Base class for wchar_t mixed input and output streams.
Definition: iosfwd:181
basic_streambuf< char > streambuf
Base class for char buffers.
Definition: iosfwd:132
Controlling input for files.This class supports reading from named files, using the inherited functio...
Definition: fstream:420
basic_ios< wchar_t > wios
Base class for wchar_t streams.
Definition: iosfwd:169
basic_streambuf< wchar_t > wstreambuf
Base class for wchar_t buffers.
Definition: iosfwd:172
basic_stringbuf< char > stringbuf
Class for char memory buffers.
Definition: iosfwd:144
basic_stringbuf< wchar_t > wstringbuf
Class for wchar_t memory buffers.
Definition: iosfwd:184
basic_ofstream< char > ofstream
Class for char output file streams.
Definition: iosfwd:162
basic_fstream< char > fstream
Class for char mixed input and output file streams.
Definition: iosfwd:165
basic_stringstream< wchar_t > wstringstream
Class for wchar_t mixed input and output memory streams.
Definition: iosfwd:193
Controlling input.This is the base class for all input streams. It provides text formatting of all bu...
Definition: iosfwd:85
Provides input iterator semantics for streambufs.
Definition: iosfwd:122
Controlling output for files.This class supports reading from named files, using the inherited functi...
Definition: fstream:588
basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: iosfwd:150
basic_fstream< wchar_t > wfstream
Class for wchar_t mixed input and output file streams.
Definition: iosfwd:205
basic_filebuf< char > filebuf
Class for char file buffers.
Definition: iosfwd:156
basic_ostringstream< wchar_t > wostringstream
Class for wchar_t output memory streams.
Definition: iosfwd:190
basic_ios< char > ios
Base class for char streams.
Definition: iosfwd:125
basic_istream< wchar_t > wistream
Base class for wchar_t input streams.
Definition: iosfwd:175
basic_istringstream< wchar_t > wistringstream
Class for wchar_t input memory streams.
Definition: iosfwd:187
Controlling input for std::string.This class supports reading from objects of type std::basic_string...
Definition: iosfwd:99
basic_ofstream< wchar_t > wofstream
Class for wchar_t output file streams.
Definition: iosfwd:202
Merging istream and ostream capabilities.This class multiply inherits from the input and output strea...
Definition: iosfwd:91
Provides output iterator semantics for streambufs.
Definition: iosfwd:125
The actual work of input and output (for files).This class associates both its input and output seque...
Definition: fstream:69
basic_filebuf< wchar_t > wfilebuf
Class for wchar_t file buffers.
Definition: iosfwd:196
Controlling input and output for std::string.This class supports reading from and writing to objects ...
Definition: iosfwd:107
basic_ifstream< wchar_t > wifstream
Class for wchar_t input file streams.
Definition: iosfwd:199
The actual work of input and output (interface).This is a base class. Derived stream buffers each con...
Definition: iosfwd:82
Controlling output for std::string.This class supports writing to objects of type std::basic_string...
Definition: iosfwd:103
basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: iosfwd:147
Virtual base class for all stream classes.Most of the member functions called dispatched on stream ob...
Definition: iosfwd:79
basic_iostream< char > iostream
Base class for char mixed input and output streams.
Definition: iosfwd:141
basic_stringstream< char > stringstream
Class for char mixed input and output memory streams.
Definition: iosfwd:153
basic_istream< char > istream
Base class for char input streams.
Definition: iosfwd:135
Controlling input and output for files.This class supports reading from and writing to named files...
Definition: fstream:761
basic_ostream< wchar_t > wostream
Base class for wchar_t output streams.
Definition: iosfwd:178
basic_ostream< char > ostream
Base class for char output streams.
Definition: iosfwd:138
basic_ifstream< char > ifstream
Class for char input file streams.
Definition: iosfwd:159