#include <coherence/io/AbstractWriteBuffer.hpp>
Inherits Object, and WriteBuffer::BufferOutput.
Inherited by DelegatingWriteBuffer::DelegatingBufferOutput, and OctetArrayWriteBuffer::OctetArrayBufferOutput.
Public Types | |||||||||||||||||||
typedef spec::Handle | Handle | ||||||||||||||||||
AbstractBufferOutput Handle definition. | |||||||||||||||||||
typedef spec::View | View | ||||||||||||||||||
AbstractBufferOutput View definition. | |||||||||||||||||||
typedef spec::Holder | Holder | ||||||||||||||||||
AbstractBufferOutput Holder definition. | |||||||||||||||||||
Public Member Functions | |||||||||||||||||||
virtual WriteBuffer::Handle | getBuffer () | ||||||||||||||||||
Get the WriteBuffer object that this BufferOutput is writing to.
| |||||||||||||||||||
virtual WriteBuffer::View | getBuffer () const | ||||||||||||||||||
Get the WriteBuffer object that this BufferOutput is writing to.
| |||||||||||||||||||
virtual size32_t | getOffset () const | ||||||||||||||||||
Determine the current offset of this BufferOutput within the underlying WriteBuffer.
| |||||||||||||||||||
virtual void | setOffset (size32_t of) | ||||||||||||||||||
Specify the offset of the next octet to write to the underlying WriteBuffer.
| |||||||||||||||||||
virtual void | write (octet_t b) | ||||||||||||||||||
Write the given octet.
| |||||||||||||||||||
virtual void | write (Array< octet_t >::View vab) | ||||||||||||||||||
Writes all the octets in the array vab .
| |||||||||||||||||||
virtual void | write (Array< octet_t >::View vab, size32_t of, size32_t cb) | ||||||||||||||||||
Writes cb octets starting at offset of from the array vab .
| |||||||||||||||||||
virtual void | writeBuffer (ReadBuffer::View vBuf) | ||||||||||||||||||
Write all the octets from the passed ReadBuffer object.
This is functionally equivalent to the following code:
| |||||||||||||||||||
virtual void | writeBuffer (ReadBuffer::View vBuf, size32_t of, size32_t cb) | ||||||||||||||||||
Write cb octets from the passed ReadBuffer object starting at offset of within the passed ReadBuffer.
This is functionally equivalent to the following code:
| |||||||||||||||||||
virtual void | writeBoolean (bool f) | ||||||||||||||||||
Write a boolean value.
| |||||||||||||||||||
virtual void | writeChar16 (wchar16_t ch) | ||||||||||||||||||
Write a 16-bit Unicode character value.
| |||||||||||||||||||
virtual void | writeString (String::View vs) | ||||||||||||||||||
Write a sequence of UTF-8 encoded 16-bit Unicode characters.
| |||||||||||||||||||
virtual void | writeInt16 (int16_t n) | ||||||||||||||||||
Write a 16-bit integer value.
| |||||||||||||||||||
virtual void | writeInt32 (int32_t n) | ||||||||||||||||||
Write a 32-bit integer value.
| |||||||||||||||||||
virtual void | writeInt64 (int64_t n) | ||||||||||||||||||
Write a 64-bit integer value.
| |||||||||||||||||||
virtual void | writeFloat32 (float32_t fl) | ||||||||||||||||||
Write a 32-bit floating-point value.
| |||||||||||||||||||
virtual void | writeFloat64 (float64_t dfl) | ||||||||||||||||||
Write a 64-bit floating-point value.
| |||||||||||||||||||
Protected Member Functions | |||||||||||||||||||
AbstractBufferOutput (AbstractWriteBuffer::Handle hBuf) | |||||||||||||||||||
Create a new AbstractBufferOutput instance that delegates to the given AbstractWriteBuffer. | |||||||||||||||||||
Protected Attributes | |||||||||||||||||||
FinalHandle < AbstractWriteBuffer > | f_hBuf | ||||||||||||||||||
The delegate AbstractWriteBuffer. | |||||||||||||||||||
size32_t | m_ofWrite | ||||||||||||||||||
Current write offset within the AbstractWriteBuffer. |
AbstractBufferOutput | ( | AbstractWriteBuffer::Handle | hBuf | ) | [protected] |
Create a new AbstractBufferOutput instance that delegates to the given AbstractWriteBuffer.
hBuf | the delegate AbstractWriteBuffer |