epoc32/include/stdapis/stlport/iostream.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*
     2  * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     3  *
     4  * Copyright (c) 1999 
     5  * Boris Fomitchev
     6  *
     7  * This material is provided "as is", with absolutely no warranty expressed
     8  * or implied. Any use is at your own risk.
     9  *
    10  * Permission to use or copy this software for any purpose is hereby granted 
    11  * without fee, provided the above notices are retained on all copies.
    12  * Permission to modify the code and to distribute modified code is granted,
    13  * provided the above notices are retained, and a notice that the code was
    14  * modified is included with the above copyright notice.
    15  *
    16  */
    17 
    18 #ifndef _STLP_IOSTREAM_H
    19 # define _STLP_IOSTREAM_H
    20 
    21 # ifndef _STLP_OUTERMOST_HEADER_ID
    22 #  define _STLP_OUTERMOST_HEADER_ID 0x2035
    23 #  include <stl/_prolog.h>
    24 # endif
    25 
    26 # ifdef _STLP_OWN_IOSTREAMS
    27 
    28 #ifdef __BORLANDC__
    29 # include <iostream.>
    30 #else
    31 # include <iostream>
    32 #endif
    33 
    34 // Those should be included all separately, as they do contain using declarations
    35 # include <streambuf.h>
    36 # include <ostream.h>
    37 # include <istream.h>
    38 
    39 # ifndef _STLP_HAS_NO_NAMESPACES
    40 
    41 #  ifdef _STLP_BROKEN_USING_DIRECTIVE
    42 using namespace _STLP_STD;
    43 #  else
    44 #ifndef __SYMBIAN32__
    45 using _STLP_STD::cin;
    46 using _STLP_STD::cout;
    47 using _STLP_STD::clog;
    48 using _STLP_STD::cerr;
    49 using _STLP_STD::iostream;
    50 
    51 #   ifndef _STLP_NO_WCHAR_T
    52 using _STLP_STD::wcin;
    53 using _STLP_STD::wcout;
    54 using _STLP_STD::wclog;
    55 using _STLP_STD::wcerr;
    56 #   endif
    57 #endif //__SYMBIAN32__
    58 #  endif
    59 
    60 # endif /* _STLP_HAS_NO_NAMESPACES */
    61 
    62 // Obsolete classes for old-style backwards compatibility
    63 
    64 
    65 class istream_withassign : public istream {
    66  public:
    67   istream_withassign() : istream((streambuf*)0) {}
    68   ~istream_withassign() {}
    69   
    70   istream_withassign& operator=(istream& __s) { 
    71     ios::init(__s.rdbuf()); 
    72     return *this; 
    73   }
    74   istream_withassign& operator=(streambuf* __s) {
    75     ios::init(__s); 
    76     return *this; 
    77   }
    78 };
    79 
    80 class ostream_withassign : public ostream {
    81  public:
    82   ostream_withassign() : ostream((streambuf*)0) {}
    83   ~ostream_withassign() {}
    84   
    85   ostream_withassign& operator=(ostream& __s) { 
    86     ios::init(__s.rdbuf()); 
    87     return *this; 
    88   }
    89   ostream_withassign& operator=(streambuf* __s) { 
    90     ios::init(__s); 
    91     return *this; 
    92   }
    93 };
    94 
    95 class iostream_withassign : public iostream {
    96  public:
    97   iostream_withassign() : iostream((streambuf*)0) {}
    98   ~iostream_withassign() {}
    99   iostream_withassign & operator=(ios& __i) {
   100     ios::init(__i.rdbuf());
   101     return *this; 
   102   }
   103   iostream_withassign & operator=(streambuf* __s) {
   104     ios::init(__s); 
   105     return *this; 
   106   }
   107 } ;
   108 
   109 # elif ! defined (_STLP_USE_NO_IOSTREAMS)
   110 #  include <wrap_std/h/iostream.h>
   111 # endif
   112 
   113 # if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
   114 #  include <stl/_epilog.h>
   115 #  undef _STLP_OUTERMOST_HEADER_ID
   116 # endif
   117 
   118 #endif /* _STLP_IOSTREAM_H */
   119 
   120 // Local Variables:
   121 // mode:C++
   122 // End: