5
* This material is provided "as is", with absolutely no warranty expressed
6
* or implied. Any use is at your own risk.
8
* Permission to use or copy this software for any purpose is hereby granted
9
* without fee, provided the above notices are retained on all copies.
10
* Permission to modify the code and to distribute modified code is granted,
11
* provided the above notices are retained, and a notice that the code was
12
* modified is included with the above copyright notice.
16
#ifndef _STLP_IOSTREAM_H
17
# define _STLP_IOSTREAM_H
19
# ifndef _STLP_OUTERMOST_HEADER_ID
20
# define _STLP_OUTERMOST_HEADER_ID 0x2035
21
# include <stl/_prolog.h>
24
# ifdef _STLP_OWN_IOSTREAMS
32
// Those should be included all separately, as they do contain using declarations
33
# include <streambuf.h>
37
# ifndef _STLP_HAS_NO_NAMESPACES
39
# ifdef _STLP_BROKEN_USING_DIRECTIVE
40
using namespace _STLP_STD;
43
using _STLP_STD::cout;
44
using _STLP_STD::clog;
45
using _STLP_STD::cerr;
46
using _STLP_STD::iostream;
48
# ifndef _STLP_NO_WCHAR_T
49
using _STLP_STD::wcin;
50
using _STLP_STD::wcout;
51
using _STLP_STD::wclog;
52
using _STLP_STD::wcerr;
57
# endif /* _STLP_HAS_NO_NAMESPACES */
59
// Obsolete classes for old-style backwards compatibility
62
class istream_withassign : public istream {
64
istream_withassign() : istream((streambuf*)0) {}
65
~istream_withassign() {}
67
istream_withassign& operator=(istream& __s) {
68
ios::init(__s.rdbuf());
71
istream_withassign& operator=(streambuf* __s) {
77
class ostream_withassign : public ostream {
79
ostream_withassign() : ostream((streambuf*)0) {}
80
~ostream_withassign() {}
82
ostream_withassign& operator=(ostream& __s) {
83
ios::init(__s.rdbuf());
86
ostream_withassign& operator=(streambuf* __s) {
92
class iostream_withassign : public iostream {
94
iostream_withassign() : iostream((streambuf*)0) {}
95
~iostream_withassign() {}
96
iostream_withassign & operator=(ios& __i) {
97
ios::init(__i.rdbuf());
100
iostream_withassign & operator=(streambuf* __s) {
106
# elif ! defined (_STLP_USE_NO_IOSTREAMS)
107
# include <wrap_std/h/iostream.h>
110
# if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
111
# include <stl/_epilog.h>
112
# undef _STLP_OUTERMOST_HEADER_ID
115
#endif /* _STLP_IOSTREAM_H */