class text_io_stream


template <
    typename IOResource
>
class text_io_stream
    : public text_input_stream<IOResource>
    , public text_output_stream<IOResource>

Description

A text I/O stream is an object that allows you to read and write text from/to an I/O resource.

Public Aliases

using referenced_resource_type = IOResource

The type of the referenced I/O resource.

Public Member Functions

text_io_stream (
    referenced_resource_type& resource,
    encoding_form ef,
    std::endian endianness = std::endian::big
)
noexcept

Constructs a text I/O stream from the given I/O resource and with the given encoding form and endianness. The text I/O stream will hold a non-owning reference to the resource, which is expected to stay valid when using the text I/O stream.

Parameters:
  • resource:

    The I/O resource to read from and write to.

  • ef:

    The encoding form that the text is expected to be in.

  • endianness:

    The endianness that the text is expected to be in.

text_io_stream (
    const text_io_stream& other
)

Copy-constructs a text_io_stream from an existing one.

Parameters:
  • other:

    The text_io_stream to copy from.

text_io_stream&
operator = (
    const text_io_stream& other
)

Copy-assigns a text_io_stream into this one.

Parameters:
  • other:

    The text_io_stream to copy from.

text_io_stream (
    text_io_stream&& other
)
noexcept

Move-constructs a text_io_stream from an existing one.

Parameters:
  • other:

    The text_io_stream to move from.

text_io_stream&
operator = (
    text_io_stream&& other
)
noexcept

Move-assigns a text_io_stream into this one.

Parameters:
  • other:

    The text_io_stream to move from.

referenced_resource_type*
operator -> ()
const noexcept

Returns a pointer to the referenced I/O resource, enabling use of the arrow operator.



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.