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