◐ Shell
clean mode source ↗

std::basic_ostream::sentry – cppreference.com

Aus cppreference.com

<metanoindex/>

<tbody> </tbody>

definiert in Header

<ostream>

template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry

Ein Objekt der Klasse basic_ostream::sentry in lokalen Bereich zu Beginn eines jeden Elementfunktion std::basic_ostream ausgegebenen (beide formatierte und unformatierte) führt konstruiert. Der Konstruktor bereitet die Ausgabe-Stream: prüft, ob der Strom bereits in einem gescheiterten Staat, spült die tie () 'd Output-Streams, und führt andere Implementierung definiert Aufgaben, wenn nötig. Implementierung definiert Bereinigung sowie Spülung des Ausgabe-Stream, wenn nötig, wird im Destruktor ausgeführt, so dass gewährleistet ist, zu passieren, wenn Ausnahmen bei der Ausgabe geworfen werden .

Original:

An object of class basic_ostream::sentry is constructed in local scope at the beginning of each member function of std::basic_ostream that performs output (both formatted and unformatted). Its constructor prepares the output stream: checks if the stream is already in a failed state, flushes the tie()'d output streams, and performs other implementation-defined tasks if necessary. Implementation-defined cleanup, as well as flushing of the output stream if necessary, is performed in the destructor, so that it is guaranteed to happen if exceptions are thrown during output.

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

Member-Funktionen

baut die Wache object.
All der Zubereitung Aufgaben hier fertig sind

Original:

constructs the sentry object.
All the preparation tasks are done here

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


(öffentliche Elementfunktion) [edit]

finalisiert die Stromobjekt nach formatierten Ausgabe oder nach Ausnahme, falls erforderlich

Original:

finalizes the stream object after formatted output or after exception, if necessary

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


(öffentliche Elementfunktion)

operator=

der Zuweisungsoperator wird gelöscht

Original:

the assignment operator is deleted

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


(öffentliche Elementfunktion)

prüft, ob die Vorbereitung der Stream-Objekt erfolgreich war

Original:

checks if the preparation of the stream object was successful

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


(öffentliche Elementfunktion) [edit]

Beispiel

Siehe auch

Einsätze formatierte Daten

Original:

inserts formatted data

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


(öffentliche Elementfunktion) [edit]