std::basic_stringbuf
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 <sstream>
|
||
template< class charT, |
||
std::basic_stringbuf
é um std::basic_streambuf cujo associado seqüência de caracteres é uma seqüência residente na memória de caracteres arbitrários, que pode ser inicializado ou disponibilizados como uma instância de std::basic_string.Original:
std::basic_stringbuf
is a std::basic_streambuf whose associated character sequence is a memory-resident sequence of arbitrary characters, which can be initialized from or made available as an instance of std::basic_string.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ções típicas de
std::basic_stringbuf
segurar um objeto do tipo std::basic_string diretamente como um membro de dados e usá-lo tanto como sequência de caracteres a controlada (a matriz onde os seis indicadores de std::basic_streambuf estão apontando para) e, como a seqüência de caracteres associado (a fonte de caracteres para todos operações de entrada ea meta para a saída). Além disso, uma implementação típica contém um membro de dados do tipo std::ios_base::openmode para indicar o estado da corrente (entrada-only, saída-saída única, a entrada ou /).Original:
Typical implementations of
std::basic_stringbuf
hold an object of type std::basic_string directly as a data member and use it as both the controlled character sequence (the array where the six pointers of std::basic_streambuf are pointing to) and as the associated character sequence (the source of characters for all input operations and the target for the output). In addition, a typical implementation holds a data member of type std::ios_base::openmode to indicate the status of the stream (input-only, output-only, or input/output).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.
Duas especializações para tipos de caracteres comuns também estão definidos:
Original:
Two specializations for common character types are also defined:
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
<sstream> | |
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 |
stringbuf
|
basic_stringbuf<char> |
wstringbuf
|
basic_stringbuf<wchar_t> |
[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 |
allocator_type
|
Allocator (desde C++11) |
[editar] Funções de membro
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. | |
constrói um objeto basic_stringbuf Original: constructs a basic_stringbuf 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 membro) | |
(C++11) |
assigns a basic_stringbuf object (função pública membro) |
(C++11) |
troca dois objetos basic_stringbuf Original: swaps two basic_stringbuf objects 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) |
(destructor) [virtual] (declarada implicitamente) |
destructs a basic_stringbuf object and the string it holds (função pública virtual membro) |
substitui ou obtém uma cópia da seqüência de caracteres associado Original: replaces or obtains a copy of the associated character string 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. | |
[virtual] |
retorna o próximo caractere disponível na sequência de entrada Original: returns the next character available 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. (virtual protegido função de membro) |
[virtual] |
coloca um caractere de volta para a sequência de entrada Original: puts 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. (virtual protegido função de membro) |
[virtual] |
acrescenta um personagem para a seqüência de saída Original: appends a character to 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. (virtual protegido função de membro) |
[virtual] |
tentativas de substituir a seqüência de caracteres controlada com uma matriz Original: attempts to replace the controlled character sequence with an array 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) |
[editar] Não-membros funções
o algoritmo especializado std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (modelo de função) |
Herdado de std::basic_streambuf
Member types
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 |
Member functions
[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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf 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. (of std::basic_streambuf função pública membro)
|
Protected member functions
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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf 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 of std::basic_streambuf função de membro)
|