Namensräume
Varianten

std::basic_streambuf::underflow

Aus cppreference.com
< cpp‎ | io‎ | basic streambuf

 
 
Input / Output-Bibliothek
I / O-Manipulatoren
C-style I / O
Puffern
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(veraltet)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstraktionen
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Datei-I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
String I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Array I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(veraltet)
ostrstream(veraltet)
strstream(veraltet)
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Fehler Kategorie Schnittstelle
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::basic_streambuf
Öffentliche Member-Funktionen
Original:
Public member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::~basic_streambuf
Locales
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::pubimbue
basic_streambuf::getloc
Positionierung
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::pubsetbuf
basic_streambuf::pubseekoff
basic_streambuf::pubseekpos
basic_streambuf::pubsync
Get area
Original:
Get area
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::in_avail
basic_streambuf::snextc
basic_streambuf::sbumpc
basic_streambuf::sgetc
basic_streambuf::sgetn
Legen Bereich
Original:
Put area
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::sputc
basic_streambuf::sputn
Putback
Original:
Putback
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::sputbackc
basic_streambuf::sungetc
Geschützt Member-Funktionen
Original:
Protected member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::basic_streambuf
basic_streambuf::operator=(C++11)
basic_streambuf::swap(C++11)
Locales
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::imbue
Positionierung
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::setbuf
basic_streambuf::seekoff
basic_streambuf::seekpos
basic_streambuf::sync
Get area
Original:
Get area
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::showmanyc
basic_streambuf::underflow
basic_streambuf::uflow
basic_streambuf::xsgetn
basic_streambuf::eback
basic_streambuf::gptr
basic_streambuf::egptr
basic_streambuf::gbump
basic_streambuf::setg
Legen Bereich
Original:
Put area
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::xsputn
basic_streambuf::overflow
basic_streambuf::pbase
basic_streambuf::pptr
basic_streambuf::epptr
basic_streambuf::pbump
basic_streambuf::setp
Putback
Original:
Putback
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf::pbackfail
 
int_type underflow();
Stellt sicher, dass mindestens ein Zeichen verfügbar ist im Eingangsbereich durch die Aktualisierung der Zeiger auf den Eingangsbereich (falls erforderlich). Gibt den Wert dieser Zeichen auf Erfolg oder traits::eof() bei Ausfall .
Original:
Ensures that at least one character is available in the input area by updating the pointers to the input area (if needed). Returns the value of that character on success or traits::eof() on failure.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die Funktion kann zu aktualisieren gptr, egptr und eback Zeigern auf den Standort der neu geladenen Daten (sofern vorhanden) zu definieren. Bei Ausfall sorgt die Funktion, dass entweder gptr()== nullptr oder gptr()== egptr .
Original:
The function may update gptr, egptr and eback pointers to define the location of newly loaded data (if any). On failure, the function ensures that either gptr()== nullptr or gptr()== egptr.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die Basisklasse Version der Funktion tut nichts. Die abgeleiteten Klassen können diese Funktion überschreiben, um Aktualisierungen der get-Bereich im Falle der Erschöpfung ermöglichen .
Original:
The base class version of the function does nothing. The derived classes may override this function to allow updates to the get area in the case of exhaustion.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten]Parameter

(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Rückgabewert

Der Wert des Zeichens, auf die der get-Zeiger nach dem Anruf bei Erfolg oder traits::eof() sonst .
Original:
The value of the character pointed to by the get pointer after the call on success, or traits::eof() otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Die Basisklasse Version der Funktion nennt traits::eof() .
Original:
The base class version of the function calls traits::eof().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Hinweis

Die öffentlichen Funktionen std::streambuf rufen Sie diese Funktion nur, wenn gptr()== nullptr oder gptr()>= egptr() .
Original:
The public functions of std::streambuf call this function only if gptr()== nullptr or gptr()>= egptr().
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Beispiel

[edit]
#include <iostream>#include <sstream>   class null_filter_buf :publicstd::streambuf{std::streambuf* src;char ch;// single-byte bufferprotected:int underflow(){while((ch= src->sbumpc())=='\0');// skip zeroes setg(&ch, &ch, &ch+1);// make one read position availablereturn ch;// may return EOF}public: null_filter_buf(std::streambuf* buf): src(buf){ setg(&ch, &ch+1, &ch+1);// buffer is initially full}};   void filtered_read(std::istream& in){std::streambuf* orig = in.rdbuf(); null_filter_buf buf(orig); in.rdbuf(&buf);for(char c; in.get(c);)std::cout<< c; in.rdbuf(orig);}   int main(){char a[]="This i\0s \0an e\0\0\0xample";std::istringstream in(std::string(std::begin(a), std::end(a))); filtered_read(in);}

Output:

This is an example

[Bearbeiten]Siehe auch

[virtuell]
liest Zeichen aus dem dazugehörigen Eingang Sequenz an die get-Bereich und Fortschritte der nächste Zeiger
Original:
reads characters from the associated input sequence to the get area and advances the next pointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuellen geschützten Member-Funktion)[edit]
[virtuell]
schreibt Zeichen auf die zugehörige Ausgangsscheibe Sequenz aus dem Bereich gebracht
Original:
writes characters to the associated output sequence from the put area
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(virtuellen geschützten Member-Funktion)[edit]
close