std::basic_stringbuf
Материал из 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. |
| Заголовочный файл <sstream>
|
||
| template< class charT, |
||
std::basic_stringbuf является std::basic_streambuf, ассоциированная последовательность символов является резидентный последовательность произвольных символов, которые могут быть инициализированы с или предоставляться в виде экземпляра 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.
Типичная реализация
std::basic_stringbuf удерживать объект типа std::basic_string непосредственно в качестве члена данных и использовать его и как управляемой последовательности символов (массив, в котором шесть указателей std::basic_streambuf указывают на), а также связанные с ними последовательность символов (источник символов для всех ввод операции и мишень для выхода). Кроме того, имеет место типичная реализация данных типа std::ios_base::openmode для индикации состояния потока (только для ввода, вывода только, или вход / выход).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.
Две специализации для распространенных типов характера также определяются:
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.
| Определено в файле <sstream>
| |
| Type
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> |
[править] Член типов
| Член типа
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 (начиная с C++11) |
[править] Член функций
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. | |
| строит 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. (public функция-член) | |
| (C++11) |
assigns a basic_stringbuf object (public функция-член) |
| (C++11) |
свопы двух объектов 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. (public функция-член) |
| (destructor) [virtual] (объявлено неявно) |
destructs a basic_stringbuf object and the string it holds (virtual public функция-член) |
| заменяет или получает копию соответствующей строки символов 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. (public функция-член) | |
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] |
возвращает следующий символ доступны на входной последовательности 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 protected функция-член) |
| [virtual] |
помещает символ назад во входной последовательности 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 protected функция-член) |
| [virtual] |
добавляет символ в выходной последовательности 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 protected функция-член) |
| [virtual] |
Попытки заменить управляемой последовательности символов с массивом 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 protected функция-член) |
| [virtual] |
перемещает курсор в следующую последовательность ввода, вывода последовательности, или как с помощью относительной адресации 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 protected функция-член) |
| [virtual] |
перемещает курсор в следующую последовательность ввода, вывода последовательности, или как с помощью абсолютная адресация 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 protected функция-член) |
[править] Не являющиеся членами функций
| Специализируется 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. (шаблон функции) | |
Унаследован от std::basic_streambuf
Member types
| Член типа
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] |
разрушает 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 public std::basic_streambuf функция-член)
|
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
| получает копию соответствующего языка 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. (public функция-член std::basic_streambuf)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
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. | |
| получает количество символов немедленно доступны на 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. (public функция-член std::basic_streambuf)
| |
| авансы входной последовательности, а затем считывает один символ не идя снова 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. (public функция-член std::basic_streambuf)
| |
| читает один символ из входной последовательности и авансы последовательности 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. (public функция-член std::basic_streambuf)
| |
| stossc (устарело) |
авансы входной последовательности, как если бы по телефону sbumpc() и отбрасывая результат 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. (public функция-член) |
| считывает один символ из входной последовательности без продвижения последовательности 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. (public функция-член std::basic_streambuf)
| |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
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. | |
| пишет один символ положил площадь и средства, следующего указателя 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. (public функция-член std::basic_streambuf)
| |
| Вызывает 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. (public функция-член std::basic_streambuf)
| |
Original: Putback The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| ставит на один символ назад во входной последовательности 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. (public функция-член std::basic_streambuf)
| |
| перемещает следующий указатель на задней входной последовательности по одному 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. (public функция-член std::basic_streambuf)
| |
Protected member functions
| строит 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. (protected функция-член) | |
| (C++11) |
заменяет 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. (protected функция-член) |
| (C++11) |
Меняет местами два 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. (protected функция-член) |
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] |
изменения связаны языка 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 protected std::basic_streambuf функция-член)
|
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] |
заменяет буфер с заданными пользователем массива, если это разрешено 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
перемещает курсор в следующую последовательность ввода, вывода последовательности, или как с помощью относительной адресации 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
перемещает курсор в следующую последовательность ввода, вывода последовательности, или как с помощью абсолютная адресация 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
синхронизация буфера с соответствующей последовательности символов 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 protected std::basic_streambuf функция-член)
|
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] |
получает количество символов, доступных для ввода в соответствующей последовательности ввода, если оно известно 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
читает символы из соответствующей последовательности ввода 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
читает символы из соответствующей последовательности ввода Get области и авансов следующего указателя 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 protected std::basic_streambuf функция-член)
|
| [virtual] |
читает несколько символов из входной последовательности 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 protected std::basic_streambuf функция-член)
|
| возвращает указатель на начало текущего символа и до конца 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. (protected функция-член) | |
| достижения следующего указателя во входной последовательности 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. (protected функция-член) | |
| перемещает начало, дальше, и конца указатели входной последовательности 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. (protected функция-член) | |
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 protected std::basic_streambuf функция-член)
|
| [virtual] |
пишет символы с соответствующей последовательности выхода из поставленных области 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 protected std::basic_streambuf функция-член)
|
| возвращает указатель на начало текущего символа и конец положил области 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. (protected функция-член) | |
| достижения следующего указателя выходной последовательности 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. (protected функция-член) | |
| перемещает начало, дальше, и конца указатели выходной последовательности 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. (protected функция-член) | |
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] |
помещает символ назад во входной последовательности, возможно изменение входной последовательности 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 protected std::basic_streambuf функция-член)
|