STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
basic_ostream< _Elem, _Traits > Class Template Reference
Inheritance diagram for basic_ostream< _Elem, _Traits >:
basic_ios< _Elem, _Traits > ios_base _Iosb< int > basic_iostream< _Elem, _Traits > basic_ofstream< _Elem, _Traits > basic_ostringstream< _Elem, _Traits, _Alloc > ostrstream basic_fstream< _Elem, _Traits > basic_stringstream< _Elem, _Traits, _Alloc > strstream

Classes

class  _Sentry_base
 
class  sentry
 

Public Types

typedef basic_ostream< _Elem, _Traits > _Myt
 
typedef basic_ios< _Elem, _Traits > _Myios
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef ostreambuf_iterator< _Elem, _Traits > _Iter
 
typedef num_put< _Elem, _Iter_Nput
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from basic_ios< _Elem, _Traits >
typedef basic_ios< _Elem, _Traits > _Myt
 
typedef basic_ostream< _Elem, _Traits > _Myos
 
typedef basic_streambuf< _Elem, _Traits > _Mysb
 
typedef ctype< _Elem > _Ctype
 
typedef _Elem char_type
 
typedef _Traits traits_type
 
typedef _Traits::int_type int_type
 
typedef _Traits::pos_type pos_type
 
typedef _Traits::off_type off_type
 
- Public Types inherited from ios_base
enum  event { erase_event, imbue_event, copyfmt_event }
 
typedef _STD streamoff streamoff
 
typedef _STD streampos streampos
 
typedef void(__CLRCALL_OR_CDECLevent_callback) (event, ios_base &, int)
 
typedef unsigned int io_state
 
typedef unsigned int open_mode
 
typedef unsigned int seek_dir
 
- Public Types inherited from _Iosb< int >
enum  _Dummy_enum
 
enum  _Fmtflags
 
enum  _Iostate
 
enum  _Openmode
 
enum  _Seekdir
 
enum  
 

Public Member Functions

__CLR_OR_THIS_CALL basic_ostream (basic_streambuf< _Elem, _Traits > *_Strbuf, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_ostream (_Uninitialized, bool _Addit=true)
 
__CLR_OR_THIS_CALL basic_ostream (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
virtual __CLR_OR_THIS_CALL ~basic_ostream () _NOEXCEPT
 
bool __CLR_OR_THIS_CALL opfx ()
 
void __CLR_OR_THIS_CALL osfx ()
 
void __CLR_OR_THIS_CALL _Osfx ()
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Myt &(__cdecl *_Pfn)(_Myt &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Myios &(__cdecl *_Pfn)(_Myios &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (ios_base &(__cdecl *_Pfn)(ios_base &))
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Bool _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (short _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned short _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (int _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned int _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (long _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (unsigned long _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (float _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (double _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (long double _Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (const void *_Val)
 
_Myt &__CLR_OR_THIS_CALL operator<< (_Mysb *_Strbuf)
 
_Myt &__CLR_OR_THIS_CALL put (_Elem _Ch)
 
_Myt &__CLR_OR_THIS_CALL write (const _Elem *_Str, streamsize _Count)
 
_Myt &__CLR_OR_THIS_CALL flush ()
 
_Myt &__CLR_OR_THIS_CALL seekp (pos_type _Pos)
 
_Myt &__CLR_OR_THIS_CALL seekp (off_type _Off, ios_base::seekdir _Way)
 
pos_type __CLR_OR_THIS_CALL tellp ()
 
template<>
basic_ostream< unsigned short, char_traits< unsigned short > > &__CLR_OR_THIS_CALL operator<< (unsigned short _Ch)
 
- Public Member Functions inherited from basic_ios< _Elem, _Traits >
__CLR_OR_THIS_CALL basic_ios (_Mysb *_Strbuf)
 
virtual __CLR_OR_THIS_CALL ~basic_ios () _NOEXCEPT
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL clear (io_state _State)
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Reraise=false)
 
void __CLR_OR_THIS_CALL setstate (io_state _State)
 
_Myt &__CLR_OR_THIS_CALL copyfmt (const _Myt &_Right)
 
_Myos *__CLR_OR_THIS_CALL tie () const
 
_Myos *__CLR_OR_THIS_CALL tie (_Myos *_Newtie)
 
_Mysb *__CLR_OR_THIS_CALL rdbuf () const
 
_Mysb *__CLR_OR_THIS_CALL rdbuf (_Mysb *_Strbuf)
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
_Elem __CLR_OR_THIS_CALL fill () const
 
_Elem __CLR_OR_THIS_CALL fill (_Elem _Newfill)
 
char __CLR_OR_THIS_CALL narrow (_Elem _Ch, char _Dflt= '\0') const
 
_Elem __CLR_OR_THIS_CALL widen (char _Byte) const
 
void __CLR_OR_THIS_CALL move (_Myt &_Right)
 
void __CLR_OR_THIS_CALL move (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right) _NOEXCEPT
 
void __CLR_OR_THIS_CALL set_rdbuf (_Mysb *_Strbuf)
 
__CLR_OR_THIS_CALL basic_ios (const _Myt &)=delete
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &)=delete
 
- Public Member Functions inherited from ios_base
 _BITMASK (_Fmtflags, fmtflags)
 
 _BITMASK (_Iostate, iostate)
 
 _BITMASK (_Openmode, openmode)
 
 _BITMASK (_Seekdir, seekdir)
 
__CLR_OR_THIS_CALL operator bool () const
 
bool __CLR_OR_THIS_CALL operator! () const
 
void __CLR_OR_THIS_CALL clear (iostate _State, bool _Reraise)
 
void __CLR_OR_THIS_CALL clear (iostate _State=goodbit)
 
void __CLR_OR_THIS_CALL clear (io_state _State)
 
iostate __CLR_OR_THIS_CALL rdstate () const
 
void __CLR_OR_THIS_CALL setstate (iostate _State, bool _Exreraise)
 
void __CLR_OR_THIS_CALL setstate (iostate _State)
 
void __CLR_OR_THIS_CALL setstate (io_state _State)
 
bool __CLR_OR_THIS_CALL good () const
 
bool __CLR_OR_THIS_CALL eof () const
 
bool __CLR_OR_THIS_CALL fail () const
 
bool __CLR_OR_THIS_CALL bad () const
 
iostate __CLR_OR_THIS_CALL exceptions () const
 
void __CLR_OR_THIS_CALL exceptions (iostate _Newexcept)
 
void __CLR_OR_THIS_CALL exceptions (io_state _State)
 
fmtflags __CLR_OR_THIS_CALL flags () const
 
fmtflags __CLR_OR_THIS_CALL flags (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags)
 
fmtflags __CLR_OR_THIS_CALL setf (fmtflags _Newfmtflags, fmtflags _Mask)
 
void __CLR_OR_THIS_CALL unsetf (fmtflags _Mask)
 
streamsize __CLR_OR_THIS_CALL precision () const
 
streamsize __CLR_OR_THIS_CALL precision (streamsize _Newprecision)
 
streamsize __CLR_OR_THIS_CALL width () const
 
streamsize __CLR_OR_THIS_CALL width (streamsize _Newwidth)
 
locale __CLR_OR_THIS_CALL getloc () const
 
locale __CLR_OR_THIS_CALL imbue (const locale &_Loc)
 
long &__CLR_OR_THIS_CALL iword (int _Idx)
 
void *&__CLR_OR_THIS_CALL pword (int _Idx)
 
void __CLR_OR_THIS_CALL register_callback (event_callback _Pfn, int _Idx)
 
ios_base &__CLR_OR_THIS_CALL copyfmt (const ios_base &_Other)
 
void __CLR_OR_THIS_CALL swap (ios_base &_Right)
 
virtual __CLR_OR_THIS_CALL ~ios_base () _NOEXCEPT
 
 ios_base (const ios_base &)=delete
 
ios_baseoperator= (const ios_base &)=delete
 

Protected Member Functions

__CLR_OR_THIS_CALL basic_ostream (_Myt &&_Right)
 
_Myt &__CLR_OR_THIS_CALL operator= (_Myt &&_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right)
 
- Protected Member Functions inherited from basic_ios< _Elem, _Traits >
void __CLR_OR_THIS_CALL init (_Mysb *_Strbuf=0, bool _Isstd=false)
 
__CLR_OR_THIS_CALL basic_ios ()
 
- Protected Member Functions inherited from ios_base
__CLR_OR_THIS_CALL ios_base ()
 
void __CLR_OR_THIS_CALL _Init ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ios_base
static int __CLRCALL_OR_CDECL xalloc ()
 
static bool __CLRCALL_OR_CDECL sync_with_stdio (bool _Newsync=true)
 
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL _Addstd (ios_base *)
 
- Public Attributes inherited from ios_base
size_t _Stdstr
 
- Static Public Attributes inherited from _Iosb< int >
static const _Fmtflags skipws
 
static const _Fmtflags unitbuf
 
static const _Fmtflags uppercase
 
static const _Fmtflags showbase
 
static const _Fmtflags showpoint
 
static const _Fmtflags showpos
 
static const _Fmtflags left
 
static const _Fmtflags right
 
static const _Fmtflags internal
 
static const _Fmtflags dec
 
static const _Fmtflags oct
 
static const _Fmtflags hex
 
static const _Fmtflags scientific
 
static const _Fmtflags fixed
 
static const _Fmtflags hexfloat
 
static const _Fmtflags boolalpha
 
static const _Fmtflags _Stdio
 
static const _Fmtflags adjustfield
 
static const _Fmtflags basefield
 
static const _Fmtflags floatfield
 
static const _Iostate goodbit
 
static const _Iostate eofbit
 
static const _Iostate failbit
 
static const _Iostate badbit
 
static const _Iostate _Hardfail
 
static const _Openmode in
 
static const _Openmode out
 
static const _Openmode ate
 
static const _Openmode app
 
static const _Openmode trunc
 
static const _Openmode _Nocreate
 
static const _Openmode _Noreplace
 
static const _Openmode binary
 
static const _Seekdir beg
 
static const _Seekdir cur
 
static const _Seekdir end
 

Member Typedef Documentation

template<class _Elem, class _Traits>
typedef ostreambuf_iterator<_Elem, _Traits> basic_ostream< _Elem, _Traits >::_Iter
template<class _Elem, class _Traits>
typedef basic_ios<_Elem, _Traits> basic_ostream< _Elem, _Traits >::_Myios
template<class _Elem, class _Traits>
typedef basic_streambuf<_Elem, _Traits> basic_ostream< _Elem, _Traits >::_Mysb
template<class _Elem, class _Traits>
typedef basic_ostream<_Elem, _Traits> basic_ostream< _Elem, _Traits >::_Myt
template<class _Elem, class _Traits>
typedef num_put<_Elem, _Iter> basic_ostream< _Elem, _Traits >::_Nput
template<class _Elem, class _Traits>
typedef _Traits::int_type basic_ostream< _Elem, _Traits >::int_type
template<class _Elem, class _Traits>
typedef _Traits::off_type basic_ostream< _Elem, _Traits >::off_type
template<class _Elem, class _Traits>
typedef _Traits::pos_type basic_ostream< _Elem, _Traits >::pos_type

Constructor & Destructor Documentation

template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::basic_ostream ( basic_streambuf< _Elem, _Traits > *  _Strbuf,
bool  _Isstd = false 
)
inlineexplicit
54  { // construct from a stream buffer pointer
55  _Myios::init(_Strbuf, _Isstd);
56  }
void __CLR_OR_THIS_CALL init(_Mysb *_Strbuf=0, bool _Isstd=false)
Definition: ios:164
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::basic_ostream ( _Uninitialized  ,
bool  _Addit = true 
)
inline
59  { // construct uninitialized
60  if (_Addit)
61  this->_Addstd(this); // suppress for basic_iostream
62  }
static _MRTIMP2_PURE_NPURE void __CLRCALL_PURE_OR_CDECL _Addstd(ios_base *)
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::basic_ostream ( _Myt &&  _Right)
inlineprotected
66  { // construct by moving _Right
67  _Myios::init();
69  }
void __CLR_OR_THIS_CALL init(_Mysb *_Strbuf=0, bool _Isstd=false)
Definition: ios:164
void __CLR_OR_THIS_CALL move(_Myt &_Right)
Definition: ios:131
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::basic_ostream ( const _Myt )
delete
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::~basic_ostream ( )
inlinevirtual
88  { // destroy the object
89  }

Member Function Documentation

template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::_Osfx ( )
inline
166  { // perform any wrapup
167  _TRY_BEGIN
168  if (this->good() && this->flags() & ios_base::unitbuf)
169  if (_Myios::rdbuf()->pubsync() == -1) // flush stream as needed
171  _CATCH_ALL
172  _CATCH_END
173  }
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
bool __CLR_OR_THIS_CALL good() const
Definition: xiosbase:328
static const _Fmtflags unitbuf
Definition: xiosbase:57
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:365
#define _CATCH_ALL
Definition: xstddef:62
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::flush ( )
inline
581  { // flush output stream
582  if (_Myios::rdbuf() != 0)
583  { // buffer exists, flush it
584  const sentry _Ok(*this);
585 
586  if (_Ok && _Myios::rdbuf()->pubsync() == -1)
587  _Myios::setstate(ios_base::badbit); // sync failed
588  }
589  return (*this);
590  }
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( _Myt __cdecl *_Pfn)(_Myt &)
inline
198  { // call basic_ostream manipulator
199  _DEBUG_POINTER(_Pfn);
200  return ((*_Pfn)(*this));
201  }
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( _Myios __cdecl *_Pfn)(_Myios &)
inline
204  { // call basic_ios manipulator
205  _DEBUG_POINTER(_Pfn);
206  (*_Pfn)(*(_Myios *)this);
207  return (*this);
208  }
#define _DEBUG_POINTER(first)
Definition: xutility:465
basic_ios< _Elem, _Traits > _Myios
Definition: ostream:45
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( ios_base __cdecl *_Pfn)(ios_base &)
inline
211  { // call ios_base manipulator
212  _DEBUG_POINTER(_Pfn);
213  (*_Pfn)(*(ios_base *)this);
214  return (*this);
215  }
Definition: xiosbase:199
#define _DEBUG_POINTER(first)
Definition: xutility:465
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( _Bool  _Val)
inline
218  { // insert a boolean
219  ios_base::iostate _State = ios_base::goodbit;
220  const sentry _Ok(*this);
221 
222  if (_Ok)
223  { // state okay, use facet to insert
224  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
225 
227  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
228  _Myios::fill(), _Val).failed())
229  _State |= ios_base::badbit;
231  }
232 
233  _Myios::setstate(_State);
234  return (*this);
235  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( short  _Val)
inline
238  { // insert a short
239  ios_base::iostate _State = ios_base::goodbit;
240  const sentry _Ok(*this);
241 
242  if (_Ok)
243  { // state okay, use facet to insert
244  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
245  ios_base::fmtflags _Bfl =
246  this->flags() & ios_base::basefield;
247  long _Tmp = (_Bfl == ios_base::oct
248  || _Bfl == ios_base::hex)
249  ? (long)(unsigned short)_Val : (long)_Val;
250 
252  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
253  _Myios::fill(), _Tmp).failed())
254  _State |= ios_base::badbit;
256  }
257 
258  _Myios::setstate(_State);
259  return (*this);
260  }
static const _Fmtflags hex
Definition: xiosbase:67
static const _Fmtflags basefield
Definition: xiosbase:78
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
static const _Fmtflags oct
Definition: xiosbase:66
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:365
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( unsigned short  _Val)
inline
272  { // insert an unsigned short
273  ios_base::iostate _State = ios_base::goodbit;
274  const sentry _Ok(*this);
275 
276  if (_Ok)
277  { // state okay, use facet to insert
278  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
279 
281  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
282  _Myios::fill(), (unsigned long)_Val).failed())
283  _State |= ios_base::badbit;
285  }
286 
287  _Myios::setstate(_State);
288  return (*this);
289  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( int  _Val)
inline
292  { // insert an int
293  ios_base::iostate _State = ios_base::goodbit;
294  const sentry _Ok(*this);
295 
296  if (_Ok)
297  { // state okay, use facet to insert
298  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
299  ios_base::fmtflags _Bfl =
300  this->flags() & ios_base::basefield;
301  long _Tmp = (_Bfl == ios_base::oct
302  || _Bfl == ios_base::hex)
303  ? (long)(unsigned int)_Val : (long)_Val;
304 
306  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
307  _Myios::fill(), _Tmp).failed())
308  _State |= ios_base::badbit;
310  }
311 
312  _Myios::setstate(_State);
313  return (*this);
314  }
static const _Fmtflags hex
Definition: xiosbase:67
static const _Fmtflags basefield
Definition: xiosbase:78
#define _USE(loc, fac)
Definition: xlocale:555
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
#define _TRY_IO_BEGIN
Definition: ostream:30
static const _Fmtflags oct
Definition: xiosbase:66
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:365
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( unsigned int  _Val)
inline
317  { // insert an unsigned int
318  ios_base::iostate _State = ios_base::goodbit;
319  const sentry _Ok(*this);
320 
321  if (_Ok)
322  { // state okay, use facet to insert
323  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
324 
326  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
327  _Myios::fill(), (unsigned long)_Val).failed())
328  _State |= ios_base::badbit;
330  }
331 
332  _Myios::setstate(_State);
333  return (*this);
334  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( long  _Val)
inline
337  { // insert a long
338  ios_base::iostate _State = ios_base::goodbit;
339  const sentry _Ok(*this);
340 
341  if (_Ok)
342  { // state okay, use facet to insert
343  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
344 
346  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
347  _Myios::fill(), _Val).failed())
348  _State |= ios_base::badbit;
350  }
351 
352  _Myios::setstate(_State);
353  return (*this);
354  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( unsigned long  _Val)
inline
357  { // insert an unsigned long
358  ios_base::iostate _State = ios_base::goodbit;
359  const sentry _Ok(*this);
360 
361  if (_Ok)
362  { // state okay, use facet to insert
363  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
364 
366  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
367  _Myios::fill(), _Val).failed())
368  _State |= ios_base::badbit;
370  }
371 
372  _Myios::setstate(_State);
373  return (*this);
374  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( float  _Val)
inline
419  { // insert a float
420  ios_base::iostate _State = ios_base::goodbit;
421  const sentry _Ok(*this);
422 
423  if (_Ok)
424  { // state okay, use facet to insert
425  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
426 
428  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
429  _Myios::fill(), (double)_Val).failed())
430  _State |= ios_base::badbit;
432  }
433 
434  _Myios::setstate(_State);
435  return (*this);
436  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( double  _Val)
inline
439  { // insert a double
440  ios_base::iostate _State = ios_base::goodbit;
441  const sentry _Ok(*this);
442 
443  if (_Ok)
444  { // state okay, use facet to insert
445  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
446 
448  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
449  _Myios::fill(), _Val).failed())
450  _State |= ios_base::badbit;
452  }
453 
454  _Myios::setstate(_State);
455  return (*this);
456  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( long double  _Val)
inline
459  { // insert a long double
460  ios_base::iostate _State = ios_base::goodbit;
461  const sentry _Ok(*this);
462 
463  if (_Ok)
464  { // state okay, use facet to insert
465  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
466 
468  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
469  _Myios::fill(), _Val).failed())
470  _State |= ios_base::badbit;
472  }
473 
474  _Myios::setstate(_State);
475  return (*this);
476  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( const void _Val)
inline
479  { // insert a void pointer
480  ios_base::iostate _State = ios_base::goodbit;
481  const sentry _Ok(*this);
482 
483  if (_Ok)
484  { // state okay, use facet to insert
485  const _Nput& _Nput_fac = _USE(this->getloc(), _Nput);
486 
488  if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this,
489  _Myios::fill(), _Val).failed())
490  _State |= ios_base::badbit;
492  }
493 
494  _Myios::setstate(_State);
495  return (*this);
496  }
#define _USE(loc, fac)
Definition: xlocale:555
#define _TRY_IO_BEGIN
Definition: ostream:30
ostreambuf_iterator< _Elem, _Traits > _Iter
Definition: ostream:47
locale __CLR_OR_THIS_CALL getloc() const
Definition: xiosbase:422
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
num_put< _Elem, _Iter > _Nput
Definition: ostream:48
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
_FwdIt const _Ty _Val
Definition: algorithm:1938
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator<< ( _Mysb _Strbuf)
inline
499  { // insert until end-of-file from a stream buffer
500  ios_base::iostate _State = ios_base::goodbit;
501  bool _Copied = false;
502  const sentry _Ok(*this);
503 
504  if (_Ok && _Strbuf != 0)
505  for (int_type _Meta = _Traits::eof(); ; _Copied = true)
506  { // extract another character from stream buffer
507  _TRY_BEGIN
508  _Meta = _Traits::eq_int_type(_Traits::eof(), _Meta)
509  ? _Strbuf->sgetc() : _Strbuf->snextc();
510  _CATCH_ALL
512  _RERAISE;
513  _CATCH_END
514 
515  if (_Traits::eq_int_type(_Traits::eof(), _Meta))
516  break; // end of file, quit
517 
519  if (_Traits::eq_int_type(_Traits::eof(),
520  _Myios::rdbuf()->sputc(
521  _Traits::to_char_type(_Meta))))
522  { // insertion failed, quit
523  _State |= ios_base::badbit;
524  break;
525  }
527  }
528 
529  this->width(0);
530  _Myios::setstate(_Strbuf == 0 ? ios_base::badbit
531  : !_Copied ? _State | ios_base::failbit : _State);
532  return (*this);
533  }
static const _Iostate failbit
Definition: xiosbase:89
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH_END
Definition: xstddef:63
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
streamsize __CLR_OR_THIS_CALL width() const
Definition: xiosbase:410
_Traits::int_type int_type
Definition: ostream:91
#define _CATCH_ALL
Definition: xstddef:62
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
#define _RERAISE
Definition: xstddef:74
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<>
basic_ostream< unsigned short, char_traits< unsigned short > > &__CLR_OR_THIS_CALL basic_ostream< unsigned short, char_traits< unsigned short > >::operator<< ( unsigned short  _Ch)
inline
643  { // extract a character
644  typedef char_traits<unsigned short> _Traits;
645 
646  ios_base::iostate _State = ios_base::goodbit;
647  const sentry _Ok(*this);
648 
649  if (_Ok)
650  { // state okay, insert
651  streamsize _Pad = this->width() <= 1 ? 0 : this->width() - 1;
652 
654  if ((this->flags() & ios_base::adjustfield) != ios_base::left)
655  for (; _State == ios_base::goodbit && 0 < _Pad;
656  --_Pad) // pad on left
657  if (_Traits::eq_int_type(_Traits::eof(),
658  this->rdbuf()->sputc(this->fill())))
659  _State |= ios_base::badbit;
660 
661  if (_State == ios_base::goodbit
662  && _Traits::eq_int_type(_Traits::eof(),
663  this->rdbuf()->sputc(_Ch)))
664  _State |= ios_base::badbit;
665 
666  for (; _State == ios_base::goodbit && 0 < _Pad;
667  --_Pad) // pad on right
668  if (_Traits::eq_int_type(_Traits::eof(),
669  this->rdbuf()->sputc(this->fill())))
670  _State |= ios_base::badbit;
672  }
673 
674  this->width(0);
675  _Myios::setstate(_State);
676  return (*this);
677  }
_Longlong streamsize
Definition: iosfwd:22
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Elem __CLR_OR_THIS_CALL fill() const
Definition: ios:107
fmtflags __CLR_OR_THIS_CALL flags() const
Definition: xiosbase:365
streamsize __CLR_OR_THIS_CALL width() const
Definition: xiosbase:410
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
Definition: iosfwd:260
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
static const _Fmtflags adjustfield
Definition: xiosbase:76
Definition: xthread:159
static const _Fmtflags left
Definition: xiosbase:62
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator= ( _Myt &&  _Right)
inlineprotected
72  { // move from _Right
73  this->swap(_Right);
74  return (*this);
75  }
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: ostream:77
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::operator= ( const _Myt )
delete
template<class _Elem, class _Traits>
bool __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::opfx ( )
inline
154  { // test stream state and flush tie stream as needed (retained)
155  if (this->good() && _Myios::tie() != 0 && _Myios::tie() != this)
156  _Myios::tie()->flush();
157  return (this->good());
158  }
_Myt &__CLR_OR_THIS_CALL flush()
Definition: ostream:580
bool __CLR_OR_THIS_CALL good() const
Definition: xiosbase:328
_Myos *__CLR_OR_THIS_CALL tie() const
Definition: ios:74
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::osfx ( )
inline
161  { // perform any wrapup (retained)
162  _Osfx();
163  }
void __CLR_OR_THIS_CALL _Osfx()
Definition: ostream:165
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::put ( _Elem  _Ch)
inline
536  { // insert a character
537  ios_base::iostate _State = ios_base::goodbit;
538  const sentry _Ok(*this);
539 
540  if (!_Ok)
541  _State |= ios_base::badbit;
542  else
543  { // state okay, insert character
545  if (_Traits::eq_int_type(_Traits::eof(),
546  _Myios::rdbuf()->sputc(_Ch)))
547  _State |= ios_base::badbit;
549  }
550 
551  _Myios::setstate(_State);
552  return (*this);
553  }
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::seekp ( pos_type  _Pos)
inline
593  { // set output stream position to _Pos
594  const sentry _Ok(*this);
595 
596  if (!this->fail()
597  && (off_type)_Myios::rdbuf()->pubseekpos(_Pos,
600  return (*this);
601  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Traits::off_type off_type
Definition: ostream:93
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::seekp ( off_type  _Off,
ios_base::seekdir  _Way 
)
inline
604  { // change output stream position by _Off, according to _Way
605  const sentry _Ok(*this);
606 
607  if (!this->fail()
608  && (off_type)_Myios::rdbuf()->pubseekoff(_Off, _Way,
611  return (*this);
612  }
static const _Openmode out
Definition: xiosbase:98
static const _Iostate failbit
Definition: xiosbase:89
_Traits::off_type off_type
Definition: ostream:93
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::swap ( _Myt _Right)
inlineprotected
78  { // swap with _Right
79  if (this != &_Right)
81  }
void __CLR_OR_THIS_CALL swap(_Myt &_Right) _NOEXCEPT
Definition: ios:151
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::tellp ( )
inline
615  { // return output stream position
616  const sentry _Ok(*this);
617 
618  if (!this->fail())
619  return (_Myios::rdbuf()->pubseekoff(0,
621  else
622  return (pos_type(_BADOFF));
623  }
static const _Seekdir cur
Definition: xiosbase:111
static const _Openmode out
Definition: xiosbase:98
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
_Traits::pos_type pos_type
Definition: ostream:92
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
bool __CLR_OR_THIS_CALL fail() const
Definition: xiosbase:338
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_ostream< _Elem, _Traits >::write ( const _Elem *  _Str,
streamsize  _Count 
)
inline
557  { // insert _Count characters from array _Str
558  #if _ITERATOR_DEBUG_LEVEL == 2
559  if (0 < _Count)
560  _DEBUG_POINTER(_Str);
561  #endif /* _ITERATOR_DEBUG_LEVEL == 2 */
562 
563  ios_base::iostate _State = ios_base::goodbit;
564  const sentry _Ok(*this);
565 
566  if (!_Ok)
567  _State |= ios_base::badbit;
568  else
569  { // state okay, insert characters
571  if (_Myios::rdbuf()->sputn(_Str, _Count) != _Count)
572  _State |= ios_base::badbit;
574  }
575 
576  _Myios::setstate(_State);
577  return (*this);
578  }
#define _TRY_IO_BEGIN
Definition: ostream:30
_Mysb *__CLR_OR_THIS_CALL rdbuf() const
Definition: ios:86
#define _DEBUG_POINTER(first)
Definition: xutility:465
static const _Iostate goodbit
Definition: xiosbase:87
#define _CATCH_IO_END
Definition: ostream:31
_Diff _Count
Definition: algorithm:1941
static const _Iostate badbit
Definition: xiosbase:90
void __CLR_OR_THIS_CALL setstate(iostate _State, bool _Reraise=false)
Definition: ios:54

The documentation for this class was generated from the following files: