/home/ntakagi/work/STLport-5.1.5/stlport/iostream.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999
00003  * Boris Fomitchev
00004  *
00005  * This material is provided "as is", with absolutely no warranty expressed
00006  * or implied. Any use is at your own risk.
00007  *
00008  * Permission to use or copy this software for any purpose is hereby granted
00009  * without fee, provided the above notices are retained on all copies.
00010  * Permission to modify the code and to distribute modified code is granted,
00011  * provided the above notices are retained, and a notice that the code was
00012  * modified is included with the above copyright notice.
00013  *
00014  */
00015 
00016 #ifndef _STLP_IOSTREAM_H
00017 #define _STLP_IOSTREAM_H
00018 
00019 #ifndef _STLP_OUTERMOST_HEADER_ID
00020 #  define _STLP_OUTERMOST_HEADER_ID 0x2035
00021 #  include <stl/_prolog.h>
00022 #endif
00023 
00024 #include <iostream>
00025 
00026 // Those should be included all separately, as they do contain using declarations
00027 #include <streambuf.h>
00028 #include <ostream.h>
00029 #include <istream.h>
00030 
00031 #ifndef _STLP_HAS_NO_NAMESPACES
00032 
00033 #  ifdef _STLP_BROKEN_USING_DIRECTIVE
00034 _STLP_USING_NAMESPACE(stlport)
00035 #  else
00036 using _STLP_STD::cin;
00037 using _STLP_STD::cout;
00038 using _STLP_STD::clog;
00039 using _STLP_STD::cerr;
00040 using _STLP_STD::iostream;
00041 #    ifndef _STLP_NO_WCHAR_T
00042 using _STLP_STD::wcin;
00043 using _STLP_STD::wcout;
00044 using _STLP_STD::wclog;
00045 using _STLP_STD::wcerr;
00046 #    endif
00047 #  endif
00048 #endif /* _STLP_HAS_NO_NAMESPACES */
00049 
00050 // Obsolete classes for old-style backwards compatibility
00051 
00052 
00053 class istream_withassign : public istream {
00054  public:
00055   istream_withassign() : istream((streambuf*)0) {}
00056   ~istream_withassign() {}
00057 
00058   istream_withassign& operator=(istream& __s) {
00059     ios::init(__s.rdbuf());
00060     return *this;
00061   }
00062   istream_withassign& operator=(streambuf* __s) {
00063     ios::init(__s);
00064     return *this;
00065   }
00066 };
00067 
00068 class ostream_withassign : public ostream {
00069  public:
00070   ostream_withassign() : ostream((streambuf*)0) {}
00071   ~ostream_withassign() {}
00072 
00073   ostream_withassign& operator=(ostream& __s) {
00074     ios::init(__s.rdbuf());
00075     return *this;
00076   }
00077   ostream_withassign& operator=(streambuf* __s) {
00078     ios::init(__s);
00079     return *this;
00080   }
00081 };
00082 
00083 class iostream_withassign : public iostream {
00084  public:
00085   iostream_withassign() : iostream((streambuf*)0) {}
00086   ~iostream_withassign() {}
00087   iostream_withassign & operator=(ios& __i) {
00088     ios::init(__i.rdbuf());
00089     return *this;
00090   }
00091   iostream_withassign & operator=(streambuf* __s) {
00092     ios::init(__s);
00093     return *this;
00094   }
00095 } ;
00096 
00097 #if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
00098 #  include <stl/_epilog.h>
00099 #  undef _STLP_OUTERMOST_HEADER_ID
00100 #endif
00101 
00102 #endif /* _STLP_IOSTREAM_H */
00103 
00104 // Local Variables:
00105 // mode:C++
00106 // End:



Generated on Mon Mar 10 15:32:18 2008 by  doxygen 1.5.1