/home/ntakagi/work/STLport-5.1.5/stlport/iostreamGo to the documentation of this file.00001 /* 00002 * Copyright (c) 1999 00003 * Silicon Graphics Computer Systems, Inc. 00004 * 00005 * Copyright (c) 1999 00006 * Boris Fomitchev 00007 * 00008 * This material is provided "as is", with absolutely no warranty expressed 00009 * or implied. Any use is at your own risk. 00010 * 00011 * Permission to use or copy this software for any purpose is hereby granted 00012 * without fee, provided the above notices are retained on all copies. 00013 * Permission to modify the code and to distribute modified code is granted, 00014 * provided the above notices are retained, and a notice that the code was 00015 * modified is included with the above copyright notice. 00016 * 00017 */ 00018 00019 #ifndef _STLP_IOSTREAM 00020 #define _STLP_IOSTREAM 00021 00022 # ifndef _STLP_OUTERMOST_HEADER_ID 00023 # define _STLP_OUTERMOST_HEADER_ID 0x1037 00024 # include <stl/_prolog.h> 00025 # endif 00026 00027 # ifdef _STLP_PRAGMA_ONCE 00028 # pragma once 00029 # endif 00030 00031 #include <stl/_ioserr.h> 00032 00033 #ifdef _STLP_REDIRECT_STDSTREAMS 00034 // for ofstream redirection 00035 # include <fstream> 00036 #endif 00037 00038 #include <stl/_iosfwd.h> 00039 #include <stl/_istream.h> 00040 00041 _STLP_BEGIN_NAMESPACE 00042 00043 #ifndef _STLP_USE_NAMESPACES 00044 // in case of SGI iostreams, we have to rename our streams not to clash with those 00045 // provided in native lib 00046 # define cin _STLP_cin 00047 # define cout _STLP_cout 00048 # define cerr _STLP_cerr 00049 # define clog _STLP_clog 00050 #endif 00051 00052 // Note: cin and wcin are both associated with stdio. The C standard 00053 // (Amendment 1, section 4.6.2.1) says that it is an error to mix 00054 // wide- and narrow-oriented I/O on the same stream. This implies 00055 // that it is an error to use both cin and wcin in the same C++ 00056 // program; the same applies to cout and wcout, and cerr/clog and 00057 // wcerr/wclog. 00058 00059 # ifdef _STLP_REDIRECT_STDSTREAMS 00060 extern _STLP_DECLSPEC istream cin; 00061 extern _STLP_DECLSPEC ofstream cout; 00062 extern _STLP_DECLSPEC ofstream cerr; 00063 extern _STLP_DECLSPEC ofstream clog; 00064 # else 00065 extern _STLP_DECLSPEC istream cin; 00066 extern _STLP_DECLSPEC ostream cout; 00067 extern _STLP_DECLSPEC ostream cerr; 00068 extern _STLP_DECLSPEC ostream clog; 00069 # endif 00070 00071 # ifndef _STLP_NO_WCHAR_T 00072 extern _STLP_DECLSPEC wistream wcin; 00073 extern _STLP_DECLSPEC wostream wcout; 00074 extern _STLP_DECLSPEC wostream wcerr; 00075 extern _STLP_DECLSPEC wostream wclog; 00076 # endif 00077 00078 _STLP_END_NAMESPACE 00079 00080 //# elif defined ( _STLP_USE_NO_IOSTREAMS ) 00081 //# include <stl/_null_stream.h> 00082 00083 # if (_STLP_OUTERMOST_HEADER_ID == 0x1037) 00084 # include <stl/_epilog.h> 00085 # undef _STLP_OUTERMOST_HEADER_ID 00086 # endif 00087 00088 #endif /* _STLP_IOSTREAM */ 00089 00090 // Local Variables: 00091 // mode:C++ 00092 // End:
Generated on Mon Mar 10 15:32:18 2008 by ![]() |