sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 1999
|
sl@0
|
3 |
* Boris Fomitchev
|
sl@0
|
4 |
*
|
sl@0
|
5 |
* This material is provided "as is", with absolutely no warranty expressed
|
sl@0
|
6 |
* or implied. Any use is at your own risk.
|
sl@0
|
7 |
*
|
sl@0
|
8 |
* Permission to use or copy this software for any purpose is hereby granted
|
sl@0
|
9 |
* without fee, provided the above notices are retained on all copies.
|
sl@0
|
10 |
* Permission to modify the code and to distribute modified code is granted,
|
sl@0
|
11 |
* provided the above notices are retained, and a notice that the code was
|
sl@0
|
12 |
* modified is included with the above copyright notice.
|
sl@0
|
13 |
*
|
sl@0
|
14 |
*/
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef _STLP_IOSTREAM_H
|
sl@0
|
17 |
#define _STLP_IOSTREAM_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#ifndef _STLP_OUTERMOST_HEADER_ID
|
sl@0
|
20 |
# define _STLP_OUTERMOST_HEADER_ID 0x2035
|
sl@0
|
21 |
# include <stl/_prolog.h>
|
sl@0
|
22 |
#endif
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <iostream>
|
sl@0
|
25 |
|
sl@0
|
26 |
// Those should be included all separately, as they do contain using declarations
|
sl@0
|
27 |
#include <streambuf.h>
|
sl@0
|
28 |
#include <ostream.h>
|
sl@0
|
29 |
#include <istream.h>
|
sl@0
|
30 |
|
sl@0
|
31 |
#ifndef _STLP_HAS_NO_NAMESPACES
|
sl@0
|
32 |
|
sl@0
|
33 |
# ifdef _STLP_BROKEN_USING_DIRECTIVE
|
sl@0
|
34 |
_STLP_USING_NAMESPACE(stlport)
|
sl@0
|
35 |
# else
|
sl@0
|
36 |
using _STLP_STD::cin;
|
sl@0
|
37 |
using _STLP_STD::cout;
|
sl@0
|
38 |
using _STLP_STD::clog;
|
sl@0
|
39 |
using _STLP_STD::cerr;
|
sl@0
|
40 |
using _STLP_STD::iostream;
|
sl@0
|
41 |
# ifndef _STLP_NO_WCHAR_T
|
sl@0
|
42 |
using _STLP_STD::wcin;
|
sl@0
|
43 |
using _STLP_STD::wcout;
|
sl@0
|
44 |
using _STLP_STD::wclog;
|
sl@0
|
45 |
using _STLP_STD::wcerr;
|
sl@0
|
46 |
# endif
|
sl@0
|
47 |
# endif
|
sl@0
|
48 |
#endif /* _STLP_HAS_NO_NAMESPACES */
|
sl@0
|
49 |
|
sl@0
|
50 |
// Obsolete classes for old-style backwards compatibility
|
sl@0
|
51 |
|
sl@0
|
52 |
|
sl@0
|
53 |
class istream_withassign : public istream {
|
sl@0
|
54 |
public:
|
sl@0
|
55 |
istream_withassign() : istream((streambuf*)0) {}
|
sl@0
|
56 |
~istream_withassign() {}
|
sl@0
|
57 |
|
sl@0
|
58 |
istream_withassign& operator=(istream& __s) {
|
sl@0
|
59 |
ios::init(__s.rdbuf());
|
sl@0
|
60 |
return *this;
|
sl@0
|
61 |
}
|
sl@0
|
62 |
istream_withassign& operator=(streambuf* __s) {
|
sl@0
|
63 |
ios::init(__s);
|
sl@0
|
64 |
return *this;
|
sl@0
|
65 |
}
|
sl@0
|
66 |
};
|
sl@0
|
67 |
|
sl@0
|
68 |
class ostream_withassign : public ostream {
|
sl@0
|
69 |
public:
|
sl@0
|
70 |
ostream_withassign() : ostream((streambuf*)0) {}
|
sl@0
|
71 |
~ostream_withassign() {}
|
sl@0
|
72 |
|
sl@0
|
73 |
ostream_withassign& operator=(ostream& __s) {
|
sl@0
|
74 |
ios::init(__s.rdbuf());
|
sl@0
|
75 |
return *this;
|
sl@0
|
76 |
}
|
sl@0
|
77 |
ostream_withassign& operator=(streambuf* __s) {
|
sl@0
|
78 |
ios::init(__s);
|
sl@0
|
79 |
return *this;
|
sl@0
|
80 |
}
|
sl@0
|
81 |
};
|
sl@0
|
82 |
|
sl@0
|
83 |
class iostream_withassign : public iostream {
|
sl@0
|
84 |
public:
|
sl@0
|
85 |
iostream_withassign() : iostream((streambuf*)0) {}
|
sl@0
|
86 |
~iostream_withassign() {}
|
sl@0
|
87 |
iostream_withassign & operator=(ios& __i) {
|
sl@0
|
88 |
ios::init(__i.rdbuf());
|
sl@0
|
89 |
return *this;
|
sl@0
|
90 |
}
|
sl@0
|
91 |
iostream_withassign & operator=(streambuf* __s) {
|
sl@0
|
92 |
ios::init(__s);
|
sl@0
|
93 |
return *this;
|
sl@0
|
94 |
}
|
sl@0
|
95 |
} ;
|
sl@0
|
96 |
|
sl@0
|
97 |
#if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
|
sl@0
|
98 |
# include <stl/_epilog.h>
|
sl@0
|
99 |
# undef _STLP_OUTERMOST_HEADER_ID
|
sl@0
|
100 |
#endif
|
sl@0
|
101 |
|
sl@0
|
102 |
#endif /* _STLP_IOSTREAM_H */
|
sl@0
|
103 |
|
sl@0
|
104 |
// Local Variables:
|
sl@0
|
105 |
// mode:C++
|
sl@0
|
106 |
// End:
|