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