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