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