Represents a byte buffer used for marshaling data using the Slice encoding. More...
#include <Ice/Ice.h>

Public Types | |
| using | size_type = std::size_t |
| The size type for this byte buffer. | |
Public Member Functions | |
| OutputStream (const CommunicatorPtr &communicator) | |
| Constructs an OutputStream using the encoding, format, string converter and wstring converter provided by the communicator. | |
| OutputStream (const CommunicatorPtr &communicator, EncodingVersion encoding) | |
| Constructs an OutputStream using the format, string converter and wstring converter provided by the communicator, and the specified encoding. | |
| OutputStream (EncodingVersion encoding=currentEncoding, FormatType format=FormatType::CompactFormat, StringConverterPtr stringConverter=nullptr, WstringConverterPtr wstringConverter=nullptr) | |
| Constructs an OutputStream. | |
| OutputStream (OutputStream &&other) noexcept | |
| Move constructor. | |
| OutputStream (std::pair< const std::byte *, const std::byte * > bytes, EncodingVersion encoding=currentEncoding, FormatType format=FormatType::CompactFormat, StringConverterPtr stringConverter=nullptr, WstringConverterPtr wstringConverter=nullptr) | |
| Constructs an OutputStream over an application-supplied buffer. | |
| void | clear () |
| Releases any data retained by encapsulations. | |
| void | endEncapsulation () |
| Ends the current encapsulation. | |
| void | endException () |
| Marks the end of an exception instance. | |
| void | endSize (size_type position) |
| Updates the size value at the given position. | |
| void | endSlice () |
| Marks the end of a class instance or exception slice. | |
| void | endValue () |
| Marks the end of a class instance. | |
| std::pair< const std::byte *, const std::byte * > | finished () |
| Indicates that marshaling is complete. | |
| void | finished (std::vector< std::byte > &v) |
| Indicates that marshaling is complete. | |
| const EncodingVersion & | getEncoding () const |
| Gets the current encoding version. | |
| OutputStream & | operator= (OutputStream &&other) noexcept |
| Move assignment operator. | |
| size_type | pos () |
| Gets the current position of the stream. | |
| void | resize (Container::size_type sz) |
| Resizes the stream to a new size. | |
| void | rewrite (std::int32_t v, size_type pos) |
| Overwrites a 32-bit integer value at the specified position in the stream. | |
| void | rewriteSize (std::int32_t v, Container::iterator dest) |
| Replaces a size value at the specified position in the stream. | |
| void | startEncapsulation () |
| Writes the start of an encapsulation using the default encoding version and class encoding format. | |
| void | startEncapsulation (const EncodingVersion &encoding, std::optional< FormatType > format) |
| Writes the start of an encapsulation using the specified encoding version and class encoding format. | |
| void | startException () |
| Marks the start of an exception instance. | |
| size_type | startSize () |
| Writes a placeholder value for the size and returns the starting position of the size value; after writing the data, call endSize to patch the placeholder with the actual size at the given position. | |
| void | startSlice (std::string_view typeId, int compactId, bool last) |
| Writes the start of a class instance or exception slice. | |
| void | startValue (const SlicedDataPtr &data) |
| Marks the start of a class instance. | |
| void | swap (OutputStream &other) noexcept |
| Swaps the contents of one stream with another. | |
| void | write (const bool *begin, const bool *end) |
| Writes a boolean sequence to the stream. | |
| void | write (const char *vdata, bool convert=true) |
| Writes a string to the stream. | |
| void | write (const char *vdata, size_t vsize, bool convert=true) |
| Writes a string to the stream. | |
| void | write (const double *begin, const double *end) |
| Writes a double sequence as a Slice double sequence. | |
| void | write (const float *begin, const float *end) |
| Writes a float sequence as a Slice float sequence. | |
| void | write (const std::byte *start, const std::byte *end) |
| Writes a byte sequence to the stream. | |
| void | write (const std::int16_t *begin, const std::int16_t *end) |
| Writes an int16_t sequence as a Slice short sequence. | |
| void | write (const std::int32_t *begin, const std::int32_t *end) |
| Writes an int sequence to the stream. | |
| void | write (const std::int64_t *begin, const std::int64_t *end) |
| Writes a long sequence to the stream. | |
| void | write (const std::string &v, bool convert=true) |
| Writes a string to the stream. | |
| void | write (const std::string *begin, const std::string *end, bool convert=true) |
| Writes a string sequence to the stream. | |
| void | write (const std::uint8_t *start, const std::uint8_t *end) |
| Writes a byte sequence to the stream. | |
| void | write (const std::wstring *begin, const std::wstring *end) |
| Writes a wide string sequence to the stream. | |
| template<typename T> | |
| void | write (const T &v) |
| Writes a value to the stream. | |
| template<typename T> | |
| void | write (std::int32_t tag, const std::optional< T > &v) |
| Writes an optional value to the stream. | |
| void | write (std::int32_t v, Container::iterator dest) |
| Overwrites a 32-bit integer value at the given position in the stream. | |
| void | write (std::string_view v, bool convert=true) |
| Writes a string view to the stream. | |
| template<typename T> | |
| void | writeAll (const T &v) |
| Writes a value (single element list) to the stream. | |
| template<typename T, typename... Te> | |
| void | writeAll (const T &v, const Te &... ve) |
| Writes a list of values to the stream. | |
| template<typename T> | |
| void | writeAll (std::initializer_list< std::int32_t > tags, const std::optional< T > &v) |
| Writes an optional value (single element list) to the stream. | |
| template<typename T, typename... Te> | |
| void | writeAll (std::initializer_list< std::int32_t > tags, const std::optional< T > &v, const std::optional< Te > &... ve) |
| Writes a list of optional values to the stream. | |
| template<size_t I = 0, typename... Te> | |
| writeAll (std::tuple< Te... > tuple) | |
| Writes a tuple to the stream. | |
| void | writeBlob (const std::byte *v, Container::size_type sz) |
| Copies the specified blob of bytes to the stream without modification. | |
| void | writeBlob (const std::vector< std::byte > &v) |
| Copies the specified blob of bytes to the stream without modification. | |
| void | writeEmptyEncapsulation (const EncodingVersion &encoding) |
| Writes an empty encapsulation using the specified encoding version. | |
| void | writeEncapsulation (const std::byte *v, std::int32_t sz) |
| Copies the marshaled form of an encapsulation to the buffer. | |
| void | writeEnum (std::int32_t v, std::int32_t maxValue) |
| Writes an enumerator to the stream. | |
| void | writeException (const UserException &v) |
| Writes a user exception to the stream. | |
| void | writeNullProxy () |
| Writes a null proxy to the stream. | |
| bool | writeOptional (std::int32_t tag, OptionalFormat format) |
| Writes the tag and format of an optional value. | |
| void | writePendingValues () |
| Encodes the state of class instances whose insertion was delayed during a previous call write. | |
| void | writeProxy (const ObjectPrx &v) |
| Writes a proxy to the stream. | |
| void | writeSize (std::int32_t v) |
| Writes a size value. | |
Represents a byte buffer used for marshaling data using the Slice encoding.
Definition at line 31 of file OutputStream.h.