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
25  : _Plocale(new locale)
26  { // construct with no buffers
27  _Init();
28  }
Definition: xlocale:98
locale * _Plocale
Definition: streambuf:467
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:317
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::basic_streambuf ( _Uninitialized  )
inlineprotected
31  { // construct uninitialized
32  }
template<class _Elem, class _Traits>
__CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::basic_streambuf ( const _Myt _Right)
inlineprotected
35  : _Plocale(new locale(_Right.getloc()))
36  { // construct by copying _Right
37  _Init();
38  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
39  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
40  }
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:251
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:292
Definition: xlocale:98
locale * _Plocale
Definition: streambuf:467
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:317
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::~basic_streambuf ( )
inlinevirtual
79  { // destroy the object
80  delete _Plocale;
81  }
locale * _Plocale
Definition: streambuf:467

Member Function Documentation

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

Reimplemented in basic_filebuf< _Elem, _Traits >.

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

Reimplemented in basic_filebuf< _Elem, _Traits >.

216  { // clear the thread lock (overridden by basic_filebuf)
217  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::eback ( ) const
inlineprotected
221  { // return beginning of read buffer
222  return (*_IGfirst);
223  }
_Elem ** _IGfirst
Definition: streambuf:454
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::egptr ( ) const
inlineprotected
241  { // return end of read buffer
242  return (*_IGnext + *_IGcount);
243  }
_Elem ** _IGnext
Definition: streambuf:458
int * _IGcount
Definition: streambuf:463
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::epptr ( ) const
inlineprotected
259  { // return end of write buffer
260  return (*_IPnext + *_IPcount);
261  }
_Elem ** _IPnext
Definition: streambuf:459
int * _IPcount
Definition: streambuf:464
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gbump ( int  _Off)
inlineprotected
246  { // alter current position in read buffer by _Off
247  *_IGcount -= _Off;
248  *_IGnext += _Off;
249  }
_Elem ** _IGnext
Definition: streambuf:458
int * _IGcount
Definition: streambuf:463
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::getloc ( ) const
inline
133  { // get locale
134  return (*_Plocale);
135  }
locale * _Plocale
Definition: streambuf:467
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gptr ( ) const
inlineprotected
226  { // return current position in read buffer
227  return (*_IGnext);
228  }
_Elem ** _IGnext
Definition: streambuf:458
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 >.

448  { // set locale to argument (do nothing)
449  }
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::in_avail ( )
inline
138  { // return count of buffered input characters
139  streamsize _Res = _Gnavail();
140  return (0 < _Res ? _Res : showmanyc());
141  }
_Longlong streamsize
Definition: iosfwd:22
virtual streamsize __CLR_OR_THIS_CALL showmanyc()
Definition: streambuf:350
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:281
template<class _Elem, class _Traits>
_Myt& __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::operator= ( const _Myt _Right)
inlineprotected
43  { // assign from _Right
44  if (this != &_Right)
45  { // different, worth copying
46  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
47  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
48  pubimbue(_Right.getloc());
49  }
50  return (*this);
51  }
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:251
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:292
locale __CLR_OR_THIS_CALL pubimbue(const locale &_Newlocale)
Definition: streambuf:124
constexpr const _Ty &() _Right
Definition: algorithm:3591
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 >.

341  { // put a character to stream (always fail)
342  return (_Traits::eof());
343  }
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 >.

346  { // put a character back to stream (always fail)
347  return (_Traits::eof());
348  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbase ( ) const
inlineprotected
231  { // return beginning of write buffer
232  return (*_IPfirst);
233  }
_Elem ** _IPfirst
Definition: streambuf:455
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbump ( int  _Off)
inlineprotected
287  { // alter current position in write buffer by _Off
288  *_IPcount -= _Off;
289  *_IPnext += _Off;
290  }
_Elem ** _IPnext
Definition: streambuf:459
int * _IPcount
Definition: streambuf:464
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pptr ( ) const
inlineprotected
236  { // return current position in write buffer
237  return (*_IPnext);
238  }
_Elem ** _IPnext
Definition: streambuf:459
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubimbue ( const locale _Newlocale)
inline
125  { // set locale to argument
126  locale _Oldlocale = *_Plocale;
127  imbue(_Newlocale);
128  *_Plocale = _Newlocale;
129  return (_Oldlocale);
130  }
virtual void __CLR_OR_THIS_CALL imbue(const locale &)
Definition: streambuf:447
Definition: xlocale:98
locale * _Plocale
Definition: streambuf:467
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
90  { // change position by _Off, according to _Way, _Mode
91  return (seekoff(_Off, _Way, _Mode));
92  }
virtual pos_type __CLR_OR_THIS_CALL seekoff(off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:424
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
106  { // change position to _Pos, according to _Mode
107  return (seekpos(_Pos, _Mode));
108  }
virtual pos_type __CLR_OR_THIS_CALL seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:431
template<class _Elem, class _Traits>
_Myt* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsetbuf ( _Elem *  _Buffer,
streamsize  _Count 
)
inline
120  { // offer _Buffer to external agent
121  return (setbuf(_Buffer, _Count));
122  }
virtual _Myt *__CLR_OR_THIS_CALL setbuf(_Elem *, streamsize)
Definition: streambuf:437
unsigned int _Count
Definition: xcomplex:668
template<class _Elem, class _Traits>
int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsync ( )
inline
144  { // synchronize with external agent
145  return (sync());
146  }
virtual int __CLR_OR_THIS_CALL sync()
Definition: streambuf:442
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sbumpc ( )
inline
149  { // get a character and point past it
150  return (0 < _Gnavail()
151  ? _Traits::to_int_type(*_Gninc()) : uflow());
152  }
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:360
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:269
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:281
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 >.

427  { // change position by offset, according to way and mode
428  return (streampos(_BADOFF));
429  }
fpos< _Mbstatet > streampos
Definition: iosfwd:126
_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 >.

433  { // change to specified position, according to mode
434  return (streampos(_BADOFF));
435  }
fpos< _Mbstatet > streampos
Definition: iosfwd:126
_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 >.

438  { // offer buffer to external agent (do nothing)
439  return (this);
440  }
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setg ( _Elem *  _First,
_Elem *  _Next,
_Elem *  _Last 
)
inlineprotected
252  { // set pointers for read buffer
253  *_IGfirst = _First;
254  *_IGnext = _Next;
255  *_IGcount = (int)(_Last - _Next);
256  }
unsigned int
Definition: vccorlib.h:2468
_Elem ** _IGnext
Definition: streambuf:458
int * _IGcount
Definition: streambuf:463
_Elem ** _IGfirst
Definition: streambuf:454
_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
293  { // set pointers for write buffer
294  *_IPfirst = _First;
295  *_IPnext = _First;
296  *_IPcount = (int)(_Last - _First);
297  }
_Elem ** _IPfirst
Definition: streambuf:455
_Elem ** _IPnext
Definition: streambuf:459
unsigned int
Definition: vccorlib.h:2468
int * _IPcount
Definition: streambuf:464
_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
300  { // set pointers for write buffer, extended version
301  *_IPfirst = _First;
302  *_IPnext = _Next;
303  *_IPcount = (int)(_Last - _Next);
304  }
_Elem ** _IPfirst
Definition: streambuf:455
_Elem ** _IPnext
Definition: streambuf:459
unsigned int
Definition: vccorlib.h:2468
int * _IPcount
Definition: streambuf:464
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetc ( )
inline
155  { // get a character and don't point past it
156  return (0 < _Gnavail()
157  ? _Traits::to_int_type(*gptr()) : underflow());
158  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:225
virtual int_type __CLR_OR_THIS_CALL underflow()
Definition: streambuf:355
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:281
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inline
162  { // get up to _Count characters into array beginning at _Ptr
163  return (xsgetn(_Ptr, _Count));
164  }
unsigned int _Count
Definition: xcomplex:668
virtual streamsize __CLR_OR_THIS_CALL xsgetn(_Elem *_Ptr, streamsize _Count)
Definition: streambuf:366
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::showmanyc ( )
inlineprotectedvirtual
351  { // return count of input characters
352  return (0);
353  }
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::snextc ( )
inline
167  { // point to next character and return it
168  return (1 < _Gnavail()
169  ? _Traits::to_int_type(*_Gnpreinc())
170  : _Traits::eq_int_type(_Traits::eof(), sbumpc())
171  ? _Traits::eof() : sgetc());
172  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:154
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:148
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:281
_Elem *__CLR_OR_THIS_CALL _Gnpreinc()
Definition: streambuf:275
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputbackc ( _Elem  _Ch)
inline
175  { // put back _Ch
176  return (gptr() != 0 && eback() < gptr()
177  && _Traits::eq(_Ch, gptr()[-1])
178  ? _Traits::to_int_type(*_Gndec())
179  : pbackfail(_Traits::to_int_type(_Ch)));
180  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:225
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:263
_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:345
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:220
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputc ( _Elem  _Ch)
inline
199  { // put a character
200  return (0 < _Pnavail()
201  ? _Traits::to_int_type(*_Pninc() = _Ch)
202  : overflow(_Traits::to_int_type(_Ch)));
203  }
_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:340
_Elem *__CLR_OR_THIS_CALL _Pninc()
Definition: streambuf:306
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:312
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inline
207  { // put _Count characters from array beginning at _Ptr
208  return (xsputn(_Ptr, _Count));
209  }
unsigned int _Count
Definition: xcomplex:668
virtual streamsize __CLR_OR_THIS_CALL xsputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:395
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sungetc ( )
inline
193  { // back up one position
194  return (gptr() != 0 && eback() < gptr()
195  ? _Traits::to_int_type(*_Gndec()) : pbackfail());
196  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:225
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:263
virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type=_Traits::eof())
Definition: streambuf:345
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:220
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::swap ( _Myt _Right)
inlineprotected
54  { // swap with _Right
55  if (this != &_Right)
56  { // different, worth swapping
57  _Elem *_Pfirst0 = pbase();
58  _Elem *_Pnext0 = pptr();
59  _Elem *_Pend = epptr();
60  _Elem *_Gfirst0 = eback();
61  _Elem *_Gnext0 = gptr();
62  _Elem *_Gend = egptr();
63 
64  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
65  _Right.setp(_Pfirst0, _Pnext0, _Pend);
66 
67  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
68  _Right.setg(_Gfirst0, _Gnext0, _Gend);
69 
70  _STD swap(_Plocale, _Right._Plocale);
71  }
72  }
_Elem *__CLR_OR_THIS_CALL egptr() const
Definition: streambuf:240
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:251
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:225
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: streambuf:53
_Elem *__CLR_OR_THIS_CALL epptr() const
Definition: streambuf:258
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:235
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:292
locale * _Plocale
Definition: streambuf:467
_Elem *__CLR_OR_THIS_CALL pbase() const
Definition: streambuf:230
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:220
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Elem, class _Traits>
virtual int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sync ( )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

443  { // synchronize with external agent (do nothing)
444  return (0);
445  }
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 >.

361  { // get a character from stream, point past it
362  return (_Traits::eq_int_type(_Traits::eof(), underflow())
363  ? _Traits::eof() : _Traits::to_int_type(*_Gninc()));
364  }
virtual int_type __CLR_OR_THIS_CALL underflow()
Definition: streambuf:355
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:269
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 >.

356  { // get a character from stream, but don't point past it
357  return (_Traits::eof());
358  }
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
368  { // get _Count characters from stream
369  int_type _Meta;
370  streamsize _Size, _Copied;
371 
372  for (_Copied = 0; 0 < _Count; )
373  if (0 < (_Size = _Gnavail()))
374  { // copy from read buffer
375  if (_Count < _Size)
376  _Size = _Count;
377  _Traits::copy(_Ptr, gptr(), (size_t)_Size);
378  _Ptr += _Size;
379  _Copied += _Size;
380  _Count -= _Size;
381  gbump((int)_Size);
382  }
383  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = uflow()))
384  break; // end of file, quit
385  else
386  { // get a single character
387  *_Ptr++ = _Traits::to_char_type(_Meta);
388  ++_Copied;
389  --_Count;
390  }
391 
392  return (_Copied);
393  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2369
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:225
_Longlong streamsize
Definition: iosfwd:22
unsigned int _Count
Definition: xcomplex:668
_Traits::int_type int_type
Definition: streambuf:83
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:360
void __CLR_OR_THIS_CALL gbump(int _Off)
Definition: streambuf:245
_Size
Definition: vcruntime_string.h:36
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:281
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
397  { // put _Count characters to stream
398  streamsize _Size, _Copied;
399 
400  for (_Copied = 0; 0 < _Count; )
401  if (0 < (_Size = _Pnavail()))
402  { // copy to write buffer
403  if (_Count < _Size)
404  _Size = _Count;
405  _Traits::copy(pptr(), _Ptr, (size_t)_Size);
406  _Ptr += _Size;
407  _Copied += _Size;
408  _Count -= _Size;
409  pbump((int)_Size);
410  }
411  else if (_Traits::eq_int_type(_Traits::eof(),
412  overflow(_Traits::to_int_type(*_Ptr))))
413  break; // single character put failed, quit
414  else
415  { // count character successfully put
416  ++_Ptr;
417  ++_Copied;
418  --_Count;
419  }
420 
421  return (_Copied);
422  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2369
_Longlong streamsize
Definition: iosfwd:22
unsigned int _Count
Definition: xcomplex:668
void __CLR_OR_THIS_CALL pbump(int _Off)
Definition: streambuf:286
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:235
virtual int_type __CLR_OR_THIS_CALL overflow(int_type=_Traits::eof())
Definition: streambuf:340
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:312
_Size
Definition: vcruntime_string.h:36

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: