std::basic_streambuf<CharT,Traits>::pbackfail (3) - Linux Manuals
std::basic_streambuf<CharT,Traits>::pbackfail: std::basic_streambuf<CharT,Traits>::pbackfail
Command to display std::basic_streambuf<CharT,Traits>::pbackfail
manual in Linux: $ man 3 std::basic_streambuf<CharT,Traits>::pbackfail
NAME
std::basic_streambuf<CharT,Traits>::pbackfail - std::basic_streambuf<CharT,Traits>::pbackfail
Synopsis
protected:
virtual int_type pbackfail( int_type c = Traits::eof() );
This protected virtual function is called by the public functions sungetc() and sputbackc() (which, in turn, are called by basic_istream::unget and basic_istream::putback) when either:
1) There is no putback position in the get area (pbackfail() is called with no arguments). In this situation, the purpose of pbackfail() is to back up the get area by one character, if the associated character sequence allows this (e.g. a file-backed streambuf may reload the buffer from a file, starting one character earlier).
2) The caller attempts to putback a different character from the one retrieved earlier (pbackfail() is called with the character that needs to be put back). In this situation, the purpose of pbackfail() is to place the character c into the get area at the position just before basic_streambuf::gptr(), and, if possible, to modify the associated character sequence to reflect this change. This may involve backing up the get area as in the first variant.
The default base class version of this function does nothing and returns Traits::eof() in all situations. This function is overridden by the derived classes: basic_stringbuf::pbackfail, basic_filebuf::pbackfail, strstreambuf::pbackfail, and is expected to be overridden by user-defined and third-party library stream classes.
Parameters
ch - character to put back or Traits::eof() if only back out is requested
Return value
Traits::eof() in case of failure, some other value to indicate success. The base class version always fails.
Example
This section is incomplete
Reason: no example
See also
pbackfail backs out the input sequence to unget a character, not affecting the associated file
(virtual protected member function of std::basic_filebuf<CharT,Traits>)
[virtual]
pbackfail puts a character back into the input sequence
(virtual protected member function of std::basic_stringbuf<CharT,Traits,Allocator>)
[virtual]
pbackfail backs out the input sequence to unget a character
(virtual protected member function of std::strstreambuf)
[virtual]
moves the next pointer in the input sequence back by one
sungetc (public member function)
puts one character back in the input sequence
sputbackc (public member function)
Pages related to std::basic_streambuf<CharT,Traits>::pbackfail
- std::basic_streambuf<CharT,Traits>::pbase,std::basic_streambuf<CharT,Traits>::pptr, (3) - std::basic_streambuf<CharT,Traits>::pbase,std::basic_streambuf<CharT,Traits>::pptr,
- std::basic_streambuf<CharT,Traits>::pbase,std::basic_streambuf<CharT,Traits>::pptr,std::basic_streambuf<CharT,Traits>::epptr (3) - std::basic_streambuf<CharT,Traits>::pbase,std::basic_streambuf<CharT,Traits>::pptr,std::basic_streambuf<CharT,Traits>::epptr
- std::basic_streambuf<CharT,Traits>::pbump (3) - std::basic_streambuf<CharT,Traits>::pbump
- std::basic_streambuf<CharT,Traits>::pubimbue,std::basic_streambuf<CharT,Traits>::imbue (3) - std::basic_streambuf<CharT,Traits>::pubimbue,std::basic_streambuf<CharT,Traits>::imbue
- std::basic_streambuf<CharT,Traits>::pubseekoff, (3) - std::basic_streambuf<CharT,Traits>::pubseekoff,
- std::basic_streambuf<CharT,Traits>::pubseekoff,std::basic_streambuf<CharT,Traits>::seekoff (3) - std::basic_streambuf<CharT,Traits>::pubseekoff,std::basic_streambuf<CharT,Traits>::seekoff
- std::basic_streambuf<CharT,Traits>::pubseekpos, (3) - std::basic_streambuf<CharT,Traits>::pubseekpos,
- std::basic_streambuf<CharT,Traits>::pubseekpos,std::basic_streambuf<CharT,Traits>::seekpos (3) - std::basic_streambuf<CharT,Traits>::pubseekpos,std::basic_streambuf<CharT,Traits>::seekpos
- std::basic_streambuf<CharT,Traits>::pubsetbuf,std::basic_streambuf<CharT,Traits>::setbuf (3) - std::basic_streambuf<CharT,Traits>::pubsetbuf,std::basic_streambuf<CharT,Traits>::setbuf
- std::basic_streambuf<CharT,Traits>::pubsync,std::basic_streambuf<CharT,Traits>::sync (3) - std::basic_streambuf<CharT,Traits>::pubsync,std::basic_streambuf<CharT,Traits>::sync
- std::basic_streambuf<CharT,Traits>::basic_streambuf (3) - std::basic_streambuf<CharT,Traits>::basic_streambuf
- std::basic_streambuf<CharT,Traits>::eback,gptr,egptr (3) - std::basic_streambuf<CharT,Traits>::eback,gptr,egptr
- std::basic_streambuf<CharT,Traits>::gbump (3) - std::basic_streambuf<CharT,Traits>::gbump
- std::basic_streambuf<CharT,Traits>::getloc (3) - std::basic_streambuf<CharT,Traits>::getloc
- std::basic_streambuf<CharT,Traits>::in_avail (3) - std::basic_streambuf<CharT,Traits>::in_avail
- std::basic_streambuf<CharT,Traits>::operator= (3) - std::basic_streambuf<CharT,Traits>::operator=
- std::basic_streambuf<CharT,Traits>::overflow (3) - std::basic_streambuf<CharT,Traits>::overflow
- std::basic_streambuf<CharT,Traits>::sbumpc (3) - std::basic_streambuf<CharT,Traits>::sbumpc
- std::basic_streambuf<CharT,Traits>::setg (3) - std::basic_streambuf<CharT,Traits>::setg
- std::basic_streambuf<CharT,Traits>::setp (3) - std::basic_streambuf<CharT,Traits>::setp
- std::basic_streambuf<CharT,Traits>::sgetc (3) - std::basic_streambuf<CharT,Traits>::sgetc
- std::basic_streambuf<CharT,Traits>::sgetn,std::basic_streambuf<CharT,Traits>::xsgetn (3) - std::basic_streambuf<CharT,Traits>::sgetn,std::basic_streambuf<CharT,Traits>::xsgetn
- std::basic_streambuf<CharT,Traits>::showmanyc (3) - std::basic_streambuf<CharT,Traits>::showmanyc
- std::basic_streambuf<CharT,Traits>::snextc (3) - std::basic_streambuf<CharT,Traits>::snextc
- std::basic_streambuf<CharT,Traits>::sputbackc (3) - std::basic_streambuf<CharT,Traits>::sputbackc
- std::basic_streambuf<CharT,Traits>::sputc (3) - std::basic_streambuf<CharT,Traits>::sputc
- std::basic_streambuf<CharT,Traits>::sputn,std::basic_streambuf<CharT,Traits>::xsputn (3) - std::basic_streambuf<CharT,Traits>::sputn,std::basic_streambuf<CharT,Traits>::xsputn
- std::basic_streambuf<CharT,Traits>::sungetc (3) - std::basic_streambuf<CharT,Traits>::sungetc
- std::basic_streambuf<CharT,Traits>::swap (3) - std::basic_streambuf<CharT,Traits>::swap
- std::basic_streambuf<CharT,Traits>::uflow (3) - std::basic_streambuf<CharT,Traits>::uflow
- std::basic_streambuf<CharT,Traits>::underflow (3) - std::basic_streambuf<CharT,Traits>::underflow
- std::basic_streambuf<CharT,Traits>::~basic_streambuf (3) - std::basic_streambuf<CharT,Traits>::~basic_streambuf
- std::basic_streambuf (3) - std::basic_streambuf