std_iostream.h revision 132720
1174604Sscottl// Standard iostream objects -*- C++ -*-
2174604Sscottl
3174604Sscottl// Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
4174604Sscottl//
5174604Sscottl// This file is part of the GNU ISO C++ Library.  This library is free
6174604Sscottl// software; you can redistribute it and/or modify it under the
7174604Sscottl// terms of the GNU General Public License as published by the
8174604Sscottl// Free Software Foundation; either version 2, or (at your option)
9174604Sscottl// any later version.
10174604Sscottl
11174604Sscottl// This library is distributed in the hope that it will be useful,
12174604Sscottl// but WITHOUT ANY WARRANTY; without even the implied warranty of
13174604Sscottl// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14174604Sscottl// GNU General Public License for more details.
15174604Sscottl
16174604Sscottl// You should have received a copy of the GNU General Public License along
17174604Sscottl// with this library; see the file COPYING.  If not, write to the Free
18174604Sscottl// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19174604Sscottl// USA.
20174604Sscottl
21174604Sscottl// As a special exception, you may use this file as part of a free software
22174604Sscottl// library without restriction.  Specifically, if other files instantiate
23174604Sscottl// templates or use macros or inline functions from this file, or you compile
24174604Sscottl// this file and link it with other files to produce an executable, this
25174604Sscottl// file does not by itself cause the resulting executable to be covered by
26174604Sscottl// the GNU General Public License.  This exception does not however
27174604Sscottl// invalidate any other reasons why the executable file might be covered by
28174604Sscottl// the GNU General Public License.
29176018Sscottl
30174604Sscottl//
31174604Sscottl// ISO C++ 14882: 27.3  Standard iostream objects
32174604Sscottl//
33174604Sscottl
34174604Sscottl/** @file iostream
35174604Sscottl *  This is a Standard C++ Library header.  You should @c #include this header
36174604Sscottl *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
37199043Smav */
38199043Smav
39199043Smav#ifndef _GLIBCXX_IOSTREAM
40174604Sscottl#define _GLIBCXX_IOSTREAM 1
41174604Sscottl
42174604Sscottl#pragma GCC system_header
43174604Sscottl
44174604Sscottl#include <bits/c++config.h>
45174604Sscottl#include <ostream>
46174604Sscottl#include <istream>
47199043Smav
48199043Smavnamespace std
49199043Smav{
50174604Sscottl  /**
51174604Sscottl   *  @name Standard Stream Objects
52174604Sscottl   *
53174604Sscottl   *  The &lt;iostream&gt; header declares the eight <em>standard stream
54174604Sscottl   *  objects</em>.  For other declarations, see
55174604Sscottl   *  http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#10 and the
56174604Sscottl   *  @link s27_2_iosfwd I/O forward declarations @endlink
57174604Sscottl   *
58174604Sscottl   *  They are required by default to cooperate with the global C library's
59174604Sscottl   *  @c FILE streams, and to be available during program startup and
60174604Sscottl   *  termination.  For more information, see the HOWTO linked to above.
61174604Sscottl  */
62174604Sscottl  //@{
63174604Sscottl  extern istream cin;		///< Linked to standard input
64174604Sscottl  extern ostream cout;		///< Linked to standard output
65174604Sscottl  extern ostream cerr;		///< Linked to standard error (unbuffered)
66174604Sscottl  extern ostream clog;		///< Linked to standard error (buffered)
67174604Sscottl
68174604Sscottl#ifdef _GLIBCXX_USE_WCHAR_T
69174604Sscottl  extern wistream wcin;		///< Linked to standard input
70174604Sscottl  extern wostream wcout;	///< Linked to standard output
71174604Sscottl  extern wostream wcerr;	///< Linked to standard error (unbuffered)
72174604Sscottl  extern wostream wclog;	///< Linked to standard error (buffered)
73174604Sscottl#endif
74174604Sscottl  //@}
75174604Sscottl
76174604Sscottl  // For construction of filebuffers for cout, cin, cerr, clog et. al.
77174604Sscottl  static ios_base::Init __ioinit;
78174604Sscottl} // namespace std
79174604Sscottl
80174604Sscottl#endif /* _GLIBCXX_IOSTREAM */
81174604Sscottl