std::basic_streambuf
De cppreference.com
![]() | Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate. La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <streambuf> | ||
template< class CharT, | ||
El
basic_streambuf
clase controla la entrada y salida a una secuencia de caracteres. Se incluye y proporciona acceso a la secuencia de caracteres de control (tampón) y, opcionalmente, la secuencia de caracteres asociado (archivo, I / O corriente, socket TCP, etc) . Original:
The class
basic_streambuf
controls input and output to a character sequence. It includes and provides access to the controlled character sequence (the buffer) and, optionally, the associated character sequence (file, I/O stream, TCP socket, etc). 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.
Es compatible con las siguientes restricciones:
Original:
It supports the following constraints:
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.
- la secuencia de entrada controlada no puede ser legible .Original:the controlled input sequence may not be readable.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la secuencia de salida controlada no puede tener permiso de escritura .Original:the controlled output sequence may not be writeable.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la representación de caracteres y codificación en la secuencia controlada puede ser diferente de las representaciones de caracteres en la secuencia asociada (una faceta locale std::codecvt puede ser necesario para realizar la conversión)Original:the character representation and encoding in the controlled sequence may be different from the character representations in the associated sequence (a std::codecvt locale facet may be necessary to perform the conversion)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la secuencia controlada puede ser capaz de acceder a la secuencia asociada directamente .Original:the controlled sequence may be able to access the associated sequence directly.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- la secuencia controlada puede imponer limitaciones arbitrarias en la lectura, la escritura, la búsqueda, o ungetting personajes .Original:the controlled sequence may impose arbitrary limitations on reading, writing, seeking, or ungetting characters.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La secuencia de caracteres de control (tampón) es una matriz de
1) CharT
que, en todo momento, representa una subsecuencia, o una "ventana" en la secuencia de caracteres asociado. Su estado es descrito por tres indicadores:Original:
The controlled character sequence (the buffer) is an array of
CharT
which, at all times, represents a subsequence, or a "window" into the associated character sequence. Its state is described by three pointers: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.
El comienzo' puntero, apunta siempre en el elemento más bajo de la memoria intermedia
2) Original:
The beginning pointer, always points at the lowest element of the buffer
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.
El' puntero siguiente, los puntos en el elemento que es el próximo candidato para la lectura o la escritura
3) Original:
The next pointer, points at the element that is the next candidate for reading or writing
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.
El extremo' puntero, puntos, uno más allá del final de la memoria intermedia .
Original:
The end pointer, points one past the end of the buffer.
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.
Si el siguiente puntero es menor que el puntero final en una secuencia de salida, una posición de escritura' está disponible. El puntero siguiente puede dejar de hacer referencia y se asigna a .
Original:
If the next pointer is less than the end pointer in an output sequence, a write position is available. The next pointer can be dereferenced and assigned to.
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.
Si el siguiente puntero es menor que el puntero final en una secuencia de entrada, un leer posición está disponible. El puntero siguiente puede dejar de hacer referencia y leer .
Original:
If the next pointer is less than the end pointer in an input sequence, a read position is available. The next pointer can be dereferenced and read from.
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.
Si el siguiente puntero es mayor que el puntero a partir de una secuencia de entrada, una posición putback' está disponible, y el siguiente puntero puede ser decrementado, desreferenciado, y se asigna a, con el fin de poner un personaje de nuevo en la secuencia de entrada .
Original:
If the next pointer is greater than the beginning pointer in an input sequence, a putback position is available, and the next pointer may be decremented, dereferenced, and assigned to, in order to put a character back into the input sequence.
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.
Un objeto
basic_streambuf
puede apoyar una secuencia de entrada (en cuyo caso el tampón descrito por el principio, siguiente y final punteros se conoce como obtener zona), una secuencia de salida ( poner área), o una entrada / la secuencia de salida. En este último caso, seis punteros son rastreados, que pueden apuntar a todos los elementos de la matriz de caracteres o dos matrices individuales .Original:
A
basic_streambuf
object may support an input sequence (in which case the buffer described by the beginning, next, and end pointers is called get area), an output sequence (put area), or an input/output sequence. In latter case, six pointers are tracked, which may all point to elements of the same character array or two individual arrays.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.
Aplicación típica de la clase base
std::basic_streambuf
sólo contiene estos punteros CharT*
seis y una copia de std::locale como miembros de datos. Los topes se aplican a sí mismos por las clases derivadas como std::basic_filebuf o std::basic_stringbuf .Original:
Typical implementation of the
std::basic_streambuf
base class holds only these six CharT*
pointers and a copy of std::locale as data members. The buffers themselves are implemented by the derived classes such as std::basic_filebuf or std::basic_stringbuf.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.
Esta sección está incompleta Razón: Consistent terminology across the pages. Probably input/output sequence, get/put area, etc. |
Dos typedefs de conveniencia son proporcionados por la biblioteca estándar
Original:
Two convenience typedefs are provided by the standard library
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.
Definido en el archivo de encabezado <streambuf> | |
Tipo Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
streambuf | basic_streambuf<char> |
wstreambuf | basic_streambuf<wchar_t> |
Los objetos de flujo de E / S std::basic_istream, std::basic_ostream, y derivado, se llevan a cabo enteramente en términos de std::basic_streambuf .
Original:
The I/O stream objects std::basic_istream, std::basic_ostream, and derived, are implemented entirely in terms of std::basic_streambuf.
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]Tipos de miembros
Miembro de tipo Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
char_type | CharT |
traits_type | Traits; el programa está mal formado si Traits::char_type no es |
int_type | Traits::int_type |
pos_type | Traits::pos_type |
off_type | Traits::off_type |
[editar]Las funciones miembro
[virtual] | Destruye el objeto basic_streambuf . (función miembro virtual pública) |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Invoca a imbue(). (función miembro pública) | |
Obtiene una copia de la configuración regional asociada. (función miembro pública) | |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Invoca a setbuf(). (función miembro pública) | |
Invoca a seekoff(). (función miembro pública) | |
Invoca a seekpos(). (función miembro pública) | |
Invoca a sync(). (función miembro pública) | |
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Obtiene el número de caracteres disponibles de inmediato en la zona de obtención. (función miembro pública) | |
Hace avanzar la secuencia de entrada, entonces lee un carácter sin hacerla avanzar de nuevo. (función miembro pública) | |
(eliminado en C++17) | Lee un carácter de la secuencia de entrada y hace avanzar la secuencia. (función miembro pública) |
stossc (en desuso) | avanza la secuencia de entrada como si se aplicase sbumpc() y descartar el resultado Original: advances the input sequence as if by calling sbumpc() and discarding the result 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) |
Lee un carácter de la secuencia de entrada sin hacer avanzar la secuencia. (función miembro pública) | |
Invoca a xsgetn(). (función miembro pública) | |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Escribe un carácter a la zona de sometimiento y avanza el puntero siguiente. (función miembro pública) | |
Invoca a xsputn(). (función miembro pública) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Pone un carácter de nuevo en la secuencia de entrada. (función miembro pública) | |
Mueve el puntero siguiente en la secuencia de entrada hacia atrás en uno. (función miembro pública) | |
Original: Protected member functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Construye un objeto basic_streambuf . (función miembro protegida) | |
(C++11) | Reemplaza a un objeto basic_streambuf . (función miembro protegida) |
(C++11) | Intercambia dos objetos de tipo basic_streambuf . (función miembro protegida) |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[virtual] | Cambia la configuración regional asociada. (función miembro virtual protegida) |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[virtual] | Reemplaza el búfer con un array definido por el usuario, si se permite. (función miembro virtual protegida) |
[virtual] | Reposiciona el puntero siguiente en la secuencia de entrada, la secuencia de salida, o ambas, mediante el direccionamiento relativo. (función miembro virtual protegida) |
[virtual] | Reposiciona el puntero siguiente en la secuencia de entrada, la secuencia de salida, o ambas utilizando el direccionamiento absoluto. (función miembro virtual protegida) |
[virtual] | Sincroniza los búferes con la secuencia de caracteres asociada. (función miembro virtual protegida) |
Original: Get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[virtual] | Si se conoce, obtiene el número de caracteres disponibles para la entrada en la secuencia de entrada asociada. (función miembro virtual protegida) |
[virtual] | Lee los caracteres de la secuencia de entrada asociada a la zona de obtención. (función miembro virtual protegida) |
[virtual] | Lee los caracteres de la secuencia de entrada asociada a la zona de obtención y avanza el puntero siguiente. (función miembro virtual protegida) |
[virtual] | Lee varios caracteres de la secuencia de entrada. (función miembro virtual protegida) |
Devuelve un puntero al comienzo, el carácter actual y el final de la zona de obtención. (función miembro protegida) | |
Avanza el puntero siguiente en la secuencia de entrada. (función miembro protegida) | |
Reposiciona los punteros: al comienzo, siguiente y final de la secuencia de entrada. (función miembro protegida) | |
Original: Put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[virtual] | Escribe varios caracteres en la secuencia de salida. (función miembro virtual protegida) |
[virtual] | Escribe los caracteres del área de colocación a la secuencia de salida asociada. (función miembro virtual protegida) |
Devuelve un puntero al comienzo, el carácter actual y el final del área de sometimiento. (función miembro protegida) | |
Avanza el puntero siguiente de la secuencia de salida. (función miembro protegida) | |
Reposiciona los punteros: al comienzo, siguiente y final de la secuencia de salida. (función miembro protegida) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[virtual] | Pone un carácter de nuevo en la secuencia de entrada, posiblemente modificando tal secuencia. (función miembro virtual protegida) |