|
| basic_producer_consumer_buffer (size_t alloc_size) |
| Constructor More...
|
|
virtual | ~basic_producer_consumer_buffer () |
| Destructor More...
|
|
virtual bool | can_seek () const |
| can_seek is used to determine whether a stream buffer supports seeking. More...
|
|
virtual bool | has_size () const |
| has_size is used to determine whether a stream buffer supports size(). More...
|
|
virtual size_t | buffer_size (std::ios_base::openmode=std::ios_base::in) const |
| Get the stream buffer size, if one has been set. More...
|
|
virtual void | set_buffer_size (size_t, std::ios_base::openmode=std::ios_base::in) |
| Sets the stream buffer implementation to buffer or not buffer. More...
|
|
virtual size_t | in_avail () const |
| For any input stream, in_avail returns the number of characters that are immediately available to be consumed without blocking. May be used in conjunction with <cref="::sbumpc method"/> to read data without incurring the overhead of using tasks. More...
|
|
virtual pos_type | getpos (std::ios_base::openmode mode) const |
| Gets the current read or write position in the stream. More...
|
|
virtual pos_type | seekpos (pos_type, std::ios_base::openmode) |
| Seeks to the given position. More...
|
|
virtual pos_type | seekoff (off_type, std::ios_base::seekdir, std::ios_base::openmode) |
| Seeks to a position given by a relative offset. More...
|
|
virtual _CharType * | _alloc (size_t count) |
| Allocates a contiguous memory block and returns it. More...
|
|
virtual void | _commit (size_t count) |
| Submits a block already allocated by the stream buffer. More...
|
|
virtual bool | acquire (_Out_ _CharType *&ptr, _Out_ size_t &count) |
| Gets a pointer to the next already allocated contiguous block of data. More...
|
|
virtual void | release (_Out_writes_opt_(count) _CharType *ptr, _In_ size_t count) |
| Releases a block of data acquired using ::acquire method. This frees the stream buffer to de-allocate the memory, if it so desires. Move the read position ahead by the count. More...
|
|
virtual bool | can_read () const |
| can_read is used to determine whether a stream buffer will support read operations (get). More...
|
|
virtual bool | can_write () const |
| can_write is used to determine whether a stream buffer will support write operations (put). More...
|
|
virtual bool | is_open () const |
| Checks if the stream buffer is open. More...
|
|
virtual pplx::task< void > | close (std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out) |
| Closes the stream buffer, preventing further read or write operations. More...
|
|
virtual pplx::task< void > | close (std::ios_base::openmode mode, std::exception_ptr eptr) |
| Closes the stream buffer with an exception. More...
|
|
virtual bool | is_eof () const |
| is_eof is used to determine whether a read head has reached the end of the buffer. More...
|
|
virtual pplx::task< int_type > | putc (_CharType ch) |
| Writes a single character to the stream. More...
|
|
virtual pplx::task< size_t > | putn (const _CharType *ptr, size_t count) |
| Writes a number of characters to the stream. More...
|
|
virtual pplx::task< size_t > | putn_nocopy (const _CharType *ptr, size_t count) |
| Writes a number of characters to the stream. Note: callers must make sure the data to be written is valid until the returned task completes. More...
|
|
virtual pplx::task< int_type > | bumpc () |
| Reads a single character from the stream and advances the read position. More...
|
|
virtual int_type | sbumpc () |
| Reads a single character from the stream and advances the read position. More...
|
|
virtual pplx::task< int_type > | getc () |
| Reads a single character from the stream without advancing the read position. More...
|
|
virtual int_type | sgetc () |
| Reads a single character from the stream without advancing the read position. More...
|
|
virtual pplx::task< int_type > | nextc () |
| Advances the read position, then returns the next character without advancing again. More...
|
|
virtual pplx::task< int_type > | ungetc () |
| Retreats the read position, then returns the current character without advancing. More...
|
|
virtual pplx::task< size_t > | getn (_Out_writes_(count) _CharType *ptr, _In_ size_t count) |
| Reads up to a given number of characters from the stream. More...
|
|
virtual size_t | scopy (_Out_writes_(count) _CharType *ptr, _In_ size_t count) |
| Copies up to a given number of characters from the stream, synchronously. More...
|
|
virtual pplx::task< void > | sync () |
| For output streams, flush any internally buffered data to the underlying medium. More...
|
|
virtual std::exception_ptr | exception () const |
| Retrieves the stream buffer exception_ptr if it has been set. More...
|
|
_CharType * | alloc (size_t count) |
| Allocates a contiguous memory block and returns it. More...
|
|
void | commit (size_t count) |
| Submits a block already allocated by the stream buffer. More...
|
|
virtual utility::size64_t | size () const |
| Gets the size of the stream, if known. Calls to has_size will determine whether the result of size can be relied on. More...
|
|
virtual bool | acquire (_Out_writes_(count) _CharType *&ptr, _In_ size_t &count)=0 |
|
virtual void | release (_Out_writes_(count) _CharType *ptr, _In_ size_t count)=0 |
| Releases a block of data acquired using ::acquire method. This frees the stream buffer to de-allocate the memory, if it so desires. Move the read position ahead by the count. More...
|
|
virtual | ~basic_streambuf () |
| Virtual constructor for stream buffers. More...
|
|
virtual _CharType * | alloc (_In_ size_t count)=0 |
| Allocates a contiguous memory block and returns it. More...
|
|
virtual void | commit (_In_ size_t count)=0 |
| Submits a block already allocated by the stream buffer. More...
|
|
|
virtual pplx::task< bool > | _sync () |
|
virtual pplx::task< int_type > | _putc (_CharType ch) |
|
virtual pplx::task< size_t > | _putn (const _CharType *ptr, size_t count) |
|
virtual pplx::task< size_t > | _getn (_Out_writes_(count) _CharType *ptr, _In_ size_t count) |
|
virtual size_t | _sgetn (_Out_writes_(count) _CharType *ptr, _In_ size_t count) |
|
virtual size_t | _scopy (_Out_writes_(count) _CharType *ptr, _In_ size_t count) |
|
virtual pplx::task< int_type > | _bumpc () |
|
virtual int_type | _sbumpc () |
|
virtual pplx::task< int_type > | _getc () |
|
int_type | _sgetc () |
|
virtual pplx::task< int_type > | _nextc () |
|
virtual pplx::task< int_type > | _ungetc () |
|
virtual pplx::task< size_t > | _putn (const _CharType *ptr, size_t count, bool) |
|
virtual pplx::task< void > | _close_read () |
| The real read head close operation, implementation should override it if there is any resource to be released. More...
|
|
| streambuf_state_manager (std::ios_base::openmode mode) |
|
template<typename _CharType>
class Concurrency::streams::details::basic_producer_consumer_buffer< _CharType >
The basic_producer_consumer_buffer class serves as a memory-based steam buffer that supports both writing and reading sequences of characters. It can be used as a consumer/producer buffer.