Struct ChunksIter

Struct Documentation

struct ChunksIter

Chunk forward iterator in order of offset.

Public Types

using iterator_category = std::forward_iterator_tag

Iterator category tag for forward iterator.

using value_type = const ChunkRef

Type of value pointed to by the iterator.

using difference_type = std::ptrdiff_t

Difference type between iterators.

using pointer = const std::unique_ptr<ChunkRef>

Pointer type returned by operator->.

using reference = const ChunkRef&

Reference type returned by operator*.

Public Functions

ChunksIter(const ChunksIter &other)

Initialize from another ChunksIter object.

Parameters:

other[in] – The other ChunksIter object to initalize from.

ChunksIter &operator=(const ChunksIter &other) = default

Default assign operator.

Parameters:

other[in] – The other ChunksIter to assign to this.

const ChunkRef operator*() const

Return a ChunkRef object associated with this ChunksIter object.

Throws:

std::logic_error – Exception on end of iteration.

Returns:

The ChunkRef object associated with this ChunksIter object.

const std::unique_ptr<ChunkRef> operator->() const

Return a ChunkRef pointer associated with this ChunksIter object.

Returns:

The ChunkRef pointer associated with this ChunksIter object.

ChunksIter &operator++()

Increment the ChunksIter iterator and return *this.

Returns:

The current ChunksIter object.

bool operator==(const ChunksIter &other) const

Equality operator to compare two ChunksIter objects.

Parameters:

other[in] – The other object to compare.

Returns:

Whether the two ChunksIter objects are the same.

std::string to_string() const

To String Functionality For ChunksIter.

Returns:

The string representation

bool done() const

Check if the ChunksIter is at the end of the iteration.

Returns:

True if the ChunksIter is at the end of the iteration,

void next()

Move iterator to the next chunk of “verified” chunks.

bool operator!=(const ChunksIter &other) const

Equality operator to compare two ChunksIter objects.

==(const ChunksIter& other)

Parameters:

other[in] – The other object to compare.

Returns:

Whether the two ChunksIter objects are not the same.