class output_resource


class output_resource
    : public virtual transfer_resource

Public Member Functions

explicit
output_resource (
    std::size_t buffer_capacity = io_buffer::default_buffer_capacity
)

Constructs an output resource with the given buffer capacity.

Parameters:
  • buffer_capacity:

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

virtual
std::size_t
write (
    const std::byte* data,
    std::size_t byte_count
)

Writes byte_count bytes from the data array to this output resource.

Parameters:
  • data:

    The array of bytes that will be written to this output resource.

  • byte_count:

    The number of bytes to write to this output resource.

void
flush ()

Flushes this output resource, ensuring that any data that has previously been requested to be written out actually gets written out.

Protected Member Functions

virtual
std::size_t
write_raw (
    const std::byte* data,
    std::size_t byte_count
)
= 0

Writes byte_count bytes from the data array to this output resource.

Parameters:
  • data:

    The array of bytes that will be written to this output resource.

  • byte_count:

    The number of bytes to write to this output resource.



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 2022.