std::basic_streambuf
De cppreference.com
|
|
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 <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.
| This section is incomplete Reason: 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.
| Defined in header
<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 |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
[editar] Las funciones miembro
| [virtual] |
destructs el objeto basic_streambuf Original: destructs the basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Virtual Member público función) |
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 imbue() Original: invokes imbue() 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) | |
| obtiene una copia de la configuración regional asociado Original: obtains a copy of the associated locale 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) | |
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 setbuf() Original: invokes setbuf() 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) | |
| Invoca seekoff() Original: invokes seekoff() 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) | |
| Invoca seekpos() Original: invokes seekpos() 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) | |
| Invoca sync() Original: invokes sync() 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) | |
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 get Original: obtains the number of characters immediately available in the get area 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) | |
| avanza la secuencia de entrada, entonces lee un carácter sin avanzar de nuevo Original: advances the input sequence, then reads one character without advancing again 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) | |
| lee un carácter de la secuencia de entrada y hace avanzar la secuencia Original: reads one character from the input sequence and advances the sequence 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) | |
| stossc (obsoleto) |
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. (miembro público función) |
| lee un carácter de la secuencia de entrada sin avanzar la secuencia Original: reads one character from the input sequence without advancing the sequence 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) | |
| Invoca xsgetn() Original: invokes xsgetn() 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) | |
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 suelta y avanza el puntero siguiente Original: writes one character to the put area and advances the next pointer 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) | |
| Invoca xsputn() Original: invokes xsputn() 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) | |
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 personaje nuevo en la secuencia de entrada Original: puts one character back in 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. (miembro público función) | |
| mueve el puntero siguiente en la secuencia de entrada de vuelta a uno Original: moves the next pointer in the input sequence back by one 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) | |
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 Original: constructs a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) | |
| (C++11) |
sustituye a un objeto basic_streambuf Original: replaces a basic_streambuf object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) |
| (C++11) |
swaps dos objetos basic_streambuf Original: swaps two basic_streambuf objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) |
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 asociado Original: changes the associated locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
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 tampón con matriz definida por el usuario, si así lo permite Original: replaces the buffer with user-defined array, if permitted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
reposiciona el puntero siguiente en la secuencia de entrada, la secuencia de salida, o ambas, mediante el direccionamiento relativo Original: repositions the next pointer in the input sequence, output sequence, or both, using relative addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
reposiciona el puntero siguiente en la secuencia de entrada, la secuencia de salida, o ambos utilizando el direccionamiento absoluto Original: repositions the next pointer in the input sequence, output sequence, or both using absolute addressing The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
sincroniza los tampones con la secuencia de caracteres asociado Original: synchronizes the buffers with the associated character sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
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] |
obtiene el número de caracteres disponibles para la entrada en la secuencia de entrada asociado, si se conoce Original: obtains the number of characters available for input in the associated input sequence, if known The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
lee los caracteres de la secuencia de entrada asociado a la zona de get Original: reads characters from the associated input sequence to the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
lee los caracteres de la secuencia de entrada asociado a la zona de get y avanza el siguiente Original: reads characters from the associated input sequence to the get area and advances the next pointer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| [virtual] |
lee los caracteres múltiples de la secuencia de entrada Original: reads multiple characters from 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. (virtuales protegidos miembro de función) |
| devuelve un puntero al comienzo, el carácter actual y el final de la zona de obtención Original: returns a pointer to the beginning, current character and the end of the get area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) | |
| avanza el puntero siguiente en la secuencia de entrada Original: advances the next pointer in 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. (protegidos función miembro) | |
| reposiciona el comienzo, al lado, y al final los punteros de la secuencia de entrada Original: repositions the beginning, next, and end pointers of 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. (protegidos función miembro) | |
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] |
writes multiple characters to the output sequence (virtuales protegidos miembro de función) |
| [virtual] |
escribe los caracteres a la secuencia de salida asociado del área de venta Original: writes characters to the associated output sequence from the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (virtuales protegidos miembro de función) |
| devuelve un puntero al comienzo, carácter actual y el final del área de poner Original: returns a pointer to the beginning, current character and the end of the put area The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) | |
| avanza el puntero siguiente de la secuencia de salida Original: advances the next pointer of the output sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) | |
| reposiciona el comienzo, al lado, y al final los punteros de la secuencia de salida Original: repositions the beginning, next, and end pointers of the output sequence The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (protegidos función miembro) | |
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, la posibilidad de modificar la secuencia de entrada Original: puts a character back into the input sequence, possibly modifying 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. (virtuales protegidos miembro de función) |