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 pubseekoff (off_type _Off, ios_base::seek_dir _Way, ios_base::open_mode _Mode)
 
pos_type __CLR_OR_THIS_CALL pubseekpos (pos_type _Pos, ios_base::openmode _Mode=ios_base::in|ios_base::out)
 
pos_type __CLR_OR_THIS_CALL pubseekpos (pos_type _Pos, ios_base::open_mode _Mode)
 
_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)
 
void __CLR_OR_THIS_CALL stossc ()
 
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
26  { // construct with no buffers
27  _Init();
28  }
#define _NEW_CRT
Definition: xdebug:69
Definition: xlocale:62
locale * _Plocale
Definition: streambuf:461
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:311
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_CRT 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:245
#define _NEW_CRT
Definition: xdebug:69
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:286
Definition: xlocale:62
locale * _Plocale
Definition: streambuf:461
void __CLR_OR_THIS_CALL _Init()
Definition: streambuf:311
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
virtual __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::~basic_streambuf ( )
inlinevirtual
79  { // destroy the object
81  }
#define _DELETE_CRT(ptr)
Definition: xdebug:70
locale * _Plocale
Definition: streambuf:461

Member Function Documentation

template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gnavail ( ) const
inlineprotected
276  { // count number of available elements in read buffer
277  return (*_IGnext != 0 ? *_IGcount : 0);
278  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gndec ( )
inlineprotected
258  { // decrement current position in read buffer
259  ++*_IGcount;
260  return (--*_IGnext);
261  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gninc ( )
inlineprotected
264  { // increment current position in read buffer
265  --*_IGcount;
266  return ((*_IGnext)++);
267  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Gnpreinc ( )
inlineprotected
270  { // preincrement current position in read buffer
271  --*_IGcount;
272  return (++(*_IGnext));
273  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Init ( )
inlineprotected
312  { // initialize buffer parameters for no buffers
313  _IGfirst = &_Gfirst;
314  _IPfirst = &_Pfirst;
315  _IGnext = &_Gnext;
316  _IPnext = &_Pnext;
317  _IGcount = &_Gcount;
318  _IPcount = &_Pcount;
319  setp(0, 0);
320  setg(0, 0, 0);
321  }
_Elem * _Gfirst
Definition: streambuf:446
_Elem ** _IPfirst
Definition: streambuf:449
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:245
int _Pcount
Definition: streambuf:456
int _Gcount
Definition: streambuf:455
_Elem ** _IPnext
Definition: streambuf:453
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:286
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
_Elem ** _IGfirst
Definition: streambuf:448
_Elem * _Pfirst
Definition: streambuf:447
int * _IPcount
Definition: streambuf:458
_Elem * _Gnext
Definition: streambuf:450
_Elem * _Pnext
Definition: streambuf:451
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
325  { // initialize buffer parameters as specified
326  _IGfirst = _Gf;
327  _IPfirst = _Pf;
328  _IGnext = _Gn;
329  _IPnext = _Pn;
330  _IGcount = _Gc;
331  _IPcount = _Pc;
332  }
_Elem ** _IPfirst
Definition: streambuf:449
_Elem ** _IPnext
Definition: streambuf:453
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
_Elem ** _IGfirst
Definition: streambuf:448
int * _IPcount
Definition: streambuf:458
template<class _Elem, class _Traits>
virtual void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::_Lock ( )
inlinevirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

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

Reimplemented in basic_filebuf< _Elem, _Traits >.

210  { // clear the thread lock (overridden by basic_filebuf)
211  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::eback ( ) const
inlineprotected
215  { // return beginning of read buffer
216  return (*_IGfirst);
217  }
_Elem ** _IGfirst
Definition: streambuf:448
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::egptr ( ) const
inlineprotected
235  { // return end of read buffer
236  return (*_IGnext + *_IGcount);
237  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::epptr ( ) const
inlineprotected
253  { // return end of write buffer
254  return (*_IPnext + *_IPcount);
255  }
_Elem ** _IPnext
Definition: streambuf:453
int * _IPcount
Definition: streambuf:458
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gbump ( int  _Off)
inlineprotected
240  { // alter current position in read buffer by _Off
241  *_IGcount -= _Off;
242  *_IGnext += _Off;
243  }
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::getloc ( ) const
inline
129  { // get locale
130  return (*_Plocale);
131  }
locale * _Plocale
Definition: streambuf:461
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::gptr ( ) const
inlineprotected
220  { // return current position in read buffer
221  return (*_IGnext);
222  }
_Elem ** _IGnext
Definition: streambuf:452
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 >.

442  { // set locale to argument (do nothing)
443  }
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::in_avail ( )
inline
134  { // return count of buffered input characters
135  streamsize _Res = _Gnavail();
136  return (0 < _Res ? _Res : showmanyc());
137  }
_Longlong streamsize
Definition: iosfwd:22
virtual streamsize __CLR_OR_THIS_CALL showmanyc()
Definition: streambuf:344
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
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:245
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:286
locale __CLR_OR_THIS_CALL pubimbue(const locale &_Newlocale)
Definition: streambuf:120
const _Ty & _Right
Definition: algorithm:4087
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 >, wbuffer_convert< _Codecvt, _Elem, _Traits >, and basic_stringbuf< _Elem, _Traits, _Alloc >.

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

340  { // put a character back to stream (always fail)
341  return (_Traits::eof());
342  }
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbase ( ) const
inlineprotected
225  { // return beginning of write buffer
226  return (*_IPfirst);
227  }
_Elem ** _IPfirst
Definition: streambuf:449
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pbump ( int  _Off)
inlineprotected
281  { // alter current position in write buffer by _Off
282  *_IPcount -= _Off;
283  *_IPnext += _Off;
284  }
_Elem ** _IPnext
Definition: streambuf:453
int * _IPcount
Definition: streambuf:458
template<class _Elem, class _Traits>
_Elem* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pptr ( ) const
inlineprotected
230  { // return current position in write buffer
231  return (*_IPnext);
232  }
_Elem ** _IPnext
Definition: streambuf:453
template<class _Elem, class _Traits>
locale __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubimbue ( const locale _Newlocale)
inline
121  { // set locale to argument
122  locale _Oldlocale = *_Plocale;
123  imbue(_Newlocale);
124  *_Plocale = _Newlocale;
125  return (_Oldlocale);
126  }
virtual void __CLR_OR_THIS_CALL imbue(const locale &)
Definition: streambuf:441
Definition: xlocale:62
locale * _Plocale
Definition: streambuf:461
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  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
virtual pos_type __CLR_OR_THIS_CALL seekoff(off_type, ios_base::seekdir, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:418
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubseekoff ( off_type  _Off,
ios_base::seek_dir  _Way,
ios_base::open_mode  _Mode 
)
inline
97  { // change position by _Off, according to _Way, _Mode (old style)
98  return (pubseekoff(_Off, (ios_base::seekdir)_Way,
99  (ios_base::openmode)_Mode));
100  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
pos_type __CLR_OR_THIS_CALL pubseekoff(off_type _Off, ios_base::seekdir _Way, ios_base::openmode _Mode=ios_base::in|ios_base::out)
Definition: streambuf:87
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
104  { // change position to _Pos, according to _Mode
105  return (seekpos(_Pos, _Mode));
106  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
virtual pos_type __CLR_OR_THIS_CALL seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:425
template<class _Elem, class _Traits>
pos_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubseekpos ( pos_type  _Pos,
ios_base::open_mode  _Mode 
)
inline
110  { // change position to _Pos, according to _Mode (old style)
111  return (seekpos(_Pos, (ios_base::openmode)_Mode));
112  }
_Check_return_ _In_ int _Mode
Definition: io.h:338
virtual pos_type __CLR_OR_THIS_CALL seekpos(pos_type, ios_base::openmode=ios_base::in|ios_base::out)
Definition: streambuf:425
template<class _Elem, class _Traits>
_Myt* __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsetbuf ( _Elem *  _Buffer,
streamsize  _Count 
)
inline
116  { // offer _Buffer to external agent
117  return (setbuf(_Buffer, _Count));
118  }
virtual _Myt *__CLR_OR_THIS_CALL setbuf(_Elem *, streamsize)
Definition: streambuf:431
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::pubsync ( )
inline
140  { // synchronize with external agent
141  return (sync());
142  }
virtual int __CLR_OR_THIS_CALL sync()
Definition: streambuf:436
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sbumpc ( )
inline
145  { // get a character and point past it
146  return (0 < _Gnavail()
147  ? _Traits::to_int_type(*_Gninc()) : uflow());
148  }
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:354
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:263
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
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 >.

421  { // change position by offset, according to way and mode
422  return (streampos(_BADOFF));
423  }
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 >.

427  { // change to specified position, according to mode
428  return (streampos(_BADOFF));
429  }
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 >.

432  { // offer buffer to external agent (do nothing)
433  return (this);
434  }
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::setg ( _Elem *  _First,
_Elem *  _Next,
_Elem *  _Last 
)
inlineprotected
246  { // set pointers for read buffer
247  *_IGfirst = _First;
248  *_IGnext = _Next;
249  *_IGcount = (int)(_Last - _Next);
250  }
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
_Elem ** _IGnext
Definition: streambuf:452
int * _IGcount
Definition: streambuf:457
_Elem ** _IGfirst
Definition: streambuf:448
_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
287  { // set pointers for write buffer
288  *_IPfirst = _First;
289  *_IPnext = _First;
290  *_IPcount = (int)(_Last - _First);
291  }
_Elem ** _IPfirst
Definition: streambuf:449
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
_Elem ** _IPnext
Definition: streambuf:453
int * _IPcount
Definition: streambuf:458
_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
294  { // set pointers for write buffer, extended version
295  *_IPfirst = _First;
296  *_IPnext = _Next;
297  *_IPcount = (int)(_Last - _Next);
298  }
_Elem ** _IPfirst
Definition: streambuf:449
_CRTIMP _In_opt_z_ const wchar_t _In_opt_z_ const wchar_t unsigned int
Definition: crtdefs.h:642
_Elem ** _IPnext
Definition: streambuf:453
int * _IPcount
Definition: streambuf:458
_FwdIt _Last
Definition: algorithm:1936
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetc ( )
inline
151  { // get a character and don't point past it
152  return (0 < _Gnavail()
153  ? _Traits::to_int_type(*gptr()) : underflow());
154  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:219
virtual int_type __CLR_OR_THIS_CALL underflow()
Definition: streambuf:349
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inline
158  { // get up to _Count characters into array beginning at _Ptr
159  return (xsgetn(_Ptr, _Count));
160  }
_Diff _Count
Definition: algorithm:1941
virtual streamsize __CLR_OR_THIS_CALL xsgetn(_Elem *_Ptr, streamsize _Count)
Definition: streambuf:360
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::showmanyc ( )
inlineprotectedvirtual
345  { // return count of input characters
346  return (0);
347  }
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::snextc ( )
inline
163  { // point to next character and return it
164  return (1 < _Gnavail()
165  ? _Traits::to_int_type(*_Gnpreinc())
166  : _Traits::eq_int_type(_Traits::eof(), sbumpc())
167  ? _Traits::eof() : sgetc());
168  }
int_type __CLR_OR_THIS_CALL sgetc()
Definition: streambuf:150
int_type __CLR_OR_THIS_CALL sbumpc()
Definition: streambuf:144
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
_Elem *__CLR_OR_THIS_CALL _Gnpreinc()
Definition: streambuf:269
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputbackc ( _Elem  _Ch)
inline
171  { // put back _Ch
172  return (gptr() != 0 && eback() < gptr()
173  && _Traits::eq(_Ch, gptr()[-1])
174  ? _Traits::to_int_type(*_Gndec())
175  : pbackfail(_Traits::to_int_type(_Ch)));
176  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:219
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:257
virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type=_Traits::eof())
Definition: streambuf:339
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:214
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputc ( _Elem  _Ch)
inline
193  { // put a character
194  return (0 < _Pnavail()
195  ? _Traits::to_int_type(*_Pninc() = _Ch)
196  : overflow(_Traits::to_int_type(_Ch)));
197  }
virtual int_type __CLR_OR_THIS_CALL overflow(int_type=_Traits::eof())
Definition: streambuf:334
_In_ size_t _In_ unsigned int _Ch
Definition: mbstring.h:161
_Elem *__CLR_OR_THIS_CALL _Pninc()
Definition: streambuf:300
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:306
template<class _Elem, class _Traits>
streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inline
201  { // put _Count characters from array beginning at _Ptr
202  return (xsputn(_Ptr, _Count));
203  }
virtual streamsize __CLR_OR_THIS_CALL xsputn(const _Elem *_Ptr, streamsize _Count)
Definition: streambuf:389
_Diff _Count
Definition: algorithm:1941
template<class _Elem, class _Traits>
void __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::stossc ( )
inline
179  { // point past a character
180  if (0 < _Gnavail())
181  _Gninc();
182  else
183  uflow();
184  }
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:354
_Elem *__CLR_OR_THIS_CALL _Gninc()
Definition: streambuf:263
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
template<class _Elem, class _Traits>
int_type __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sungetc ( )
inline
187  { // back up one position
188  return (gptr() != 0 && eback() < gptr()
189  ? _Traits::to_int_type(*_Gndec()) : pbackfail());
190  }
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:219
_Elem *__CLR_OR_THIS_CALL _Gndec()
Definition: streambuf:257
virtual int_type __CLR_OR_THIS_CALL pbackfail(int_type=_Traits::eof())
Definition: streambuf:339
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:214
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 *_Pfirst = pbase();
58  _Elem *_Pnext = pptr();
59  _Elem *_Pend = epptr();
60  _Elem *_Gfirst = eback();
61  _Elem *_Gnext = gptr();
62  _Elem *_Gend = egptr();
63 
64  setp(_Right.pbase(), _Right.pptr(), _Right.epptr());
65  _Right.setp(_Pfirst, _Pnext, _Pend);
66 
67  setg(_Right.eback(), _Right.gptr(), _Right.egptr());
68  _Right.setg(_Gfirst, _Gnext, _Gend);
69 
70  _STD swap(_Plocale, _Right._Plocale);
71  }
72  }
_Elem *__CLR_OR_THIS_CALL egptr() const
Definition: streambuf:234
_Elem * _Gfirst
Definition: streambuf:446
void __CLR_OR_THIS_CALL setg(_Elem *_First, _Elem *_Next, _Elem *_Last)
Definition: streambuf:245
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:219
void __CLR_OR_THIS_CALL swap(_Myt &_Right)
Definition: streambuf:53
_Elem *__CLR_OR_THIS_CALL epptr() const
Definition: streambuf:252
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:229
void __CLR_OR_THIS_CALL setp(_Elem *_First, _Elem *_Last)
Definition: streambuf:286
locale * _Plocale
Definition: streambuf:461
_Elem *__CLR_OR_THIS_CALL pbase() const
Definition: streambuf:224
_Elem * _Pfirst
Definition: streambuf:447
_Elem *__CLR_OR_THIS_CALL eback() const
Definition: streambuf:214
_Elem * _Gnext
Definition: streambuf:450
_Elem * _Pnext
Definition: streambuf:451
const _Ty & _Right
Definition: algorithm:4087
template<class _Elem, class _Traits>
virtual int __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::sync ( )
inlineprotectedvirtual

Reimplemented in basic_filebuf< _Elem, _Traits >.

437  { // synchronize with external agent (do nothing)
438  return (0);
439  }
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 >.

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

350  { // get a character from stream, but don't point past it
351  return (_Traits::eof());
352  }
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsgetn ( _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
362  { // get _Count characters from stream
363  int_type _Meta;
364  streamsize _Size, _Copied;
365 
366  for (_Copied = 0; 0 < _Count; )
367  if (0 < (_Size = _Gnavail()))
368  { // copy from read buffer
369  if (_Count < _Size)
370  _Size = _Count;
371  _Traits::copy(_Ptr, gptr(), (size_t)_Size);
372  _Ptr += _Size;
373  _Copied += _Size;
374  _Count -= _Size;
375  gbump((int)_Size);
376  }
377  else if (_Traits::eq_int_type(_Traits::eof(), _Meta = uflow()))
378  break; // end of file, quit
379  else
380  { // get a single character
381  *_Ptr++ = _Traits::to_char_type(_Meta);
382  ++_Copied;
383  --_Count;
384  }
385 
386  return (_Copied);
387  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2072
_Elem *__CLR_OR_THIS_CALL gptr() const
Definition: streambuf:219
_Longlong streamsize
Definition: iosfwd:22
_Traits::int_type int_type
Definition: streambuf:83
virtual int_type __CLR_OR_THIS_CALL uflow()
Definition: streambuf:354
void __CLR_OR_THIS_CALL gbump(int _Off)
Definition: streambuf:239
_Diff _Count
Definition: algorithm:1941
_Check_return_ _In_ long _Size
Definition: io.h:325
streamsize __CLR_OR_THIS_CALL _Gnavail() const
Definition: streambuf:275
template<class _Elem, class _Traits>
virtual streamsize __CLR_OR_THIS_CALL basic_streambuf< _Elem, _Traits >::xsputn ( const _Elem *  _Ptr,
streamsize  _Count 
)
inlineprotectedvirtual
391  { // put _Count characters to stream
392  streamsize _Size, _Copied;
393 
394  for (_Copied = 0; 0 < _Count; )
395  if (0 < (_Size = _Pnavail()))
396  { // copy to write buffer
397  if (_Count < _Size)
398  _Size = _Count;
399  _Traits::copy(pptr(), _Ptr, (size_t)_Size);
400  _Ptr += _Size;
401  _Copied += _Size;
402  _Count -= _Size;
403  pbump((int)_Size);
404  }
405  else if (_Traits::eq_int_type(_Traits::eof(),
406  overflow(_Traits::to_int_type(*_Ptr))))
407  break; // single character put failed, quit
408  else
409  { // count character successfully put
410  ++_Ptr;
411  ++_Copied;
412  --_Count;
413  }
414 
415  return (_Copied);
416  }
_OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2072
_Longlong streamsize
Definition: iosfwd:22
void __CLR_OR_THIS_CALL pbump(int _Off)
Definition: streambuf:280
_Elem *__CLR_OR_THIS_CALL pptr() const
Definition: streambuf:229
virtual int_type __CLR_OR_THIS_CALL overflow(int_type=_Traits::eof())
Definition: streambuf:334
_Diff _Count
Definition: algorithm:1941
streamsize __CLR_OR_THIS_CALL _Pnavail() const
Definition: streambuf:306
_Check_return_ _In_ long _Size
Definition: io.h:325

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: