ReactOS  0.4.15-dev-499-g1f31905
iostream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1999
3  * Boris Fomitchev
4  *
5  * This material is provided "as is", with absolutely no warranty expressed
6  * or implied. Any use is at your own risk.
7  *
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.
13  *
14  */
15 
16 #ifndef _STLP_IOSTREAM_H
17 #define _STLP_IOSTREAM_H
18 
19 #ifndef _STLP_OUTERMOST_HEADER_ID
20 # define _STLP_OUTERMOST_HEADER_ID 0x2035
21 # include <stl/_prolog.h>
22 #endif
23 
24 #include <iostream>
25 
26 // Those should be included all separately, as they do contain using declarations
27 #include <streambuf.h>
28 #include <ostream.h>
29 #include <istream.h>
30 
31 #ifndef _STLP_HAS_NO_NAMESPACES
32 
33 # ifdef _STLP_BROKEN_USING_DIRECTIVE
35 # else
36 using _STLP_STD::cin;
37 using _STLP_STD::cout;
38 using _STLP_STD::clog;
39 using _STLP_STD::cerr;
41 # ifndef _STLP_NO_WCHAR_T
42 using _STLP_STD::wcin;
43 using _STLP_STD::wcout;
44 using _STLP_STD::wclog;
45 using _STLP_STD::wcerr;
46 # endif
47 # endif
48 #endif /* _STLP_HAS_NO_NAMESPACES */
49 
50 // Obsolete classes for old-style backwards compatibility
51 
52 
53 class istream_withassign : public istream {
54  public:
57 
59  ios::init(__s.rdbuf());
60  return *this;
61  }
63  ios::init(__s);
64  return *this;
65  }
66 };
67 
68 class ostream_withassign : public ostream {
69  public:
72 
74  ios::init(__s.rdbuf());
75  return *this;
76  }
78  ios::init(__s);
79  return *this;
80  }
81 };
82 
83 class iostream_withassign : public iostream {
84  public:
88  ios::init(__i.rdbuf());
89  return *this;
90  }
92  ios::init(__s);
93  return *this;
94  }
95 } ;
96 
97 #if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
98 # include <stl/_epilog.h>
99 # undef _STLP_OUTERMOST_HEADER_ID
100 #endif
101 
102 #endif /* _STLP_IOSTREAM_H */
103 
104 // Local Variables:
105 // mode:C++
106 // End:
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wcout
Definition: iostream.cpp:120
basic_streambuf< _CharT, _Traits > * rdbuf() const
Definition: _ios.h:72
iostream_withassign & operator=(streambuf *__s)
Definition: iostream.h:91
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wcerr
Definition: iostream.cpp:121
istream_withassign & operator=(istream &__s)
Definition: iostream.h:58
#define cout
Definition: iostream.cpp:38
ostream_withassign & operator=(ostream &__s)
Definition: iostream.h:73
#define cin
Definition: iostream.cpp:37
istream_withassign & operator=(streambuf *__s)
Definition: iostream.h:62
_STLP_DECLSPEC _Stl_aligned_buffer< ostream > cerr
Definition: iostream.cpp:102
#define clog
Definition: iostream.cpp:40
void init(basic_streambuf< char, char_traits< char > > *__streambuf)
Definition: _ios.c:97
iostream_withassign & operator=(ios &__i)
Definition: iostream.h:87
_STLP_DECLSPEC _Stl_aligned_buffer< wistream > wcin
Definition: iostream.cpp:119
#define _STLP_USING_NAMESPACE(x)
Definition: features.h:415
_STLP_DECLSPEC _Stl_aligned_buffer< wostream > wclog
Definition: iostream.cpp:122
basic_iostream< char, char_traits< char > > iostream
Definition: _iosfwd.h:122
ostream_withassign & operator=(streambuf *__s)
Definition: iostream.h:77