epoc32/include/stdapis/stlport/iostream
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/iostream	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/iostream	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,130 @@
     1.4 -iostream
     1.5 +/*
     1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.7 + *
     1.8 + * Copyright (c) 1999
     1.9 + * Silicon Graphics Computer Systems, Inc.
    1.10 + *
    1.11 + * Copyright (c) 1999 
    1.12 + * Boris Fomitchev
    1.13 + *
    1.14 + * This material is provided "as is", with absolutely no warranty expressed
    1.15 + * or implied. Any use is at your own risk.
    1.16 + *
    1.17 + * Permission to use or copy this software for any purpose is hereby granted 
    1.18 + * without fee, provided the above notices are retained on all copies.
    1.19 + * Permission to modify the code and to distribute modified code is granted,
    1.20 + * provided the above notices are retained, and a notice that the code was
    1.21 + * modified is included with the above copyright notice.
    1.22 + *
    1.23 + */ 
    1.24 +
    1.25 +#ifndef _STLP_IOSTREAM
    1.26 +#define _STLP_IOSTREAM
    1.27 +
    1.28 +# ifndef _STLP_OUTERMOST_HEADER_ID
    1.29 +#  define _STLP_OUTERMOST_HEADER_ID 0x1037
    1.30 +#  include <stl/_prolog.h>
    1.31 +# endif
    1.32 +
    1.33 +# ifdef _STLP_PRAGMA_ONCE
    1.34 +#  pragma once
    1.35 +# endif
    1.36 +
    1.37 +# if defined (_STLP_OWN_IOSTREAMS)
    1.38 +
    1.39 +#include <stl/_iosfwd.h>
    1.40 +#include <stl/_istream.h>
    1.41 +
    1.42 +_STLP_BEGIN_NAMESPACE
    1.43 +
    1.44 +#ifndef _STLP_USE_NAMESPACES
    1.45 +// in case of SGI iostreams, we have to rename our streams not to clash with those
    1.46 +// provided in native lib
    1.47 +# define cin _STLP_cin
    1.48 +# define cout _STLP_cout
    1.49 +# define cerr _STLP_cerr
    1.50 +# define clog _STLP_clog
    1.51 +#endif
    1.52 +
    1.53 +// Note: cin and wcin are both associated with stdio.  The C standard
    1.54 +// (Amendment 1, section 4.6.2.1) says that it is an error to mix
    1.55 +// wide- and narrow-oriented I/O on the same stream.  This implies
    1.56 +// that it is an error to use both cin and wcin in the same C++
    1.57 +// program; the same applies to cout and wcout, and cerr/clog and
    1.58 +// wcerr/wclog.
    1.59 +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
    1.60 +_STLP_DECLSPEC ostream& GetCErrStream();
    1.61 +_STLP_DECLSPEC ostream& GetCoutStream();
    1.62 +_STLP_DECLSPEC ostream& GetClogStream();
    1.63 +_STLP_DECLSPEC istream& GetCinStream(); 
    1.64 +
    1.65 +//#define std::cerr (std::GetCErrStream())
    1.66 +#define cerr GetCErrStream()
    1.67 +//#define std::cin (std::GetCinStream())
    1.68 +#define cin GetCinStream()
    1.69 +//#define std::cout (std::GetCoutStream())
    1.70 +#define cout GetCoutStream()
    1.71 +//#define std::clog (std::GetClogStream())
    1.72 +#define clog GetClogStream()
    1.73 +#else //__LIBSTD_CPP_SYMBIAN32_WSD__
    1.74 +extern _STLP_DECLSPEC istream cin;
    1.75 +extern _STLP_DECLSPEC ostream cout;
    1.76 +extern _STLP_DECLSPEC ostream cerr;
    1.77 +extern _STLP_DECLSPEC ostream clog;
    1.78 +#endif //__LIBSTD_CPP_SYMBIAN32_WSD__
    1.79 +
    1.80 +# ifndef _STLP_NO_WCHAR_T
    1.81 +# if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
    1.82 +_STLP_DECLSPEC wostream& GetWCErrStream();
    1.83 +_STLP_DECLSPEC wostream& GetWCoutStream();
    1.84 +_STLP_DECLSPEC wostream& GetWClogStream();
    1.85 +_STLP_DECLSPEC wistream& GetWCinStream(); 
    1.86 +
    1.87 +#define wcerr GetWCErrStream()
    1.88 +#define wcin GetWCinStream()
    1.89 +#define wcout GetWCoutStream()
    1.90 +#define wclog GetWClogStream()
    1.91 +#else //__LIBSTD_CPP_SYMBIAN32_WSD__
    1.92 +extern _STLP_DECLSPEC wistream wcin;
    1.93 +extern _STLP_DECLSPEC wostream wcout;
    1.94 +extern _STLP_DECLSPEC wostream wcerr;
    1.95 +extern _STLP_DECLSPEC wostream wclog;
    1.96 +#endif //__LIBSTD_CPP_SYMBIAN32_WSD__
    1.97 +# endif
    1.98 +
    1.99 +# ifndef __LOCALE_INITIALIZED
   1.100 +#  define __LOCALE_INITIALIZED
   1.101 +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   1.102 +// Global initializer object, to ensure initialization of locale subsystem.
   1.103 +static ios_base::_Loc_init _LocInit;
   1.104 +# endif
   1.105 +# endif
   1.106 +
   1.107 +# ifndef __IOS_BASE_INITIALIZED
   1.108 +#  define __IOS_BASE_INITIALIZED
   1.109 +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   1.110 +// Global initializer object, to ensure construction of static objects.
   1.111 +static ios_base::Init _IosInit;
   1.112 +# endif
   1.113 +# endif
   1.114 +
   1.115 +_STLP_END_NAMESPACE
   1.116 +
   1.117 +# elif defined ( _STLP_USE_NO_IOSTREAMS )
   1.118 +#  include <stl/_null_stream.h>
   1.119 +# else
   1.120 +
   1.121 +#  include <wrap_std/iostream>
   1.122 +
   1.123 +# endif /* STL_USE_NO_IOSTREAMS */
   1.124 +
   1.125 +# if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
   1.126 +#  include <stl/_epilog.h>
   1.127 +#  undef _STLP_OUTERMOST_HEADER_ID
   1.128 +# endif
   1.129 +
   1.130 +#endif /* _STLP_IOSTREAM */
   1.131 +
   1.132 +// Local Variables:
   1.133 +// mode:C++
   1.134 +// End: