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