os/ossrv/genericopenlibs/cppstdlib/stl/stlport/iostream
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
 * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
sl@0
     3
 *
sl@0
     4
 * Copyright (c) 1999
sl@0
     5
 * Silicon Graphics Computer Systems, Inc.
sl@0
     6
 *
sl@0
     7
 * Copyright (c) 1999
sl@0
     8
 * Boris Fomitchev
sl@0
     9
 *
sl@0
    10
 * This material is provided "as is", with absolutely no warranty expressed
sl@0
    11
 * or implied. Any use is at your own risk.
sl@0
    12
 *
sl@0
    13
 * Permission to use or copy this software for any purpose is hereby granted
sl@0
    14
 * without fee, provided the above notices are retained on all copies.
sl@0
    15
 * Permission to modify the code and to distribute modified code is granted,
sl@0
    16
 * provided the above notices are retained, and a notice that the code was
sl@0
    17
 * modified is included with the above copyright notice.
sl@0
    18
 *
sl@0
    19
 */
sl@0
    20
sl@0
    21
#ifndef _STLP_IOSTREAM
sl@0
    22
#define _STLP_IOSTREAM
sl@0
    23
sl@0
    24
# ifndef _STLP_OUTERMOST_HEADER_ID
sl@0
    25
#  define _STLP_OUTERMOST_HEADER_ID 0x1037
sl@0
    26
#  include <stl/_prolog.h>
sl@0
    27
# endif
sl@0
    28
sl@0
    29
# ifdef _STLP_PRAGMA_ONCE
sl@0
    30
#  pragma once
sl@0
    31
# endif
sl@0
    32
sl@0
    33
#include <stl/_ioserr.h>
sl@0
    34
sl@0
    35
#ifdef _STLP_REDIRECT_STDSTREAMS
sl@0
    36
// for ofstream redirection
sl@0
    37
# include <fstream>
sl@0
    38
#endif
sl@0
    39
sl@0
    40
#include <stl/_iosfwd.h>
sl@0
    41
#include <stl/_istream.h>
sl@0
    42
sl@0
    43
_STLP_BEGIN_NAMESPACE
sl@0
    44
sl@0
    45
#ifndef _STLP_USE_NAMESPACES
sl@0
    46
// in case of SGI iostreams, we have to rename our streams not to clash with those
sl@0
    47
// provided in native lib
sl@0
    48
# define cin _STLP_cin
sl@0
    49
# define cout _STLP_cout
sl@0
    50
# define cerr _STLP_cerr
sl@0
    51
# define clog _STLP_clog
sl@0
    52
#endif
sl@0
    53
sl@0
    54
// Note: cin and wcin are both associated with stdio.  The C standard
sl@0
    55
// (Amendment 1, section 4.6.2.1) says that it is an error to mix
sl@0
    56
// wide- and narrow-oriented I/O on the same stream.  This implies
sl@0
    57
// that it is an error to use both cin and wcin in the same C++
sl@0
    58
// program; the same applies to cout and wcout, and cerr/clog and
sl@0
    59
// wcerr/wclog.
sl@0
    60
sl@0
    61
# ifdef _STLP_REDIRECT_STDSTREAMS
sl@0
    62
extern _STLP_DECLSPEC istream cin;
sl@0
    63
extern _STLP_DECLSPEC ofstream cout;
sl@0
    64
extern _STLP_DECLSPEC ofstream cerr;
sl@0
    65
extern _STLP_DECLSPEC ofstream clog;
sl@0
    66
# elif defined(__SYMBIAN32__WSD__) || defined (__SYMBIAN32__NO_STATIC_IMPORTS__)
sl@0
    67
_STLP_DECLSPEC ostream& get_cerr();
sl@0
    68
_STLP_DECLSPEC ostream& get_cout();
sl@0
    69
_STLP_DECLSPEC ostream& get_clog();
sl@0
    70
_STLP_DECLSPEC istream& get_cin(); 
sl@0
    71
#   if defined (__SYMBIAN32__WSD__) || !defined(_STLP_DESIGNATED_DLL)
sl@0
    72
/* For the emulator, these definitions are used by the user as well as the STLPort library*/
sl@0
    73
/* For ARM platforms, user gets references to streams via function calls while the library uses the 
sl@0
    74
   objects internally.
sl@0
    75
*/
sl@0
    76
#define cerr get_cerr()
sl@0
    77
#define cin  get_cin()
sl@0
    78
#define cout get_cout()
sl@0
    79
#define clog get_clog()
sl@0
    80
#   endif //__SYMBIAN32__WSD__ || _STLP_DESIGNATED_DLL
sl@0
    81
#else
sl@0
    82
extern _STLP_DECLSPEC istream cin;
sl@0
    83
extern _STLP_DECLSPEC ostream cout;
sl@0
    84
extern _STLP_DECLSPEC ostream cerr; 
sl@0
    85
extern _STLP_DECLSPEC ostream clog;
sl@0
    86
# endif //_STLP_REDIRECT_STDSTREAMS
sl@0
    87
sl@0
    88
# ifndef _STLP_NO_WCHAR_T
sl@0
    89
# if defined(__SYMBIAN32__WSD__) || defined (__SYMBIAN32__NO_STATIC_IMPORTS__)
sl@0
    90
_STLP_DECLSPEC wostream& get_wcerr();
sl@0
    91
_STLP_DECLSPEC wostream& get_wcout();
sl@0
    92
_STLP_DECLSPEC wostream& get_wclog();
sl@0
    93
_STLP_DECLSPEC wistream& get_wcin(); 
sl@0
    94
sl@0
    95
#   if defined (__SYMBIAN32__WSD__) || !defined(_STLP_DESIGNATED_DLL)
sl@0
    96
/* For the emulator, these definitions are used by the user as well as the STLPort library*/
sl@0
    97
/* For ARM platforms, user gets references to streams via function calls while the library uses the 
sl@0
    98
   objects internally.
sl@0
    99
*/
sl@0
   100
#define wcerr 	get_wcerr()
sl@0
   101
#define wcin 	get_wcin()
sl@0
   102
#define wcout	get_wcout()
sl@0
   103
#define wclog 	get_wclog()
sl@0
   104
#   endif //__SYMBIAN32__WSD__ || _STLP_DESIGNATED_DLL
sl@0
   105
#else //__SYMBIAN32__WSD__
sl@0
   106
extern _STLP_DECLSPEC wistream wcin;
sl@0
   107
extern _STLP_DECLSPEC wostream wcout;
sl@0
   108
extern _STLP_DECLSPEC wostream wcerr;
sl@0
   109
extern _STLP_DECLSPEC wostream wclog;
sl@0
   110
#endif //__SYMBIAN32__WSD__ || __SYMBIAN32__NO_STATIC_IMPORTS__
sl@0
   111
# endif  //_STLP_NO_WCHAR_T
sl@0
   112
sl@0
   113
_STLP_END_NAMESPACE
sl@0
   114
sl@0
   115
//# elif defined ( _STLP_USE_NO_IOSTREAMS )
sl@0
   116
//#  include <stl/_null_stream.h>
sl@0
   117
sl@0
   118
# if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
sl@0
   119
#  include <stl/_epilog.h>
sl@0
   120
#  undef _STLP_OUTERMOST_HEADER_ID
sl@0
   121
# endif
sl@0
   122
sl@0
   123
#endif /* _STLP_IOSTREAM */
sl@0
   124
sl@0
   125
// Local Variables:
sl@0
   126
// mode:C++
sl@0
   127
// End: