Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  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. #ifndef _INC_IOSTREAM
  13. #define _INC_IOSTREAM
  14. typedef long streamoff, streampos;
  15. #include <ios.h> // Define ios.
  16. #include <streamb.h> // Define streambuf.
  17. #include <istream.h> // Define istream.
  18. #include <ostream.h> // Define ostream.
  19. // Force word packing to avoid possible -Zp override
  20. #pragma pack(2)
  21. #pragma warning(disable:4505) // disable unwanted /W4 warning
  22. // #pragma warning(default:4505) // use this to reenable, if necessary
  23. class iostream : public istream, public ostream {
  24. public:
  25. iostream(streambuf*);
  26. virtual ~iostream();
  27. protected:
  28. // consider: make private??
  29. iostream();
  30. iostream(const iostream&);
  31. inline iostream& operator=(streambuf*);
  32. inline iostream& operator=(iostream&);
  33. private:
  34. iostream(ios&);
  35. iostream(istream&);
  36. iostream(ostream&);
  37. };
  38. inline iostream& iostream::operator=(streambuf* _sb) { istream::operator=(_sb); ostream::operator=(_sb); return *this; }
  39. inline iostream& iostream::operator=(iostream& _strm) { return operator=(_strm.rdbuf()); }
  40. class Iostream_init {
  41. public:
  42. Iostream_init();
  43. Iostream_init(ios &, int =0); // treat as private
  44. ~Iostream_init();
  45. };
  46. // used internally
  47. // static Iostream_init __iostreaminit; // initializes cin/cout/cerr/clog
  48. // Restore default packing
  49. #pragma pack()
  50. #endif