cpp/io/basic streambuf/pubsync: Unterschied zwischen den Versionen
Aus cppreference.com
< cpp | io | basic streambuf
(Translated from the English version using Google Translate) |
P12 (Diskussion | Beiträge) K (1 Version: Translate from the English version) |
Version vom 25. Oktober 2012, 10:06 Uhr
int pubsync(); |
(1) | |
protected: virtual int sync(); |
(2) | |
Synchronizes the controlled character sequence (the buffers) with the associated character sequence.
1)Ruft
sync()
der am meisten abgeleiteten KlasseOriginal:
Calls
sync()
of the most derived classThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2) The base class version of this function has no effect. The derived classes may override this function to allow synchronizing the underlying device with the buffers.
For output streams, this typically results in writing the contents of the put area into the associated sequence, i.e. flushing of the output buffer. For input streams, this typically empties the get area and forces a re-read from the associated sequence to pick up recent changes. The default behavior (found, for example, in std::basic_stringbuf), is to do nothing.
Inhaltsverzeichnis |
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.
You can help to correct and verify the translation. Click here for instructions.
Rückgabewert
1) The return value of sync()
.
2) Returns 0 on success, -1 otherwise. The base class version returns 0.
Beispiel
This section is incomplete Reason: no example |