|
|
1.1 root 1: /***
2: *iostream.h - definitions/declarations for iostream classes
3: *
4: * Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved.
5: *
6: *Purpose:
7: * This file defines the classes, values, macros, and functions
8: * used by the iostream classes.
9: * [AT&T C++]
10: *
11: ****/
12:
13: #ifndef _INC_IOSTREAM
14: #define _INC_IOSTREAM
15:
16: typedef long streamoff, streampos;
17:
18: #include <ios.h> // Define ios.
19:
20: #include <streamb.h> // Define streambuf.
21:
22: #include <istream.h> // Define istream.
23:
24: #include <ostream.h> // Define ostream.
25:
26: // Force word packing to avoid possible -Zp override
27: #pragma pack(4)
28:
29: #pragma warning(disable:4505) // disable unwanted /W4 warning
30: // #pragma warning(default:4505) // use this to reenable, if necessary
31:
32: class iostream : public istream, public ostream {
33: public:
34: iostream(streambuf*);
35: virtual ~iostream();
36: protected:
37: // consider: make private??
38: iostream();
39: iostream(const iostream&);
40: inline iostream& operator=(streambuf*);
41: inline iostream& operator=(iostream&);
42: private:
43: iostream(ios&);
44: iostream(istream&);
45: iostream(ostream&);
46: };
47:
48: inline iostream& iostream::operator=(streambuf* _sb) { istream::operator=(_sb); ostream::operator=(_sb); return *this; }
49:
50: inline iostream& iostream::operator=(iostream& _strm) { return operator=(_strm.rdbuf()); }
51:
52: class Iostream_init {
53: public:
54: Iostream_init();
55: Iostream_init(ios &, int =0); // treat as private
56: ~Iostream_init();
57: };
58:
59: // used internally
60: // static Iostream_init __iostreaminit; // initializes cin/cout/cerr/clog
61:
62: // Restore default packing
63: #pragma pack()
64:
65: #endif /* !_INC_IOSTREAM */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.