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