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