Base interface for all asynchronous output streams.
More...
#include <streams.h>
Inheritance diagram for Concurrency::streams::basic_ostream< CharType >:
Public Types
typedef traits::int_type int_type
typedef traits::pos_type pos_type
typedef traits::off_type off_type
Public Member Functions
Close the stream, preventing further write operations.
More...
Close the stream with exception, preventing further write operations.
More...
Put a single character into the stream.
More...
template<typename T >
Write a single value of "blittable" type T into the stream.
More...
Write a number of characters from a given stream buffer into the stream.
More...
pplx::task< size_t >
print (const std::basic_string< CharType > &str) const
Write the specified string to the output stream.
More...
template<typename T >
Write a value of type
T to the output stream.
More...
template<typename T >
Write a value of type
T to the output stream and append a newline character.
More...
Flush any buffered output data.
More...
pos_type
seek (pos_type pos) const
Seeks to the specified write position.
More...
pos_type
seek (off_type off, std::ios_base::seekdir way) const
Seeks to the specified write position.
More...
Get the current write position, i.e. the offset from the beginning of the stream.
More...
can_seek is used to determine whether the stream supports seeking. More...
Test whether the stream has been initialized with a valid stream buffer.
More...
Test whether the stream has been initialized or not.
More...
Test whether the stream is open for writing.
More...
concurrency::streams::streambuf< CharType >
streambuf () const
Get the underlying stream buffer.
More...
Protected Member Functions
Detailed Description
template<typename CharType>
class Concurrency::streams::basic_ostream< CharType >
Base interface for all asynchronous output streams.
Constructor & Destructor Documentation
template<typename CharType>
template<typename CharType>
Copy constructor
- Parameters
-
other The source object
template<typename CharType>
Constructor
- Parameters
-
buffer A stream buffer.
Member Function Documentation
template<typename CharType>
can_seek is used to determine whether the stream supports seeking.
- Returns
true if the stream supports seeking, false otherwise.
template<typename CharType>
Close the stream, preventing further write operations.
template<typename CharType>
Close the stream with exception, preventing further write operations.
- Parameters
-
eptr Pointer to the exception.
template<typename CharType>
Flush any buffered output data.
template<typename CharType>
Test whether the stream is open for writing.
- Returns
true if the stream is open for writing, false otherwise.
template<typename CharType>
Test whether the stream has been initialized with a valid stream buffer.
- Returns
true if the stream has been initialized with a valid stream buffer, false otherwise.
template<typename CharType>
Test whether the stream has been initialized or not.
template<typename CharType>
Assignment operator
- Parameters
-
other The source object
- Returns
- A reference to the stream object that contains the result of the assignment.
template<typename CharType>
Write the specified string to the output stream.
- Parameters
-
str Input string.
template<typename CharType>
template<typename T >
Write a value of type T to the output stream.
- Template Parameters
-
T The data type of the object to be written to the stream
- Parameters
-
val Input object.
template<typename CharType>
template<typename T >
Write a value of type T to the output stream and append a newline character.
- Template Parameters
-
T The data type of the object to be written to the stream
- Parameters
-
val Input object.
template<typename CharType>
Seeks to the specified write position.
- Parameters
-
pos An offset relative to the beginning of the stream.
- Returns
- The new position in the stream.
template<typename CharType>
std::ios_base::seekdir
way
)
const
inline
Seeks to the specified write position.
- Parameters
-
off An offset relative to the beginning, current write position, or the end of the stream.
way The starting point (beginning, current, end) for the seek.
- Returns
- The new position in the stream.
template<typename CharType>
Get the underlying stream buffer.
- Returns
- The underlying stream buffer.
template<typename CharType>
Get the current write position, i.e. the offset from the beginning of the stream.
- Returns
- The current write position.
template<typename CharType>
Put a single character into the stream.
- Parameters
-
ch A character
template<typename CharType>
template<typename T >
Write a single value of "blittable" type T into the stream.
- Parameters
-
value A value of type T.
This is not a replacement for a proper binary serialization solution, but it may form the foundation for one. Writing data bit-wise to a stream is a primitive operation of binary serialization. Currently, no attention is paid to byte order. All data is written in the platform's native byte order, which means little-endian on all platforms that have been tested. This function is only available for streams using a single-byte character size.
template<typename CharType>
size_t
count
)
const
inline
Write a number of characters from a given stream buffer into the stream.
- Parameters
-
source A source stream buffer.
count The number of characters to write.
The documentation for this class was generated from the following files: