class data_output_stream


template <
    typename OutputResource
>
class data_output_stream
    : public output_stream<OutputResource>

Description

A data output stream is an object that allows you to write binary data to an output resource.

Public Aliases

using referenced_resource_type = OutputResource

The type of the referenced output resource.

Public Member Functions

explicit
data_output_stream (
    referenced_resource_type& resource,
    std::endian endianness = std::endian::big
)
noexcept

Constructs a data output stream from the given output resource and with the given endianness. The data output stream will hold a non-owning reference to the resource, which is expected to stay valid when using the data output stream.

Parameters:
  • resource:

    The output resource to write to.

  • endianness:

    The endianness that the data is going to be in.

data_output_stream (
    const data_output_stream& other
)

Copy-constructs a data_output_stream from an existing one.

Parameters:
  • other:

    The data_output_stream to copy from.

data_output_stream&
operator = (
    const data_output_stream& other
)

Copy-assigns a data_output_stream into this one.

Parameters:
  • other:

    The data_output_stream to copy from.

data_output_stream (
    data_output_stream&& other
)
noexcept

Move-constructs a data_output_stream from an existing one.

Parameters:
  • other:

    The data_output_stream to move from.

data_output_stream&
operator = (
    data_output_stream&& other
)
noexcept

Move-assigns a data_output_stream into this one.

Parameters:
  • other:

    The data_output_stream to move from.



Copyright © 2022-2025 Daniel T. McGinnis

CCL was first published in 2022, and is still actively maintained.

This website was first published in 2022, and is still actively maintained.

This specific web page was first published in 2023.