williamr@4: /* williamr@4: * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. williamr@4: * williamr@4: * Copyright (c) 1999 williamr@4: * Silicon Graphics Computer Systems, Inc. williamr@4: * williamr@4: * Copyright (c) 1999 williamr@4: * Boris Fomitchev williamr@4: * williamr@4: * This material is provided "as is", with absolutely no warranty expressed williamr@4: * or implied. Any use is at your own risk. williamr@4: * williamr@4: * Permission to use or copy this software for any purpose is hereby granted williamr@4: * without fee, provided the above notices are retained on all copies. williamr@4: * Permission to modify the code and to distribute modified code is granted, williamr@4: * provided the above notices are retained, and a notice that the code was williamr@4: * modified is included with the above copyright notice. williamr@4: * williamr@4: */ williamr@4: williamr@4: #ifndef _STLP_IOSTREAM williamr@4: #define _STLP_IOSTREAM williamr@4: williamr@4: # ifndef _STLP_OUTERMOST_HEADER_ID williamr@4: # define _STLP_OUTERMOST_HEADER_ID 0x1037 williamr@4: # include williamr@4: # endif williamr@4: williamr@4: # ifdef _STLP_PRAGMA_ONCE williamr@4: # pragma once williamr@4: # endif williamr@4: williamr@4: #include williamr@4: williamr@4: #ifdef _STLP_REDIRECT_STDSTREAMS williamr@4: // for ofstream redirection williamr@4: # include williamr@4: #endif williamr@4: williamr@4: #include williamr@4: #include williamr@4: williamr@4: _STLP_BEGIN_NAMESPACE williamr@4: williamr@4: #ifndef _STLP_USE_NAMESPACES williamr@4: // in case of SGI iostreams, we have to rename our streams not to clash with those williamr@4: // provided in native lib williamr@4: # define cin _STLP_cin williamr@4: # define cout _STLP_cout williamr@4: # define cerr _STLP_cerr williamr@4: # define clog _STLP_clog williamr@4: #endif williamr@4: williamr@4: // Note: cin and wcin are both associated with stdio. The C standard williamr@4: // (Amendment 1, section 4.6.2.1) says that it is an error to mix williamr@4: // wide- and narrow-oriented I/O on the same stream. This implies williamr@4: // that it is an error to use both cin and wcin in the same C++ williamr@4: // program; the same applies to cout and wcout, and cerr/clog and williamr@4: // wcerr/wclog. williamr@4: williamr@4: # ifdef _STLP_REDIRECT_STDSTREAMS williamr@4: extern _STLP_DECLSPEC istream cin; williamr@4: extern _STLP_DECLSPEC ofstream cout; williamr@4: extern _STLP_DECLSPEC ofstream cerr; williamr@4: extern _STLP_DECLSPEC ofstream clog; williamr@4: # elif defined(__SYMBIAN32__WSD__) || defined (__SYMBIAN32__NO_STATIC_IMPORTS__) williamr@4: _STLP_DECLSPEC ostream& get_cerr(); williamr@4: _STLP_DECLSPEC ostream& get_cout(); williamr@4: _STLP_DECLSPEC ostream& get_clog(); williamr@4: _STLP_DECLSPEC istream& get_cin(); williamr@4: # if defined (__SYMBIAN32__WSD__) || !defined(_STLP_DESIGNATED_DLL) williamr@4: /* For the emulator, these definitions are used by the user as well as the STLPort library*/ williamr@4: /* For ARM platforms, user gets references to streams via function calls while the library uses the williamr@4: objects internally. williamr@4: */ williamr@4: #define cerr get_cerr() williamr@4: #define cin get_cin() williamr@4: #define cout get_cout() williamr@4: #define clog get_clog() williamr@4: # endif //__SYMBIAN32__WSD__ || _STLP_DESIGNATED_DLL williamr@4: #else williamr@4: extern _STLP_DECLSPEC istream cin; williamr@4: extern _STLP_DECLSPEC ostream cout; williamr@4: extern _STLP_DECLSPEC ostream cerr; williamr@4: extern _STLP_DECLSPEC ostream clog; williamr@4: # endif //_STLP_REDIRECT_STDSTREAMS williamr@4: williamr@4: # ifndef _STLP_NO_WCHAR_T williamr@4: # if defined(__SYMBIAN32__WSD__) || defined (__SYMBIAN32__NO_STATIC_IMPORTS__) williamr@4: _STLP_DECLSPEC wostream& get_wcerr(); williamr@4: _STLP_DECLSPEC wostream& get_wcout(); williamr@4: _STLP_DECLSPEC wostream& get_wclog(); williamr@4: _STLP_DECLSPEC wistream& get_wcin(); williamr@4: williamr@4: # if defined (__SYMBIAN32__WSD__) || !defined(_STLP_DESIGNATED_DLL) williamr@4: /* For the emulator, these definitions are used by the user as well as the STLPort library*/ williamr@4: /* For ARM platforms, user gets references to streams via function calls while the library uses the williamr@4: objects internally. williamr@4: */ williamr@4: #define wcerr get_wcerr() williamr@4: #define wcin get_wcin() williamr@4: #define wcout get_wcout() williamr@4: #define wclog get_wclog() williamr@4: # endif //__SYMBIAN32__WSD__ || _STLP_DESIGNATED_DLL williamr@4: #else //__SYMBIAN32__WSD__ williamr@4: extern _STLP_DECLSPEC wistream wcin; williamr@4: extern _STLP_DECLSPEC wostream wcout; williamr@4: extern _STLP_DECLSPEC wostream wcerr; williamr@4: extern _STLP_DECLSPEC wostream wclog; williamr@4: #endif //__SYMBIAN32__WSD__ || __SYMBIAN32__NO_STATIC_IMPORTS__ williamr@4: # endif //_STLP_NO_WCHAR_T williamr@4: williamr@4: _STLP_END_NAMESPACE williamr@4: williamr@4: //# elif defined ( _STLP_USE_NO_IOSTREAMS ) williamr@4: //# include williamr@4: williamr@4: # if (_STLP_OUTERMOST_HEADER_ID == 0x1037) williamr@4: # include williamr@4: # undef _STLP_OUTERMOST_HEADER_ID williamr@4: # endif williamr@4: williamr@4: #endif /* _STLP_IOSTREAM */ williamr@4: williamr@4: // Local Variables: williamr@4: // mode:C++ williamr@4: // End: