std::basic_ostream::sentry
Da cppreference.com.
< cpp | io | basic ostream
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <ostream>
|
||
template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry |
||
Un oggetto di classe
basic_ostream::sentry
è costruito in ambito locale all'inizio di ciascuna funzione membro di std::basic_ostream che esegue uscita (sia formattato e formato). Il suo costruttore prepara il flusso di output: controlla se il flusso è già in uno stato di errore, vampate il legame () 'd flussi di uscita, e svolge altre attività di attuazione definite, se necessario. Implementazione definita pulizia, nonché lavaggio del flusso di uscita, se necessario, viene eseguita nel distruttore, in modo che sia garantita accadere se vengono generate eccezioni durante l'output.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.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Membri funzioni
costruisce la object. All sentinella si svolgono le attività di preparazione qui 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. (metodo pubblico) | |
finalizza l'oggetto stream dopo formattato o dopo eccezione, se necessario 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. (metodo pubblico) | |
operator= |
l'operatore di assegnazione è soppresso 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. (metodo pubblico) |
controlla se la preparazione dell'oggetto flusso ha avuto successo 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. (metodo pubblico) |
[modifica] Esempio
This section is incomplete Reason: no example |
[modifica] Vedi anche
inserisce i dati formattati 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. (metodo pubblico) |