Пространства имён
Варианты
Действия

std::basic_ostream::sentry

Материал из cppreference.com

 
 
Библиотеки ввода / вывода
I / O манипуляторов
C-стиль I / O
Буферы
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(устарело)
Потоки
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Абстракций
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Файл I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Струнный I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Массив I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(устарело)
ostrstream(устарело)
strstream(устарело)
Типы
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Интерфейс Ошибка категории
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::basic_ostream
Глобальные объекты
Original:
Global objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Член функций
Original:
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_ostream::basic_ostream
basic_ostream::~basic_ostream
basic_ostream::operator=(C++11)
Форматированный ввод
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.
basic_ostream::operator<<
Неформатированная вход
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.
basic_ostream::put
basic_ostream::write
Позиционирование
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::tellp
basic_ostream::seekp
Разное
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::flush
basic_ostream::swap(C++11)
Член классов
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.
basic_ostream::sentry
Не являющиеся членами функций
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator<<(std::basic_ostream)
 
basic_ostream::sentry
Функции
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sentry::sentry
sentry::operator bool
 
Заголовочный файл <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.

[править] Член функций

строит часовой 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 функция-член) [edit]
завершает поток объекта после форматированный вывод или после исключения, если это необходимо
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 функция-член) [edit]

[править] Пример


[править] См. также

вставками отформатированные данные
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 функция-член) [edit]