This class implements the output functionality of the bsl::basic_streambuf protocol, using client-supplied memory and client-supplied allocator if additional memory is needed.
Declared in <bdlsb_overflowmemoutstreambuf.h>
class OverflowMemOutStreamBuf
: public std::streambuf
| Name | Description |
|---|---|
std::streambuf |
| Name | Description |
|---|---|
OverflowMemOutStreamBuf [constructor] | Create an empty stream buffer that uses the specified buffer as an initial output buffer of the specified size (in bytes). Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently-installed default allocator is used. The behavior is undefined unless buffer points to a valid sequence of positive size characters. Note that this stream buffer does not assume ownership of buffer. |
~OverflowMemOutStreamBuf [destructor] [virtual] | Destroy this stream buffer. |
dataLength | Return the number of bytes written to this stream. Note that if pptr() is currently pointing into the overflow buffer the data length will be greater than the size of the initial buffer. |
dataLengthInInitialBuffer | Return the length of data in the initial buffer, i.e., dataLength() if there is no overflow buffer, or initialBufferSize() if there is one. |
dataLengthInOverflowBuffer | Return the length of the data in the overflow buffer, i.e., 0 if there is no overflow buffer, or dataLength() - initialBufferSize() if there is one. |
initialBuffer | Return a pointer to the non-modifiable buffer supplied at construction. |
initialBufferSize | Return the size of the buffer supplied at construction. |
overflowBuffer | Return a pointer to the non-modifiable overflow buffer if there is one, or 0 otherwise. |
overflowBufferSize | Return the size of the overflow buffer, or 0 if there is no overflow buffer. |
operator BloombergLP::bslmf::NestedTraitDeclaration<OverflowMemOutStreamBuf, UsesBslmaAllocator> |
| Name | Description |
|---|---|
overflow [virtual] | If c is not EOF, adjust the underlying buffer so that the next put position is valid, put the specified c at this position, and increment the put position. Return c on success, and traits_type::not_eof(c) if c is EOF. |
seekoff [virtual] | Set the position indicator to the relative specified offset from the base position indicated by the specified way and return the resulting absolute position on success or pos_type(-1) on failure. Optionally specify which area of the stream buffer. The seek operation will fail if which does not include the flag bsl::ios_base::out or if the resulting absolute position is negative. |
seekpos [virtual] | Set the position indicator to the specified position and return the resulting absolute position on success or pos_type(-1) on failure. Optionally specify which area of the stream buffer. The seekpos operation will fail if which does not include the flag bsl::ios_base::out or if position is negative. |
sync [virtual] | Set d_dataLength to the amount of data that has been written to this stream buffer, from the beginning of the stream to the current pptr() position and return 0. Note that if pptr() points into the overflow buffer, this size the initial buffer, plus the portion of the overflow buffer that has been written to. |
xsputn [virtual] | Write the specified numChars characters from the specified source to the stream buffer. Return the number of characters successfully written. The behavior is undefined unless '(source && 0 < numChars) || 0 == numChars'. |