std::basic_stringstream
Материал из 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, |
(до C++11) | |
template< class CharT, |
(начиная с C++11) | |
basic_stringstream
шаблон класса реализующий операции ввода / вывода на память (std::basic_string) на основе потоков. Это существенно обертывания сырья реализации устройств строку (basic_stringbuf
) в интерфейс более высокого уровня (basic_iostream
). Полный интерфейс для уникальных членов basic_stringbuf
предусмотрено.Original:
The class template
basic_stringstream
implements input/output operations on memory (std::basic_string) based streams. It essentially wraps a raw string device implementation (basic_stringbuf
) into a higher-level interface (basic_iostream
). The complete interface to unique basic_stringbuf
members is provided.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 |
stringstream
|
basic_stringstream<char> |
wstringstream
|
basic_stringstream<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: constructs the string stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член) | |
(C++11) |
перемещает строку поток Original: moves the string stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член) |
(C++11) |
swaps two string streams (публичная функция-член) |
Возвращает базовый сырья объектового устройства строки Original: returns the underlying raw string device object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член) | |
Original: String operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
получает или задает содержание основного объекта устройств строку Original: gets or sets the contents of underlying string device object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член) |
Унаследован от std::basic_istream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Экстракты отформатированные данные Original: extracts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Экстракты символов Original: extracts characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
читает следующий символ без извлечения его Original: reads the next character without extracting it The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
unextracts характер Original: unextracts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
ставит символ во входной поток Original: puts character into input stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
Экстракты символы, пока этот символ не найден Original: extracts characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
Экстракты и отбрасывает символы, пока этот символ не найден Original: extracts and discards characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
извлекает блоки символов Original: extracts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
извлекает уже имеющихся блоков символов Original: extracts already available blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
возвращает число символов, извлеченных по последнему неформатированный операции ввода Original: returns number of characters extracted by last unformatted input operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
возвращает индикатор позиции ввода Original: returns the input position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
| |
sets the input position indicator (публичная функция-член std::basic_istream )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
синхронизируется с основным устройством хранения Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_istream )
|
Member classes
implements basic logic for preparation of the stream for input operations (общественных of std::basic_istream члена класса)
|
Унаследован от std::basic_ostream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
вставками отформатированные данные Original: inserts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
вставками характер Original: inserts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
| |
вставки блоков символов Original: inserts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
возвращает индикатор выхода положение Original: returns the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
| |
устанавливает индикатор выхода положение Original: sets the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
синхронизируется с основным устройством хранения Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ostream )
|
Member classes
реализует основную логику для подготовки потока для вывода Original: implements basic logic for preparation of the stream for output operations 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_ostream члена класса)
|
Унаследован от std::basic_ios
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 |
Original: State functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
чеки, если не произошла ошибка, т.е. операций ввода / вывода имеются Original: checks if no error has occurred i.e. I/O operations are available The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
проверяет, является ли конец файла достигнут Original: checks if end-of-file has been reached The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
проверяет, является ли возмещаемая ошибка Original: checks if a recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
проверяет, неустранимая ошибка Original: checks if a non-recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
проверяет, если произошла ошибка (синоним fail()) Original: checks if an error has occurred (synonym of fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
(до C++11) (начиная с C++11) |
проверки, если не произошла ошибка (синоним !fail()) Original: checks if no error has occurred (synonym of !fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
|
возвращает государственные флаги Original: returns state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
устанавливает государственные флаги Original: sets state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
очищает ошибку и EOF флаги Original: clears error and eof flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
копии форматирования информации Original: copies formatting information The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
управляет символ заполнения Original: manages the fill character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
manages exception mask (публичная функция-член std::basic_ios )
| |
Задает язык Original: sets the locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
управляет работой поток буфера Original: manages associated stream buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
управляет связанными поток Original: manages tied stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
сужает символов Original: narrows characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::basic_ios )
| |
widens characters (публичная функция-член std::basic_ios )
|
Унаследован от std::ios_base
Member functions
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
управляет форматом флаги Original: manages format flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
устанавливает конкретные флаг формате Original: sets specific format flag The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
clears specific format flag (публичная функция-член std::ios_base )
| |
управляет десятичная точность операций с плавающей точкой Original: manages decimal precision of floating point operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
manages field width (публичная функция-член std::ios_base )
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
устанавливает язык Original: sets locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
возвращает текущей локали Original: returns current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
Original: Internal extensible array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[статическим] |
возвращает программу в масштабах уникальное целое число, которое является безопасным для использования в качестве индекса Pword () и iword () Original: returns a program-wide unique integer that is safe to use as index to pword() and iword() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная статичная функция-член std::ios_base )
|
изменяет размер частного хранения при необходимости и доступ к long элемент по заданному индексу Original: resizes the private storage if necessary and access to the long element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
изменяет размер частного хранения при необходимости и доступ к void* элемент по заданному индексу Original: resizes the private storage if necessary and access to the void* element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная функция-член std::ios_base )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
registers event callback function (публичная функция-член std::ios_base )
| |
[статическим] |
Наборы ли C + + и C IO библиотеки совместимы Original: sets whether C++ and C IO libraries are interoperable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (публичная статичная функция-член std::ios_base )
|
Original: Member classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Поток исключение Original: stream exception The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (общественных of std::ios_base члена класса)
| |
инициализирует стандартные объекты потока Original: initializes standard stream objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (общественных of std::ios_base члена класса)
|
Original: Member types and constants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Поток открытого типа режима
Следующие константы определены также:
Original: stream open mode type
The following constants 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. (определение типа) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Тип форматирования флаги
Следующие константы определены также:
Original: formatting flags type
The following constants 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. (определение типа) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
состояние потока типа
Следующие константы определены также:
Original: state of the stream type
The following constants 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. (определение типа) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seeking direction type
The following constants are also defined:
(определение типа) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
указывает тип события Original: specifies event type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (перечисление) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
функцию обратного вызова типа Original: callback function type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (определение типа) |