libstdc++
|
00001 // Forwarding declarations -*- C++ -*- 00002 00003 // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 00004 // 2006, 2007, 2009 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 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 _GLIBCXX_BEGIN_NAMESPACE(std) 00045 00046 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00047 class basic_ios; 00048 00049 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00050 class basic_streambuf; 00051 00052 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00053 class basic_istream; 00054 00055 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00056 class basic_ostream; 00057 00058 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00059 class basic_iostream; 00060 00061 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00062 typename _Alloc = allocator<_CharT> > 00063 class basic_stringbuf; 00064 00065 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00066 typename _Alloc = allocator<_CharT> > 00067 class basic_istringstream; 00068 00069 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00070 typename _Alloc = allocator<_CharT> > 00071 class basic_ostringstream; 00072 00073 template<typename _CharT, typename _Traits = char_traits<_CharT>, 00074 typename _Alloc = allocator<_CharT> > 00075 class basic_stringstream; 00076 00077 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00078 class basic_filebuf; 00079 00080 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00081 class basic_ifstream; 00082 00083 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00084 class basic_ofstream; 00085 00086 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00087 class basic_fstream; 00088 00089 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00090 class istreambuf_iterator; 00091 00092 template<typename _CharT, typename _Traits = char_traits<_CharT> > 00093 class ostreambuf_iterator; 00094 00095 // _GLIBCXX_RESOLVE_LIB_DEFECTS 00096 // Not included. (??? Apparently no LWG number?) 00097 class ios_base; 00098 00099 /** 00100 * @defgroup io I/O 00101 * 00102 * Nearly all of the I/O classes are parameterized on the type of 00103 * characters they read and write. (The major exception is ios_base at 00104 * the top of the hierarchy.) This is a change from pre-Standard 00105 * streams, which were not templates. 00106 * 00107 * For ease of use and compatibility, all of the basic_* I/O-related 00108 * classes are given typedef names for both of the builtin character 00109 * widths (wide and narrow). The typedefs are the same as the 00110 * pre-Standard names, for example: 00111 * 00112 * @code 00113 * typedef basic_ifstream<char> ifstream; 00114 * @endcode 00115 * 00116 * Because properly forward-declaring these classes can be difficult, you 00117 * should not do it yourself. Instead, include the <iosfwd> 00118 * header, which contains only declarations of all the I/O classes as 00119 * well as the typedefs. Trying to forward-declare the typedefs 00120 * themselves (e.g., "class ostream;") is not valid ISO C++. 00121 * 00122 * For more specific declarations, see 00123 * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html 00124 * 00125 * @{ 00126 */ 00127 typedef basic_ios<char> ios; ///< @isiosfwd 00128 typedef basic_streambuf<char> streambuf; ///< @isiosfwd 00129 typedef basic_istream<char> istream; ///< @isiosfwd 00130 typedef basic_ostream<char> ostream; ///< @isiosfwd 00131 typedef basic_iostream<char> iostream; ///< @isiosfwd 00132 typedef basic_stringbuf<char> stringbuf; ///< @isiosfwd 00133 typedef basic_istringstream<char> istringstream; ///< @isiosfwd 00134 typedef basic_ostringstream<char> ostringstream; ///< @isiosfwd 00135 typedef basic_stringstream<char> stringstream; ///< @isiosfwd 00136 typedef basic_filebuf<char> filebuf; ///< @isiosfwd 00137 typedef basic_ifstream<char> ifstream; ///< @isiosfwd 00138 typedef basic_ofstream<char> ofstream; ///< @isiosfwd 00139 typedef basic_fstream<char> fstream; ///< @isiosfwd 00140 00141 #ifdef _GLIBCXX_USE_WCHAR_T 00142 typedef basic_ios<wchar_t> wios; ///< @isiosfwd 00143 typedef basic_streambuf<wchar_t> wstreambuf; ///< @isiosfwd 00144 typedef basic_istream<wchar_t> wistream; ///< @isiosfwd 00145 typedef basic_ostream<wchar_t> wostream; ///< @isiosfwd 00146 typedef basic_iostream<wchar_t> wiostream; ///< @isiosfwd 00147 typedef basic_stringbuf<wchar_t> wstringbuf; ///< @isiosfwd 00148 typedef basic_istringstream<wchar_t> wistringstream; ///< @isiosfwd 00149 typedef basic_ostringstream<wchar_t> wostringstream; ///< @isiosfwd 00150 typedef basic_stringstream<wchar_t> wstringstream; ///< @isiosfwd 00151 typedef basic_filebuf<wchar_t> wfilebuf; ///< @isiosfwd 00152 typedef basic_ifstream<wchar_t> wifstream; ///< @isiosfwd 00153 typedef basic_ofstream<wchar_t> wofstream; ///< @isiosfwd 00154 typedef basic_fstream<wchar_t> wfstream; ///< @isiosfwd 00155 #endif 00156 /** @} */ 00157 00158 _GLIBCXX_END_NAMESPACE 00159 00160 #endif /* _GLIBCXX_IOSFWD */