arcstk::v_1_0_0::ChecksumSource class
#include <verify.hpp>

Interface: unified access to checksum containers.

A checksum container contains several blocks while each block consists of an ARId and an ordered sequence of checksums. A single checksum is accessed by a block index in combination with the index of the checksum within the block.

A type T can be made available as a ChecksumSource via definig a subclass of ChecksumSourceOf<T>.

Derived classes

template<typename T>
class v_1_0_0::ChecksumSourceOf
Base: wrap a checksum container type in a ChecksumSource.
template<typename T>
class v_1_0_0::ChecksumSourceOf
Base: wrap a checksum container type in a ChecksumSource.

Constructors, destructors, conversion operators

~ChecksumSource() defaulted virtual noexcept
Virtual default destructor.

Public functions

auto arcs_value(const size_type block_idx, const size_type track_idx) const -> const uint32_t&
Return the ARCS value on the specified position.
auto checksum(const size_type block_idx, const size_type track_idx) const -> Checksum
Read checksum on the specified position.
auto clone() const -> std::unique_ptr<ChecksumSource>
Returns a deep copy of the instance.
auto confidence(const size_type block_idx, const size_type track_idx) const -> const unsigned&
Read confidence idx in section with the specified block_idx.
auto frame450_arcs_value(const size_type block_idx, const size_type track_idx) const -> const uint32_t&
Return the ARCS value of frame 450 on the specified position.
auto id(const size_type block_idx) const -> ARId
Read id in section with the specified block_idx.
auto size() const -> size_type
Number of blocks.
auto size(const size_type block_idx) const -> size_type
Size of the block specified by block_idx.

Function documentation

const uint32_t& arcstk::v_1_0_0::ChecksumSource::arcs_value(const size_type block_idx, const size_type track_idx) const

Return the ARCS value on the specified position.

Parameters
block_idx in 0-based block index to access
track_idx in 0-based track index to access
Returns The ARCS value of the specified index position

Checksum arcstk::v_1_0_0::ChecksumSource::checksum(const size_type block_idx, const size_type track_idx) const

Read checksum on the specified position.

Parameters
block_idx in 0-based block index to access
track_idx in 0-based track index to access
Returns The checksum of the specified index position

Note that the wrapping of the ARCS value involves a copy.

std::unique_ptr<ChecksumSource> arcstk::v_1_0_0::ChecksumSource::clone() const

Returns a deep copy of the instance.

Returns A deep copy of the instance

const unsigned& arcstk::v_1_0_0::ChecksumSource::confidence(const size_type block_idx, const size_type track_idx) const

Read confidence idx in section with the specified block_idx.

Parameters
block_idx in 0-based block index to access
track_idx in 0-based track index to access
Returns The confidence of the specified index position

const uint32_t& arcstk::v_1_0_0::ChecksumSource::frame450_arcs_value(const size_type block_idx, const size_type track_idx) const

Return the ARCS value of frame 450 on the specified position.

Parameters
block_idx in 0-based block index to access
track_idx in 0-based track index to access
Returns The ARCS value of frame 450 of the specified index position

ARId arcstk::v_1_0_0::ChecksumSource::id(const size_type block_idx) const

Read id in section with the specified block_idx.

Parameters
block_idx in 0-based block index to access
Returns The id of the specified block

size_type arcstk::v_1_0_0::ChecksumSource::size() const

Number of blocks.

Returns Number of blocks in this object

Greatest legal block is size() - 1.

size_type arcstk::v_1_0_0::ChecksumSource::size(const size_type block_idx) const

Size of the block specified by block_idx.

Parameters
block_idx in 0-based block index to access
Returns The size of the specified block

The number of tracks in this block is its size.