class data_input_stream


template <
    typename InputResource
>
class data_input_stream
    : public input_stream<InputResource>

Description

A data input stream is an object that allows you to read binary data from an input resource.

Public Aliases

using referenced_resource_type = InputResource

The type of the referenced input resource.

Public Member Functions

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

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

Parameters:
  • resource:

    The input resource to read from.

  • endianness:

    The endianness that the data is expected to be in.

data_input_stream (
    const data_input_stream& other
)

Copy-constructs a data_input_stream from an existing one.

Parameters:
  • other:

    The data_input_stream to copy from.

data_input_stream&
operator = (
    const data_input_stream& other
)

Copy-assigns a data_input_stream into this one.

Parameters:
  • other:

    The data_input_stream to copy from.

data_input_stream (
    data_input_stream&& other
)
noexcept

Move-constructs a data_input_stream from an existing one.

Parameters:
  • other:

    The data_input_stream to move from.

data_input_stream&
operator = (
    data_input_stream&& other
)
noexcept

Move-assigns a data_input_stream into this one.

Parameters:
  • other:

    The data_input_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.