Espacios de nombres
Variantes
Acciones

std::basic_streambuf

De cppreference.com
< cpp‎ | io
 
 
Biblioteca de E/S
Manipuladores de E/S
E/S estilo C
Búferes
basic_streambuf
(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)
 
std::basic_streambuf
Las funciones públicas miembros
Original:
Public member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Locales
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Posicionamiento
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Obtenga zona
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.
Ponga zona
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.
Dos puntos
Original:
Putback
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Protegido funciones miembro
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.
Locales
Original:
Locales
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Posicionamiento
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Obtenga zona
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.
Ponga zona
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.
Dos puntos
Original:
Putback
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 <streambuf>
template<

    class CharT,
    class Traits =std::char_traits<CharT>,
    class Allocator =std::allocator<CharT>

>class basic_streambuf;
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.
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.
  • 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 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.
1)
El comienzo' puntero, apunta siempre en el elemento más bajo de la memoria intermedia
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.
2)
El' puntero siguiente, los puntos en el elemento que es el próximo candidato para la lectura o la escritura
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.
3)
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.
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.
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.
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.
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.
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.
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.
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
streambufbasic_streambuf<char>
wstreambufbasic_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.

Contenido

[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_typeCharT[editar]
traits_typeTraits; el programa está mal formado si Traits::char_type

no es CharT. [editar]

int_typeTraits::int_type[editar]
pos_typeTraits::pos_type[editar]
off_typeTraits::off_type[editar]

[editar]Las funciones miembro

[virtual]
Destruye el objeto basic_streambuf.
(función miembro virtual pública)[editar]
Locales
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)[editar]
Obtiene una copia de la configuración regional asociada.
(función miembro pública)[editar]
Posicionamiento
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)[editar]
Invoca a seekoff().
(función miembro pública)[editar]
Invoca a seekpos().
(función miembro pública)[editar]
Invoca a sync().
(función miembro pública)[editar]
Obtenga zona
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)[editar]
Hace avanzar la secuencia de entrada, entonces lee un carácter sin hacerla avanzar de nuevo.
(función miembro pública)[editar]
(eliminado en C++17)
Lee un carácter de la secuencia de entrada y hace avanzar la secuencia.
(función miembro pública)[editar]
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)[editar]
Lee un carácter de la secuencia de entrada sin hacer avanzar la secuencia.
(función miembro pública)[editar]
Invoca a xsgetn().
(función miembro pública)[editar]
Ponga zona
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)[editar]
Invoca a xsputn().
(función miembro pública)[editar]
Dos puntos
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)[editar]
Mueve el puntero siguiente en la secuencia de entrada hacia atrás en uno.
(función miembro pública)[editar]

Protegido funciones miembro
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)[editar]
(C++11)
Reemplaza a un objeto basic_streambuf.
(función miembro protegida)[editar]
(C++11)
Intercambia dos objetos de tipo basic_streambuf.
(función miembro protegida)[editar]
Locales
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)[editar]
Posicionamiento
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)[editar]
[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)[editar]
[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)[editar]
[virtual]
Sincroniza los búferes con la secuencia de caracteres asociada.
(función miembro virtual protegida)[editar]
Obtenga zona
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)[editar]
[virtual]
Lee los caracteres de la secuencia de entrada asociada a la zona de obtención.
(función miembro virtual protegida)[editar]
[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)[editar]
[virtual]
Lee varios caracteres de la secuencia de entrada.
(función miembro virtual protegida)[editar]
Devuelve un puntero al comienzo, el carácter actual y el final de la zona de obtención.
(función miembro protegida)[editar]
Avanza el puntero siguiente en la secuencia de entrada.
(función miembro protegida)[editar]
Reposiciona los punteros: al comienzo, siguiente y final de la secuencia de entrada.
(función miembro protegida)[editar]
Ponga zona
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)[editar]
[virtual]
Escribe los caracteres del área de colocación a la secuencia de salida asociada.
(función miembro virtual protegida)[editar]
Devuelve un puntero al comienzo, el carácter actual y el final del área de sometimiento.
(función miembro protegida)[editar]
Avanza el puntero siguiente de la secuencia de salida.
(función miembro protegida)[editar]
Reposiciona los punteros: al comienzo, siguiente y final de la secuencia de salida.
(función miembro protegida)[editar]
Dos puntos
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)[editar]
close