std::basic_ostream::sentry
De cppreference.com
< cpp | io | basic ostream
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <ostream>
|
||
| template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry |
||
Un objeto de
basic_ostream::sentry clase se construye en el ámbito local en el comienzo de cada función miembro de std::basic_ostream que realiza salida (ambos con y sin formato). Su constructor prepara la corriente de salida: comprueba si la corriente está ya en un estado fallido, limpia el empate () 'd flujos de salida, y realiza otras tareas definidas aplicación, si es necesario. Definido por la implantación de limpieza, así como el lavado de la corriente de salida si es necesario, se lleva a cabo en el destructor, de modo que se garantiza que suceda si se producen excepciones durante la salida .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.
[editar] Las funciones miembro
| construye el centinela object. All las tareas de preparación se llevan a cabo aquí 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. (miembro público función) | |
| finaliza el objeto de secuencia después de la salida con formato o después excepción, si es necesario 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. (miembro público función) | |
| operator= |
el operador de asignación se elimina 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. (miembro público función) |
| Verifica si la preparación del objeto de secuencia se realizó correctamente 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. (miembro público función) | |
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] Ver también
| insertos de formato de datos 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. (miembro público función) | |