std::basic_streambuf
Da 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. |
Definido no cabeçalho <streambuf>
|
||
template< class CharT, |
||
O
basic_streambuf
classe controla a entrada e saída de uma seq��ência de caracteres. Ele inclui e fornece acesso à seqüência de caracteres controlada (buffer) e, opcionalmente, a seqüência de caracteres associados (arquivo, I / O córrego, TCP socket, 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.
Ele suporta as seguintes restrições:
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.
- a seqüência de entrada controlado não pode ser lido.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.
- a sequência de saída controlada pode não ser gravável.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.
- a representação de caracteres de codificação e na sequência controlada pode ser diferente a partir das representações de caracteres na sequência associada (uma faceta std::codecvt localidade pode ser necessária para efectuar a conversão)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.
- a seqüência controlada pode ser capaz de acessar a seqüência associada diretamente.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.
- a seqüência controlada pode impor limitações arbitrárias em leitura, escrita, buscando, ou ungetting personagens.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.
A sequência de caracteres controlado (o tampão) é uma matriz de
1) CharT
que, em todos os momentos, representa uma subsequência, ou uma "janela" para a sequência de caracteres associado. Seu estado é descrito por três 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.
O' ponteiro início, sempre aponta para o menor elemento do buffer
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.
O' ponteiro seguinte, aponta para o elemento que é o próximo candidato para leitura ou escrita
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.
O' ponteiro fim, aponta um após o fim do buffer.
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.
Se o ponteiro próximo é menor do que o ponteiro de fim de uma sequência de saída, uma posição de gravação' está disponível. O ponteiro seguinte pode ser dereferenced e atribuído ao.
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.
Se o ponteiro próximo é menor do que o ponteiro de fim de uma sequência de entrada, um ler posição disponível. O ponteiro seguinte pode ser dereferenced e ler.
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.
Se o ponteiro seguinte é maior do que o ponteiro a partir de uma sequência de entrada, uma posição putback' está disponível, e o apontador seguinte pode ser diminuído, dereferenciamos, e atribuído, a fim de colocar um caractere de volta para a sequência 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.
Um objeto
basic_streambuf
pode suportar uma sequência de entrada (caso em que o tampão descrito no início, em seguida, e no final os ponteiros é chamado obter área), uma sequência de saída (área colocar), ou uma entrada / sequência de saída. Em último caso, seis ponteiros são rastreadas, o que pode apontar para todos os elementos do array mesmo personagem ou duas matrizes individuais.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.
Implementação típica da classe base
std::basic_streambuf
detém apenas esses ponteiros CharT*
seis e uma cópia do std::locale como membros de dados. Os amortecedores em si são implementadas pelas classes derivadas, tais como std::basic_filebuf ou 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 seção está incompleta Motivo: Consistent terminology across the pages. Probably input/output sequence, get/put area, etc. |
Dois typedefs de conveniência são fornecidos pela biblioteca padrão
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> |
Os objetos de I / O córrego std::basic_istream, std::basic_ostream, e derivados, são implementados inteiramente em termos 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 membro
Tipo de membro
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] Funções de membro
[virtual] |
destrói o 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. (função pública virtual membro) |
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. (função pública membro) | |
obtém uma cópia do local associado 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. (função pública membro) | |
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. (função pública membro) | |
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. (função pública membro) | |
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. (função pública membro) | |
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. (função pública membro) | |
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. | |
obtém o número de caracteres disponíveis imediatamente na área 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. (função pública membro) | |
avança a seqüência de entrada, em seguida, lê um caractere sem avançar novamente 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. (função pública membro) | |
lê um caractere da seqüência de entrada e avança a seqüência 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. (função pública membro) | |
stossc (obsoleta) |
avança a seqüência de entrada, como se chamando sbumpc() e descartando o 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. (função pública membro) |
lê um caractere da seqüência de entrada sem avançar na seqüência 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. (função pública membro) | |
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. (função pública membro) | |
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. | |
escreve um personagem para a área de largada e avança o ponteiro seguinte 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. (função pública membro) | |
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. (função pública membro) | |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
coloca um personagem de volta na seqüência 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. (função pública membro) | |
move o ponteiro próximo da sequência de entrada volta a um 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. (função pública membro) | |
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. | |
constrói um 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. (protegido função de membro) | |
(C++11) |
substitui um 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. (protegido função de membro) |
(C++11) |
troca dois 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. (protegido função de membro) |
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] |
altera o local associado 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. (virtual protegido função de membro) |
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] |
substitui o buffer com matriz definida pelo usuário, se for permitido 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. (virtual protegido função de membro) |
[virtual] |
reposiciona ponteiro a seguinte na sequência de entrada, de saída de sequência, ou ambos, usando endereçamento 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. (virtual protegido função de membro) |
[virtual] |
reposiciona o ponteiro próximo na seqüência de entrada, a seqüência de saída, ou ambos, usando endereçamento 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. (virtual protegido função de membro) |
[virtual] |
sincroniza os buffers com a seqüência de caracteres associado 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. (virtual protegido função de membro) |
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] |
obtém o número de caracteres disponíveis para a entrada da sequência de entrada associada, se conhecida 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. (virtual protegido função de membro) |
[virtual] |
lê caracteres da seqüência de entrada associado para a área 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. (virtual protegido função de membro) |
[virtual] |
lê caracteres da seqüência de entrada associado à área de get e avança o ponteiro seguinte 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. (virtual protegido função de membro) |
[virtual] |
lê vários personagens da seqüência 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. (virtual protegido função de membro) |
retorna um ponteiro para o início, o personagem de corrente e o fim da área get 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. (protegido função de membro) | |
avança o ponteiro próximo na seqüência 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. (protegido função de membro) | |
reposiciona ponteiros o início, ao lado, e no fim da seqüência 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. (protegido função de membro) | |
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 (virtual protegido função de membro) |
[virtual] |
escreve caracteres para a seqüência de saída associado da área de venda 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. (virtual protegido função de membro) |
retorna um ponteiro para o início, o personagem de corrente e o fim da área de venda 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. (protegido função de membro) | |
avanços ponteiro o próximo da seqüência de saída 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. (protegido função de membro) | |
reposiciona ponteiros o início, ao lado, e no fim da seqüência de saída 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. (protegido função de membro) | |
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] |
coloca um caractere de volta para a sequência de entrada, possivelmente modificando a sequência 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. (virtual protegido função de membro) |