iostream 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Standard iostream objects -*- C++ -*-
  2. // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2005, 2008, 2009
  3. // 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. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. // Under Section 7 of GPL version 3, you are granted additional
  15. // permissions described in the GCC Runtime Library Exception, version
  16. // 3.1, as published by the Free Software Foundation.
  17. // You should have received a copy of the GNU General Public License and
  18. // a copy of the GCC Runtime Library Exception along with this program;
  19. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  20. // <http://www.gnu.org/licenses/>.
  21. /** @file iostream
  22. * This is a Standard C++ Library header.
  23. */
  24. //
  25. // ISO C++ 14882: 27.3 Standard iostream objects
  26. //
  27. #ifndef _GLIBCXX_IOSTREAM
  28. #define _GLIBCXX_IOSTREAM 1
  29. #pragma GCC system_header
  30. #include <bits/c++config.h>
  31. #include <ostream>
  32. #include <istream>
  33. _GLIBCXX_BEGIN_NAMESPACE(std)
  34. /**
  35. * @name Standard Stream Objects
  36. *
  37. * The &lt;iostream&gt; header declares the eight <em>standard stream
  38. * objects</em>. For other declarations, see
  39. * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html
  40. * and the @link iosfwd I/O forward declarations @endlink
  41. *
  42. * They are required by default to cooperate with the global C library's
  43. * @c FILE streams, and to be available during program startup and
  44. * termination. For more information, see the HOWTO linked to above.
  45. */
  46. //@{
  47. extern istream cin; ///< Linked to standard input
  48. extern ostream cout; ///< Linked to standard output
  49. extern ostream cerr; ///< Linked to standard error (unbuffered)
  50. extern ostream clog; ///< Linked to standard error (buffered)
  51. #ifdef _GLIBCXX_USE_WCHAR_T
  52. extern wistream wcin; ///< Linked to standard input
  53. extern wostream wcout; ///< Linked to standard output
  54. extern wostream wcerr; ///< Linked to standard error (unbuffered)
  55. extern wostream wclog; ///< Linked to standard error (buffered)
  56. #endif
  57. //@}
  58. // For construction of filebuffers for cout, cin, cerr, clog et. al.
  59. static ios_base::Init __ioinit;
  60. _GLIBCXX_END_NAMESPACE
  61. #endif /* _GLIBCXX_IOSTREAM */