epoc32/include/stdapis/stlportv5/stl/_ostreambuf_iterator.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/stlportv5/stl/_ostreambuf_iterator.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/stlportv5/stl/_ostreambuf_iterator.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -2,19 +2,19 @@
     1.4   * Copyright (c) 1999
     1.5   * Silicon Graphics Computer Systems, Inc.
     1.6   *
     1.7 - * Copyright (c) 1999 
     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 + * Permission to use or copy this software for any purpose is hereby granted
    1.16   * without fee, provided the above notices are retained on all copies.
    1.17   * Permission to modify the code and to distribute modified code is granted,
    1.18   * provided the above notices are retained, and a notice that the code was
    1.19   * modified is included with the above copyright notice.
    1.20   *
    1.21 - */ 
    1.22 + */
    1.23  // WARNING: This is an internal header file, included by other C++
    1.24  // standard library headers.  You should not attempt to use this header
    1.25  // file directly.
    1.26 @@ -29,13 +29,17 @@
    1.27  
    1.28  _STLP_BEGIN_NAMESPACE
    1.29  
    1.30 -template <class _CharT, class _Traits>
    1.31 -extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_ostreambuf(basic_ostream<_CharT, _Traits>& ) ;
    1.32 +_STLP_MOVE_TO_PRIV_NAMESPACE
    1.33 +
    1.34 +template<class _CharT, class _Traits>
    1.35 +extern basic_streambuf<_CharT, _Traits>* _STLP_CALL __get_ostreambuf(basic_ostream<_CharT, _Traits>&);
    1.36 +
    1.37 +_STLP_MOVE_TO_STD_NAMESPACE
    1.38  
    1.39  // The default template argument is declared in iosfwd
    1.40 -template<class _CharT, class _Traits>
    1.41 -class ostreambuf_iterator
    1.42 -{
    1.43 +template <class _CharT, class _Traits>
    1.44 +class ostreambuf_iterator :
    1.45 +  public iterator<output_iterator_tag, void, void, void, void> {
    1.46  public:
    1.47    typedef _CharT                           char_type;
    1.48    typedef _Traits                          traits_type;
    1.49 @@ -51,15 +55,15 @@
    1.50  
    1.51  public:
    1.52    ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {}
    1.53 -  //  ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
    1.54 +  //  ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(__get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
    1.55    inline ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW;
    1.56  
    1.57    ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) {
    1.58      _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
    1.59                                                 traits_type::eof());
    1.60      return *this;
    1.61 -  }    
    1.62 -  
    1.63 +  }
    1.64 +
    1.65    ostreambuf_iterator<_CharT, _Traits>& operator*()     { return *this; }
    1.66    ostreambuf_iterator<_CharT, _Traits>& operator++()    { return *this; }
    1.67    ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; }
    1.68 @@ -72,20 +76,21 @@
    1.69  };
    1.70  
    1.71  template <class _CharT, class _Traits>
    1.72 -inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
    1.73 +inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW
    1.74 +  : _M_buf(_STLP_PRIV __get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
    1.75  
    1.76 -# if defined (_STLP_USE_TEMPLATE_EXPORT)
    1.77 +#if defined (_STLP_USE_TEMPLATE_EXPORT)
    1.78  _STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<char, char_traits<char> >;
    1.79  #  if defined (INSTANTIATE_WIDE_STREAMS)
    1.80  _STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<wchar_t, char_traits<wchar_t> >;
    1.81  #  endif
    1.82 -# endif /* _STLP_USE_TEMPLATE_EXPORT */
    1.83 +#endif /* _STLP_USE_TEMPLATE_EXPORT */
    1.84  
    1.85 -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
    1.86 +#if defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
    1.87  template <class _CharT, class _Traits>
    1.88 -inline output_iterator_tag _STLP_CALL 
    1.89 +inline output_iterator_tag _STLP_CALL
    1.90  iterator_category(const ostreambuf_iterator<_CharT, _Traits>&) { return output_iterator_tag(); }
    1.91 -# endif
    1.92 +#endif
    1.93  
    1.94  _STLP_END_NAMESPACE
    1.95