libstdc++
|
00001 // <iosfwd> Forward declarations -*- C++ -*- 00002 00003 // Copyright (C) 1997-2013 Free Software Foundation, Inc. 00004 // 00005 // This file is part of the GNU ISO C++ Library. This library is free 00006 // software; you can redistribute it and/or modify it under the 00007 // terms of the GNU General Public License as published by the 00008 // Free Software Foundation; either version 3, or (at your option) 00009 // any later version. 00010 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 00016 // Under Section 7 of GPL version 3, you are granted additional 00017 // permissions described in the GCC Runtime Library Exception, version 00018 // 3.1, as published by the Free Software Foundation. 00019 00020 // You should have received a copy of the GNU General Public License and 00021 // a copy of the GCC Runtime Library Exception along with this program; 00022 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00023 // <http://www.gnu.org/licenses/>. 00024 00025 /** @file include/iosfwd 00026 * This is a Standard C++ Library header. 00027 */ 00028 00029 // 00030 // ISO C++ 14882: 27.2 Forward declarations 00031 // 00032 00033 #ifndef _GLIBCXX_IOSFWD 00034 #define _GLIBCXX_IOSFWD 1 00035 00036 #pragma GCC system_header 00037 00038 #include <bits/c++config.h> 00039 #include <bits/stringfwd.h> // For string forward declarations. 00040 #include <bits/postypes.h> 00041 00042 namespace std _GLIBCXX_VISIBILITY(default) 00043 { 00044 _GLIBCXX_BEGIN_NAMESPACE_VERSION 00045 00046 /** 00047 * @defgroup io I/O 00048 * 00049 * Nearly all of the I/O classes are parameterized on the type of 00050 * characters they read and write. (The major exception is ios_base at 00051 * the top of the hierarchy.) This is a change from pre-Standard 00052 * streams, which were not templates. 00053 * 00054 * For ease of use and compatibility, all of the basic_* I/O-related 00055 * classes are given typedef names for both of the builtin character 00056 * widths (wide and narrow). The typedefs are the same as the 00057 * pre-Standard names, for example: 00058 * 00059 * @code 00060 * typedef basic_ifstream<char> ifstream; 00061 * @endcode 00062 * 00063 * Because properly forward-declaring these classes can be difficult, you 00064 * should not do it yourself. Instead, include the <iosfwd> 00065 * header, which contains only declarations of all the I/O classes as 00066 * well as the typedefs. Trying to forward-declare the typedefs 00067 * themselves (e.g., <code>class ostream;</code>) is not valid ISO C++. 00068 * 00069 * For more specific declarations, see 00070 * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html 00071 * 00072 * @{ 00073 */ 00074 class ios_base; 00075 00076 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00077 class basic_ios; 00078 00079 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00080 class basic_streambuf; 00081 00082 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00083 class basic_istream; 00084 00085 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00086 class basic_ostream; 00087 00088 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00089 class basic_iostream; 00090 00091 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00092 typename _Alloc = allocator<_CharT> > 00093 class basic_stringbuf; 00094 00095 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00096 typename _Alloc = allocator<_CharT> > 00097 class basic_istringstream; 00098 00099 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00100 typename _Alloc = allocator<_CharT> > 00101 class basic_ostringstream; 00102 00103 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00104 typename _Alloc = allocator<_CharT> > 00105 class basic_stringstream; 00106 00107 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00108 class basic_filebuf; 00109 00110 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00111 class basic_ifstream; 00112 00113 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00114 class basic_ofstream; 00115 00116 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00117 class basic_fstream; 00118 00119 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00120 class istreambuf_iterator; 00121 00122 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00123 class ostreambuf_iterator; 00124 00125 00126 /// Base class for @c char streams. 00127 typedef basic_ios<char> ios; 00128 00129 /// Base class for @c char buffers. 00130 typedef basic_streambuf<char> streambuf; 00131 00132 /// Base class for @c char input streams. 00133 typedef basic_istream<char> istream; 00134 00135 /// Base class for @c char output streams. 00136 typedef basic_ostream<char> ostream; 00137 00138 /// Base class for @c char mixed input and output streams. 00139 typedef basic_iostream<char> iostream; 00140 00141 /// Class for @c char memory buffers. 00142 typedef basic_stringbuf<char> stringbuf; 00143 00144 /// Class for @c char input memory streams. 00145 typedef basic_istringstream<char> istringstream; 00146 00147 /// Class for @c char output memory streams. 00148 typedef basic_ostringstream<char> ostringstream; 00149 00150 /// Class for @c char mixed input and output memory streams. 00151 typedef basic_stringstream<char> stringstream; 00152 00153 /// Class for @c char file buffers. 00154 typedef basic_filebuf<char> filebuf; 00155 00156 /// Class for @c char input file streams. 00157 typedef basic_ifstream<char> ifstream; 00158 00159 /// Class for @c char output file streams. 00160 typedef basic_ofstream<char> ofstream; 00161 00162 /// Class for @c char mixed input and output file streams. 00163 typedef basic_fstream<char> fstream; 00164 00165 #ifdef _GLIBCXX_USE_WCHAR_T 00166 /// Base class for @c wchar_t streams. 00167 typedef basic_ios<wchar_t> wios; 00168 00169 /// Base class for @c wchar_t buffers. 00170 typedef basic_streambuf<wchar_t> wstreambuf; 00171 00172 /// Base class for @c wchar_t input streams. 00173 typedef basic_istream<wchar_t> wistream; 00174 00175 /// Base class for @c wchar_t output streams. 00176 typedef basic_ostream<wchar_t> wostream; 00177 00178 /// Base class for @c wchar_t mixed input and output streams. 00179 typedef basic_iostream<wchar_t> wiostream; 00180 00181 /// Class for @c wchar_t memory buffers. 00182 typedef basic_stringbuf<wchar_t> wstringbuf; 00183 00184 /// Class for @c wchar_t input memory streams. 00185 typedef basic_istringstream<wchar_t> wistringstream; 00186 00187 /// Class for @c wchar_t output memory streams. 00188 typedef basic_ostringstream<wchar_t> wostringstream; 00189 00190 /// Class for @c wchar_t mixed input and output memory streams. 00191 typedef basic_stringstream<wchar_t> wstringstream; 00192 00193 /// Class for @c wchar_t file buffers. 00194 typedef basic_filebuf<wchar_t> wfilebuf; 00195 00196 /// Class for @c wchar_t input file streams. 00197 typedef basic_ifstream<wchar_t> wifstream; 00198 00199 /// Class for @c wchar_t output file streams. 00200 typedef basic_ofstream<wchar_t> wofstream; 00201 00202 /// Class for @c wchar_t mixed input and output file streams. 00203 typedef basic_fstream<wchar_t> wfstream; 00204 #endif 00205 /** @} */ 00206 00207 _GLIBCXX_END_NAMESPACE_VERSION 00208 } // namespace 00209 00210 #endif /* _GLIBCXX_IOSFWD */