Native/C++
ostream (Output stream class)
aucd29
2013. 10. 2. 19:01
Output stream class
|
![]() |
|
![]() |
|
![]() |
| ||||
![]() |
| |||||||||
![]() |
|
ostream members: (constructor) Construct an object operator<< Perform a formatted output operation (insertion). flush Flush buffer. put Put a single character into output stream. seekp Set position of put pointer. tellp Get position of put pointer. write Write a sequence of characters. (destructor) No-op [virtual] members inherited from ios: operator void * Convert stream to pointer. operator ! Evaluate stream object. bad Check if an unrecoverable error has occurred. clear Set control states. copyfmt Copy formatting information. eof Check if End-Of-File has been reached. exceptions Get/set the exception mask. fail Check if failure has occurred. fill Get/set the fill character. good Check if stream is good for i/o operations. imbue Imbue locale. narrow Narrow character. rdbuf Get/set the associated streambuf object. rdstate Get control state. setstate Set control state. tie Get/set the tied stream. widen Widen character. members inherited from ios_base: flags Get/set format flags. getloc Get current locale. imbue Imbue locale. iword Get reference to a long element of the internal extensible array. precision Get/set floating-point decimal presision. pword Get reference to a void* element of the internal extensible array. register_callback Register event callback function. setf Set some format flags. sync_with_stdio Activates / Deactivates synchronization with cstdio functions. [static] unsetf Clear format flag. width Get/set field width. xalloc Return a new index for the internal extensible array. [static]
Description
ostream provides member functions to perform output operations with a stream buffer. These members can be divided into two main groups:
- Formatted output
- These member functions write data in a human-readable way following the stream's formatting information. All formatted output is done using the insertion operator (operator<<).
- Unformatted output
- Most of the other member functions of ostream class are used to perform unformatted output, i.e. output operations that write data as it is, without performing any formatting adaptation. These functions can put a dertermined number of characters to the output buffer (put, write) and manipulate the position of the put pointer (seekp, tellp).
Standard objects cout, cerr and clog are instatiations of this class.