STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
basic_streambuf< _Elem, _Traits > Class Template Reference
Inheritance diagram for basic_streambuf< _Elem, _Traits >:
basic_filebuf< _Elem, _Traits > basic_stringbuf< _Elem, _Traits, _Alloc > strstreambuf wbuffer_convert< _Codecvt, _Elem, _Traits >

Public Types

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 Member Functions

virtual __CLR_OR_THIS_CALL ~basic_streambuf () _NOEXCEPT
 
pos_type __CLR_OR_THIS_CALL pubseekoff (off_type _Off, ios_base::seekdir _Way, ios_base::openmode _Mode=ios_base::in|ios_base::out)
 
pos_type __CLR_OR_THIS_CALL pubseekpos (pos_type _Pos, ios_base::openmode _Mode=ios_base::in|ios_base::out)
 
_Myt *__CLR_OR_THIS_CALL pubsetbuf (_Elem *_Buffer, streamsize _Count)
 
locale __CLR_OR_THIS_CALL pubimbue (const locale &_Newlocale)
 
locale __CLR_OR_THIS_CALL getloc () const
 
streamsize __CLR_OR_THIS_CALL in_avail ()
 
int __CLR_OR_THIS_CALL pubsync ()
 
int_type __CLR_OR_THIS_CALL sbumpc ()
 
int_type __CLR_OR_THIS_CALL sgetc ()
 
streamsize __CLR_OR_THIS_CALL sgetn (_Elem *_Ptr, streamsize _Count)
 
int_type __CLR_OR_THIS_CALL snextc ()
 
int_type __CLR_OR_THIS_CALL sputbackc (_Elem _Ch)
 
int_type __CLR_OR_THIS_CALL sungetc ()
 
int_type __CLR_OR_THIS_CALL sputc (_Elem _Ch)
 
streamsize __CLR_OR_THIS_CALL sputn (const _Elem *_Ptr, streamsize _Count)
 
virtual void __CLR_OR_THIS_CALL _Lock ()
 
virtual void __CLR_OR_THIS_CALL _Unlock ()
 

Protected Member Functions

__CLR_OR_THIS_CALL basic_streambuf ()
 
__CLR_OR_THIS_CALL basic_streambuf (_Uninitialized)
 
__CLR_OR_THIS_CALL basic_streambuf (const _Myt &_Right)
 
_Myt &__CLR_OR_THIS_CALL operator= (const _Myt &_Right)
 
void __CLR_OR_THIS_CALL swap (_Myt &_Right)
 
_Elem *__CLR_OR_THIS_CALL eback () const
 
_Elem *__CLR_OR_THIS_CALL gptr () const
 
_Elem *__CLR_OR_THIS_CALL pbase () const
 
_Elem *__CLR_OR_THIS_CALL pptr () const
 
_Elem *__CLR_OR_THIS_CALL egptr () const
 
void __CLR_OR_THIS_CALL gbump (int _Off)
 
void __CLR_OR_THIS_CALL setg (_Elem *_First, _Elem *_Next, _Elem *_Last)
 
_Elem *__CLR_OR_THIS_CALL epptr () const
 
_Elem *__CLR_OR_THIS_CALL _Gndec ()
 
_Elem *__CLR_OR_THIS_CALL _Gninc ()
 
_Elem *__CLR_OR_THIS_CALL _Gnpreinc ()
 
streamsize __CLR_OR_THIS_CALL _Gnavail () const
 
void __CLR_OR_THIS_CALL pbump (int _Off)
 
void __CLR_OR_THIS_CALL setp (_Elem *_First, _Elem *_Last)
 
void __CLR_OR_THIS_CALL setp (_Elem *_First, _Elem *_Next, _Elem *_Last)
 
_Elem *__CLR_OR_THIS_CALL _Pninc ()
 
streamsize __CLR_OR_THIS_CALL _Pnavail () const
 
void __CLR_OR_THIS_CALL _Init ()
 
void __CLR_OR_THIS_CALL _Init (_Elem **_Gf, _Elem **_Gn, int *_Gc, _Elem **_Pf, _Elem **_Pn, int *_Pc)
 
virtual int_type __CLR_OR_THIS_CALL overflow (int_type=_Traits::eof())
 
virtual int_type __CLR_OR_THIS_CALL pbackfail (int_type=_Traits::eof())
 
virtual streamsize __CLR_OR_THIS_CALL showmanyc ()
 
virtual int_type __CLR_OR_THIS_CALL underflow ()
 
virtual int_type __CLR_OR_THIS_CALL uflow ()
 
virtual streamsize __CLR_OR_THIS_CALL xsgetn (_Elem *_Ptr, streamsize _Count)
 
virtual streamsize __CLR_OR_THIS_CALL xsputn (const _Elem *_Ptr, streamsize _Count)
 
virtual pos_type __CLR_OR_THIS_CALL seekoff (off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
 
virtual pos_type __CLR_OR_THIS_CALL seekpos (pos_type, ios_base::openmode=ios_base::in|ios_base::out)
 
virtual _Myt *__CLR_OR_THIS_CALL setbuf (_Elem *, streamsize)
 
virtual int __CLR_OR_THIS_CALL sync ()
 
virtual void __CLR_OR_THIS_CALL imbue (const locale &)
 

Protected Attributes

locale_Plocale
 

Private Types

typedef basic_streambuf< _Elem, _Traits > _Myt
 

Private Attributes

_Elem * _Gfirst
 
_Elem * _Pfirst
 
_Elem ** _IGfirst
 
_Elem ** _IPfirst
 
_Elem * _Gnext
 
_Elem * _Pnext
 
_Elem ** _IGnext
 
_Elem ** _IPnext
 
int _Gcount
 
int _Pcount
 
int_IGcount
 
int_IPcount
 

Member Typedef Documentation

template<class _Elem, class _Traits>
typedef basic_streambuf<_Elem, _Traits> basic_streambuf< _Elem, _Traits >::_Myt
private
template<class _Elem, class _Traits>
typedef _Elem basic_streambuf< _Elem, _Traits >::char_type
template<class _Elem, class _Traits>
typedef _Traits::int_type basic_streambuf< _Elem, _Traits >::int_type
template<class _Elem, class _Traits>
typedef _Traits::off_type basic_streambuf< _Elem, _Traits >::off_type
template<class _Elem, class _Traits>
typedef _Traits::pos_type basic_streambuf< _Elem, _Traits >::pos_type
template<class _Elem, class _Traits>
typedef _Traits basic_streambuf< _Elem, _Traits >::traits_type

Constructor & Destructor Documentation

template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::basic_streambuf ( )
inlineprotected
24  : _Plocale(new locale)
25  { // construct with no buffers
26  _Init();
27  }
Definition: xlocale:97
locale * _Plocale
Definition: streambuf:466
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:316
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::basic_streambuf ( _Uninitialized  )
inlineprotected
30  { // construct uninitialized
31  }
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::basic_streambuf ( const _Myt _Right)
inlineprotected
34  : _Plocale(new locale(_Right.getloc()))
35  { // construct by copying _Right
36  _Init();
37  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
38  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
39  }
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:250
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:291
Definition: xlocale:97
locale * _Plocale
Definition: streambuf:466
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:316
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::~basic_streambuf ( )
inlinevirtual
78  { // destroy the object
79  delete _Plocale;
80  }
locale * _Plocale
Definition: streambuf:466

Member Function Documentation

template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gnavail ( ) const
inlineprotected
281  { // count number of available elements in read buffer
282  return (*_IGnext != 0 ? *_IGcount : 0);
283  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gndec ( )
inlineprotected
263  { // decrement current position in read buffer
264  ++*_IGcount;
265  return (--*_IGnext);
266  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gninc ( )
inlineprotected
269  { // increment current position in read buffer
270  --*_IGcount;
271  return ((*_IGnext)++);
272  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gnpreinc ( )
inlineprotected
275  { // preincrement current position in read buffer
276  --*_IGcount;
277  return (++(*_IGnext));
278  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Init ( )
inlineprotected
317  { // initialize buffer parameters for no buffers
318  _IGfirst = &_Gfirst;
319  _IPfirst = &_Pfirst;
320  _IGnext = &_Gnext;
321  _IPnext = &_Pnext;
322  _IGcount = &_Gcount;
323  _IPcount = &_Pcount;
324  setp(0, 0);
325  setg(0, 0, 0);
326  }
_Elem * _Gfirst
Definition: streambuf:451
_Elem ** _IPfirst
Definition: streambuf:454
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:250
int _Pcount
Definition: streambuf:461
int _Gcount
Definition: streambuf:460
_Elem ** _IPnext
Definition: streambuf:458
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:291
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
_Elem ** _IGfirst
Definition: streambuf:453
_Elem * _Pfirst
Definition: streambuf:452
int * _IPcount
Definition: streambuf:463
_Elem * _Gnext
Definition: streambuf:455
_Elem * _Pnext
Definition: streambuf:456
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Init ( _Elem **  _Gf,
_Elem **  _Gn,
int _Gc,
_Elem **  _Pf,
_Elem **  _Pn,
int _Pc 
)
inlineprotected
330  { // initialize buffer parameters as specified
331  _IGfirst = _Gf;
332  _IPfirst = _Pf;
333  _IGnext = _Gn;
334  _IPnext = _Pn;
335  _IGcount = _Gc;
336  _IPcount = _Pc;
337  }
_Elem ** _IPfirst
Definition: streambuf:454
_Elem ** _IPnext
Definition: streambuf:458
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
_Elem ** _IGfirst
Definition: streambuf:453
int * _IPcount
Definition: streambuf:463
template<class _Elem, class _Traits>
virtual void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Lock ( )
inlinevirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

211  { // set the thread lock (overridden by basic_filebuf)
212  }
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Pnavail ( ) const
inlineprotected
312  { // count number of available positions in write buffer
313  return (*_IPnext != 0 ? *_IPcount : 0);
314  }
_Elem ** _IPnext
Definition: streambuf:458
int * _IPcount
Definition: streambuf:463
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Pninc ( )
inlineprotected
306  { // increment current position in write buffer
307  --*_IPcount;
308  return ((*_IPnext)++);
309  }
_Elem ** _IPnext
Definition: streambuf:458
int * _IPcount
Definition: streambuf:463
template<class _Elem, class _Traits>
virtual void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Unlock ( )
inlinevirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

215  { // clear the thread lock (overridden by basic_filebuf)
216  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::eback ( ) const
inlineprotected
220  { // return beginning of read buffer
221  return (*_IGfirst);
222  }
_Elem ** _IGfirst
Definition: streambuf:453
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::egptr ( ) const
inlineprotected
240  { // return end of read buffer
241  return (*_IGnext + *_IGcount);
242  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::epptr ( ) const
inlineprotected
258  { // return end of write buffer
259  return (*_IPnext + *_IPcount);
260  }
_Elem ** _IPnext
Definition: streambuf:458
int * _IPcount
Definition: streambuf:463
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gbump ( int  _Off)
inlineprotected
245  { // alter current position in read buffer by _Off
246  *_IGcount -= _Off;
247  *_IGnext += _Off;
248  }
_Elem ** _IGnext
Definition: streambuf:457
int * _IGcount
Definition: streambuf:462
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::getloc ( ) const
inline
132  { // get locale
133  return (*_Plocale);
134  }
locale * _Plocale
Definition: streambuf:466
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gptr ( ) const
inlineprotected
225  { // return current position in read buffer
226  return (*_IGnext);
227  }
_Elem ** _IGnext
Definition: streambuf:457
template<class _Elem, class _Traits>
virtual void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::imbue ( const locale )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

447  { // set locale to argument (do nothing)
448  }
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::in_avail ( )
inline
137  { // return count of buffered input characters
138  streamsize _Res = _Gnavail();
139  return (0 < _Res ? _Res : showmanyc());
140  }
long long streamsize
Definition: iosfwd:23
virtual streamsize __CLR_OR_THIS_CALL showmanyc()
Definition: streambuf:349
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:280
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::operator= ( const _Myt _Right)
inlineprotected
42  { // assign from _Right
43  if (this != _STD addressof(_Right))
44  { // different, worth copying
45  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
46  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
47  pubimbue(_Right.getloc());
48  }
49  return (*this);
50  }
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:250
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:291
locale __CLR_OR_THIS_CALL pubimbue(const locale &_Newlocale)
Definition: streambuf:123
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Elem, class _Traits>
virtual int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::overflow ( int_type  = _Traits::eof())
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, basic_stringbuf< _Elem, _Traits, _Alloc >, and wbuffer_convert< _Codecvt, _Elem, _Traits >.

340  { // put a character to stream (always fail)
341  return (_Traits::eof());
342  }
template<class _Elem, class _Traits>
virtual int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbackfail ( int_type  = _Traits::eof())
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, basic_stringbuf< _Elem, _Traits, _Alloc >, and wbuffer_convert< _Codecvt, _Elem, _Traits >.

345  { // put a character back to stream (always fail)
346  return (_Traits::eof());
347  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbase ( ) const
inlineprotected
230  { // return beginning of write buffer
231  return (*_IPfirst);
232  }
_Elem ** _IPfirst
Definition: streambuf:454
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbump ( int  _Off)
inlineprotected
286  { // alter current position in write buffer by _Off
287  *_IPcount -= _Off;
288  *_IPnext += _Off;
289  }
_Elem ** _IPnext
Definition: streambuf:458
int * _IPcount
Definition: streambuf:463
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pptr ( ) const
inlineprotected
235  { // return current position in write buffer
236  return (*_IPnext);
237  }
_Elem ** _IPnext
Definition: streambuf:458
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubimbue ( const locale _Newlocale)
inline
124  { // set locale to argument
125  locale _Oldlocale = *_Plocale;
126  imbue(_Newlocale);
127  *_Plocale = _Newlocale;
128  return (_Oldlocale);
129  }
virtual void __CLR_OR_THIS_CALL imbue(const locale &)
Definition: streambuf:446
Definition: xlocale:97
locale * _Plocale
Definition: streambuf:466
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubseekoff ( off_type  _Off,
ios_base::seekdir  _Way,
ios_base::openmode  _Mode = ios_base::in | ios_base::out 
)
inline
89  { // change position by _Off, according to _Way, _Mode
90  return (seekoff(_Off, _Way, _Mode));
91  }
virtual pos_type __CLR_OR_THIS_CALL seekoff(off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:423
_Check_return_ _In_z_ wchar_t const * _Mode
Definition: corecrt_wstdio.h:133
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubseekpos ( pos_type  _Pos,
ios_base::openmode  _Mode = ios_base::in | ios_base::out 
)
inline
105  { // change position to _Pos, according to _Mode
106  return (seekpos(_Pos, _Mode));
107  }
virtual pos_type __CLR_OR_THIS_CALL seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:430
_Check_return_ _In_z_ wchar_t const * _Mode
Definition: corecrt_wstdio.h:133
template<class _Elem, class _Traits>
_Myt* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsetbuf ( _Elem *  _Buffer,
streamsize  _Count 
)
inline
119  { // offer _Buffer to external agent
120  return (setbuf(_Buffer, _Count));
121  }
virtual _Myt *__CLR_OR_THIS_CALL setbuf(_Elem *, streamsize)
Definition: streambuf:436
_Check_return_wat_ *_SizeRead wchar_t * _Buffer
Definition: corecrt_wconio.h:27
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsync ( )
inline
143  { // synchronize with external agent
144  return (sync());
145  }
virtual int __CLR_OR_THIS_CALL sync()
Definition: streambuf:441
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sbumpc ( )
inline
148  { // get a character and point past it
149  return (0 < _Gnavail()
150  ? _Traits::to_int_type(*_Gninc()) : uflow());
151  }
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:359
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:268
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:280
template<class _Elem, class _Traits>
virtual pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::seekoff ( off_type  ,
ios_base::seekdir  ,
ios_base::openmode  = ios_base::in | ios_base::out 
)
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, and basic_stringbuf< _Elem, _Traits, _Alloc >.

426  { // change position by offset, according to way and mode
427  return (streampos(_BADOFF));
428  }
fpos< _Mbstatet > streampos
Definition: iosfwd:124
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
template<class _Elem, class _Traits>
virtual pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::seekpos ( pos_type  ,
ios_base::openmode  = ios_base::in | ios_base::out 
)
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, and basic_stringbuf< _Elem, _Traits, _Alloc >.

432  { // change to specified position, according to mode
433  return (streampos(_BADOFF));
434  }
fpos< _Mbstatet > streampos
Definition: iosfwd:124
_CRTDATA2 _PGLOBAL const streamoff _BADOFF
template<class _Elem, class _Traits>
virtual _Myt* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setbuf ( _Elem *  ,
streamsize   
)
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

437  { // offer buffer to external agent (do nothing)
438  return (this);
439  }
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setg ( _Elem *  _First,
_Elem *  _Next,
_Elem *  _Last 
)
inlineprotected
251  { // set pointers for read buffer
252  *_IGfirst = _First;
253  *_IGnext = _Next;
254  *_IGcount = (int)(_Last - _Next);
255  }
_Elem ** _IGnext
Definition: streambuf:457
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
int * _IGcount
Definition: streambuf:462
_Elem ** _IGfirst
Definition: streambuf:453
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setp ( _Elem *  _First,
_Elem *  _Last 
)
inlineprotected
292  { // set pointers for write buffer
293  *_IPfirst = _First;
294  *_IPnext = _First;
295  *_IPcount = (int)(_Last - _First);
296  }
_Elem ** _IPfirst
Definition: streambuf:454
_Elem ** _IPnext
Definition: streambuf:458
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
int * _IPcount
Definition: streambuf:463
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setp ( _Elem *  _First,
_Elem *  _Next,
_Elem *  _Last 
)
inlineprotected
299  { // set pointers for write buffer, extended version
300  *_IPfirst = _First;
301  *_IPnext = _Next;
302  *_IPcount = (int)(_Last - _Next);
303  }
_Elem ** _IPfirst
Definition: streambuf:454
_Elem ** _IPnext
Definition: streambuf:458
char int *typedef int(__CRTDECL *_CRT_REPORT_HOOKW)(int
Definition: crtdbg.h:45
int * _IPcount
Definition: streambuf:463
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetc ( )
inline
154  { // get a character and don't point past it
155  return (0 < _Gnavail()
156  ? _Traits::to_int_type(*gptr()) : underflow());
157  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:224
virtual int_type __CLR_OR_THIS_CALL underflow()
Definition: streambuf:354
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:280
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inline
161  { // get up to _Count characters into array beginning at _Ptr
162  return (xsgetn(_Ptr, _Count));
163  }
_Diff _Count
Definition: algorithm:1941
virtual streamsize __CLR_OR_THIS_CALL xsgetn(_Elem *_Ptr, streamsize _Count)
Definition: streambuf:365
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::showmanyc ( )
inlineprotectedvirtual
350  { // return count of input characters
351  return (0);
352  }
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::snextc ( )
inline
166  { // point to next character and return it
167  return (1 < _Gnavail()
168  ? _Traits::to_int_type(*_Gnpreinc())
169  : _Traits::eq_int_type(_Traits::eof(), sbumpc())
170  ? _Traits::eof() : sgetc());
171  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:153
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:147
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:280
_Elem *__CLR_OR_THIS_CALL _Gnpreinc()
Definition: streambuf:274
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputbackc ( _Elem  _Ch)
inline
174  { // put back _Ch
175  return (gptr() != 0 && eback() < gptr()
176  && _Traits::eq(_Ch, gptr()[-1])
177  ? _Traits::to_int_type(*_Gndec())
178  : pbackfail(_Traits::to_int_type(_Ch)));
179  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:224
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:262
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type=_Traits::eof())
Definition: streambuf:344
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:219
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputc ( _Elem  _Ch)
inline
198  { // put a character
199  return (0 < _Pnavail()
200  ? _Traits::to_int_type(*_Pninc() = _Ch)
201  : overflow(_Traits::to_int_type(_Ch)));
202  }
_Check_return_ _In_ wchar_t _Ch
Definition: vcruntime_string.h:89
virtual int_type __CLR_OR_THIS_CALL overflow(int_type=_Traits::eof())
Definition: streambuf:339
_Elem *__CLR_OR_THIS_CALL _Pninc()
Definition: streambuf:305
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:311
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inline
206  { // put _Count characters from array beginning at _Ptr
207  return (xsputn(_Ptr, _Count));
208  }
virtual streamsize __CLR_OR_THIS_CALL xsputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:394
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sungetc ( )
inline
192  { // back up one position
193  return (gptr() != 0 && eback() < gptr()
194  ? _Traits::to_int_type(*_Gndec()) : pbackfail());
195  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:224
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:262
virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type=_Traits::eof())
Definition: streambuf:344
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:219
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::swap ( _Myt _Right)
inlineprotected
53  { // swap with _Right
54  if (this != _STD addressof(_Right))
55  { // different, worth swapping
56  _Elem *_Pfirst0 = pbase();
57  _Elem *_Pnext0 = pptr();
58  _Elem *_Pend = epptr();
59  _Elem *_Gfirst0 = eback();
60  _Elem *_Gnext0 = gptr();
61  _Elem *_Gend = egptr();
62 
63  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
64  _Right.setp(_Pfirst0, _Pnext0, _Pend);
65 
66  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
67  _Right.setg(_Gfirst0, _Gnext0, _Gend);
68 
69  _STD swap(_Plocale, _Right._Plocale);
70  }
71  }
_Elem *__CLR_OR_THIS_CALL egptr() const
Definition: streambuf:239
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:250
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:224
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: streambuf:52
_Elem *__CLR_OR_THIS_CALL epptr() const
Definition: streambuf:257
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:234
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:291
locale * _Plocale
Definition: streambuf:466
_Elem *__CLR_OR_THIS_CALL pbase() const
Definition: streambuf:229
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:219
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Elem, class _Traits>
virtual int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sync ( )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

442  { // synchronize with external agent (do nothing)
443  return (0);
444  }
template<class _Elem, class _Traits>
virtual int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::uflow ( )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, and wbuffer_convert< _Codecvt, _Elem, _Traits >.

360  { // get a character from stream, point past it
361  return (_Traits::eq_int_type(_Traits::eof(), underflow())
362  ? _Traits::eof() : _Traits::to_int_type(*_Gninc()));
363  }
virtual int_type __CLR_OR_THIS_CALL underflow()
Definition: streambuf:354
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:268
template<class _Elem, class _Traits>
virtual int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::underflow ( )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >, strstreambuf, basic_stringbuf< _Elem, _Traits, _Alloc >, and wbuffer_convert< _Codecvt, _Elem, _Traits >.

355  { // get a character from stream, but don't point past it
356  return (_Traits::eof());
357  }
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
367  { // get _Count characters from stream
368  int_type _Meta;
369  streamsize _Size, _Copied;
370 
371  for (_Copied = 0; 0 < _Count; )
372  if (0 < (_Size = _Gnavail()))
373  { // copy from read buffer
374  if (_Count < _Size)
375  _Size = _Count;
376  _Traits::copy(_Ptr, gptr(), (size_t)_Size);
377  _Ptr += _Size;
378  _Copied += _Size;
379  _Count -= _Size;
380  gbump((int)_Size);
381  }
382  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = uflow()))
383  break; // end of file, quit
384  else
385  { // get a single character
386  *_Ptr++ = _Traits::to_char_type(_Meta);
387  ++_Copied;
388  --_Count;
389  }
390 
391  return (_Copied);
392  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2347
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:224
long long streamsize
Definition: iosfwd:23
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
_Traits::int_type int_type
Definition: streambuf:82
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:359
void __CLR_OR_THIS_CALL gbump(int _Off)
Definition: streambuf:244
_Diff _Count
Definition: algorithm:1941
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:280
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
396  { // put _Count characters to stream
397  streamsize _Size, _Copied;
398 
399  for (_Copied = 0; 0 < _Count; )
400  if (0 < (_Size = _Pnavail()))
401  { // copy to write buffer
402  if (_Count < _Size)
403  _Size = _Count;
404  _Traits::copy(pptr(), _Ptr, (size_t)_Size);
405  _Ptr += _Size;
406  _Copied += _Size;
407  _Count -= _Size;
408  pbump((int)_Size);
409  }
410  else if (_Traits::eq_int_type(_Traits::eof(),
411  overflow(_Traits::to_int_type(*_Ptr))))
412  break; // single character put failed, quit
413  else
414  { // count character successfully put
415  ++_Ptr;
416  ++_Copied;
417  --_Count;
418  }
419 
420  return (_Copied);
421  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2347
void __CLR_OR_THIS_CALL pbump(int _Off)
Definition: streambuf:285
long long streamsize
Definition: iosfwd:23
_CRT_BEGIN_C_HEADER _Check_return_ _Ret_maybenull_ _In_ size_t _Size
Definition: corecrt_malloc.h:58
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:234
virtual int_type __CLR_OR_THIS_CALL overflow(int_type=_Traits::eof())
Definition: streambuf:339
_Diff _Count
Definition: algorithm:1941
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:311

Member Data Documentation

template<class _Elem, class _Traits>
int basic_streambuf< _Elem, _Traits >::_Gcount
private
template<class _Elem, class _Traits>
_Elem* basic_streambuf< _Elem, _Traits >::_Gfirst
private
template<class _Elem, class _Traits>
_Elem* basic_streambuf< _Elem, _Traits >::_Gnext
private
template<class _Elem, class _Traits>
int* basic_streambuf< _Elem, _Traits >::_IGcount
private
template<class _Elem, class _Traits>
_Elem** basic_streambuf< _Elem, _Traits >::_IGfirst
private
template<class _Elem, class _Traits>
_Elem** basic_streambuf< _Elem, _Traits >::_IGnext
private
template<class _Elem, class _Traits>
int* basic_streambuf< _Elem, _Traits >::_IPcount
private
template<class _Elem, class _Traits>
_Elem** basic_streambuf< _Elem, _Traits >::_IPfirst
private
template<class _Elem, class _Traits>
_Elem** basic_streambuf< _Elem, _Traits >::_IPnext
private
template<class _Elem, class _Traits>
int basic_streambuf< _Elem, _Traits >::_Pcount
private
template<class _Elem, class _Traits>
_Elem* basic_streambuf< _Elem, _Traits >::_Pfirst
private
template<class _Elem, class _Traits>
locale* basic_streambuf< _Elem, _Traits >::_Plocale
protected
template<class _Elem, class _Traits>
_Elem* basic_streambuf< _Elem, _Traits >::_Pnext
private

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