Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

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