class seekable_io_resource


template <
    typename Position
>
class seekable_io_resource
    : public virtual seekable_input_resource<Position>
    , public virtual seekable_output_resource<Position>

Description

A seekable I/O resource is an I/O resource that can seek, that is, change where read and write operations will take place next.

Public Aliases

using position_type = Position

The type of this resource's position.

Public Member Functions

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

Constructs a seekable I/O resource with the given buffer capacity.

Parameters:
  • buffer_capacity:

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

seekable_io_resource (
    const seekable_io_resource& other
)

Copy-constructs a seekable_io_resource from an existing one.

Parameters:
  • other:

    The seekable_io_resource to copy from.

seekable_io_resource&
operator = (
    const seekable_io_resource& other
)

Copy-assigns a seekable_io_resource into this one.

Parameters:
  • other:

    The seekable_io_resource to copy from.

seekable_io_resource (
    seekable_io_resource&& other
)
noexcept

Move-constructs a seekable_io_resource from an existing one.

Parameters:
  • other:

    The seekable_io_resource to move from.

seekable_io_resource&
operator = (
    seekable_io_resource&& other
)
noexcept

Move-assigns a seekable_io_resource into this one.

Parameters:
  • other:

    The seekable_io_resource to move from.

void
set_position (
    position_type new_position,
    position_reference pr
)
noexcept override

Sets the position of this seekable I/O resource.

Parameters:
  • new_position:

    The new position of this seekable I/o resource.

  • pr:

    The reference that the new position is relative to.



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.