epoc32/include/stdapis/stlport/iostream.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/iostream.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/iostream.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,122 @@
     1.4 -iostream.h
     1.5 +/*
     1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.7 + *
     1.8 + * Copyright (c) 1999 
     1.9 + * Boris Fomitchev
    1.10 + *
    1.11 + * This material is provided "as is", with absolutely no warranty expressed
    1.12 + * or implied. Any use is at your own risk.
    1.13 + *
    1.14 + * Permission to use or copy this software for any purpose is hereby granted 
    1.15 + * without fee, provided the above notices are retained on all copies.
    1.16 + * Permission to modify the code and to distribute modified code is granted,
    1.17 + * provided the above notices are retained, and a notice that the code was
    1.18 + * modified is included with the above copyright notice.
    1.19 + *
    1.20 + */
    1.21 +
    1.22 +#ifndef _STLP_IOSTREAM_H
    1.23 +# define _STLP_IOSTREAM_H
    1.24 +
    1.25 +# ifndef _STLP_OUTERMOST_HEADER_ID
    1.26 +#  define _STLP_OUTERMOST_HEADER_ID 0x2035
    1.27 +#  include <stl/_prolog.h>
    1.28 +# endif
    1.29 +
    1.30 +# ifdef _STLP_OWN_IOSTREAMS
    1.31 +
    1.32 +#ifdef __BORLANDC__
    1.33 +# include <iostream.>
    1.34 +#else
    1.35 +# include <iostream>
    1.36 +#endif
    1.37 +
    1.38 +// Those should be included all separately, as they do contain using declarations
    1.39 +# include <streambuf.h>
    1.40 +# include <ostream.h>
    1.41 +# include <istream.h>
    1.42 +
    1.43 +# ifndef _STLP_HAS_NO_NAMESPACES
    1.44 +
    1.45 +#  ifdef _STLP_BROKEN_USING_DIRECTIVE
    1.46 +using namespace _STLP_STD;
    1.47 +#  else
    1.48 +#ifndef __SYMBIAN32__
    1.49 +using _STLP_STD::cin;
    1.50 +using _STLP_STD::cout;
    1.51 +using _STLP_STD::clog;
    1.52 +using _STLP_STD::cerr;
    1.53 +using _STLP_STD::iostream;
    1.54 +
    1.55 +#   ifndef _STLP_NO_WCHAR_T
    1.56 +using _STLP_STD::wcin;
    1.57 +using _STLP_STD::wcout;
    1.58 +using _STLP_STD::wclog;
    1.59 +using _STLP_STD::wcerr;
    1.60 +#   endif
    1.61 +#endif //__SYMBIAN32__
    1.62 +#  endif
    1.63 +
    1.64 +# endif /* _STLP_HAS_NO_NAMESPACES */
    1.65 +
    1.66 +// Obsolete classes for old-style backwards compatibility
    1.67 +
    1.68 +
    1.69 +class istream_withassign : public istream {
    1.70 + public:
    1.71 +  istream_withassign() : istream((streambuf*)0) {}
    1.72 +  ~istream_withassign() {}
    1.73 +  
    1.74 +  istream_withassign& operator=(istream& __s) { 
    1.75 +    ios::init(__s.rdbuf()); 
    1.76 +    return *this; 
    1.77 +  }
    1.78 +  istream_withassign& operator=(streambuf* __s) {
    1.79 +    ios::init(__s); 
    1.80 +    return *this; 
    1.81 +  }
    1.82 +};
    1.83 +
    1.84 +class ostream_withassign : public ostream {
    1.85 + public:
    1.86 +  ostream_withassign() : ostream((streambuf*)0) {}
    1.87 +  ~ostream_withassign() {}
    1.88 +  
    1.89 +  ostream_withassign& operator=(ostream& __s) { 
    1.90 +    ios::init(__s.rdbuf()); 
    1.91 +    return *this; 
    1.92 +  }
    1.93 +  ostream_withassign& operator=(streambuf* __s) { 
    1.94 +    ios::init(__s); 
    1.95 +    return *this; 
    1.96 +  }
    1.97 +};
    1.98 +
    1.99 +class iostream_withassign : public iostream {
   1.100 + public:
   1.101 +  iostream_withassign() : iostream((streambuf*)0) {}
   1.102 +  ~iostream_withassign() {}
   1.103 +  iostream_withassign & operator=(ios& __i) {
   1.104 +    ios::init(__i.rdbuf());
   1.105 +    return *this; 
   1.106 +  }
   1.107 +  iostream_withassign & operator=(streambuf* __s) {
   1.108 +    ios::init(__s); 
   1.109 +    return *this; 
   1.110 +  }
   1.111 +} ;
   1.112 +
   1.113 +# elif ! defined (_STLP_USE_NO_IOSTREAMS)
   1.114 +#  include <wrap_std/h/iostream.h>
   1.115 +# endif
   1.116 +
   1.117 +# if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
   1.118 +#  include <stl/_epilog.h>
   1.119 +#  undef _STLP_OUTERMOST_HEADER_ID
   1.120 +# endif
   1.121 +
   1.122 +#endif /* _STLP_IOSTREAM_H */
   1.123 +
   1.124 +// Local Variables:
   1.125 +// mode:C++
   1.126 +// End: