class io_resource


class io_resource
    : public input_resource
    , public output_resource

Description

An I/O resource is both a source of input and a destination for output. It's an object you can read data from and write data to.

Public Member Functions

explicit
io_resource (
    std::size_t buffer_capacity
)

Constructs an I/O resource with the given buffer capacity.

Parameters:
  • buffer_capacity:

    The capacity of the I/O buffer. If this is zero, the I/O resource is completely unbuffered.

io_resource (
    const io_resource& other
)

Copy-constructs an io_resource from an existing one.

Parameters:
  • other:

    The io_resource to copy from.

io_resource&
operator = (
    const io_resource& other
)

Copy-assigns an io_resource into this one.

Parameters:
  • other:

    The io_resource to copy from.

io_resource (
    io_resource&& other
)
noexcept

Move-constructs an io_resource from an existing one.

Parameters:
  • other:

    The io_resource to move from.

io_resource&
operator = (
    io_resource&& other
)
noexcept

Move-assigns an io_resource into this one.

Parameters:
  • other:

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