Espacios de nombres
Variantes
Acciones

std::basic_ostream<CharT,Traits>::sentry

De cppreference.com
< cpp‎ | io‎ | basic ostream
 
 
Biblioteca de E/S
Manipuladores de E/S
E/S estilo C
Búferes
(en desuso en C++98)
Flujos
Abstracciones
E/S de archivos
E/S de cadenas
E/S de arrays
(en desuso en C++98)
(en desuso en C++98)
(en desuso en C++98)
Salida sincronizada
Tipos
Interfaz de categoría de error
(C++11)
 
 
basic_ostream::sentry
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido en el archivo de encabezado <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.

[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.

(función miembro pública) [editar]
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.

(función miembro pública)
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.

(función miembro pública)
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.

(función miembro pública) [editar]

[editar] Ejemplo


[editar] Ver también

Inserta datos con formato.
(función miembro pública) [editar]