std::basic_ostream::sentry
Материал из cppreference.com
< cpp | io | basic ostream
|
|
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. |
| Заголовочный файл <ostream>
|
||
| template< class CharT, class Traits = std::char_traits<CharT> > class std::basic_istream<charT,traits>::sentry |
||
Объект класса
basic_ostream::sentry построен в локальной области в начале каждого члена функции std::basic_ostream, который выполняет вывод (как форматированных и неформатированных). Его конструктор готовит выходной поток: чеки, если поток уже находится в состоянии сбоя, приливы галстук () 'г потоки продукции, а также выполняет другие реализации определенных задач, если это необходимо. Реализация определенных очистки, а также промывка выходного потока, если это необходимо, выполняется в деструкторе, так что он гарантированно случится, если исключений во время вывода.Original:
An object of class
basic_ostream::sentry is constructed in local scope at the beginning of each member function of std::basic_ostream that performs output (both formatted and unformatted). Its constructor prepares the output stream: checks if the stream is already in a failed state, flushes the tie()'d output streams, and performs other implementation-defined tasks if necessary. Implementation-defined cleanup, as well as flushing of the output stream if necessary, is performed in the destructor, so that it is guaranteed to happen if exceptions are thrown during 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.
[править] Член функций
| строит часовой object. All подготовки задачи сделать здесь Original: constructs the sentry object. All the preparation tasks are done here The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
| завершает поток объекта после форматированный вывод или после исключения, если это необходимо Original: finalizes the stream object after formatted output or after exception, if necessary The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
| operator= |
оператор присваивания удален Original: the assignment operator is deleted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) |
| проверяет подготовку объекта потока была успешной Original: checks if the preparation of the stream object was successful The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (public функция-член) | |
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| вставками отформатированные данные 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. (public функция-член) | |