arcstk::v_1_0_0::ARBlock class final

An album-related block of triplets as it occurrs in an AccurateRip response.

An AccurateRip response is in fact parsed as a sequence of ARBlocks.

Syntactically each ARBlock is an ordered pair of a header and a subsequent sequence of ARTriplets.

Semantically, an ARBlock contains exactly one ARTriplet for each track of the original disc. This makes the ARBlock in fact an ARCS set of the tracks on the disc along with their confidences and pressing offsets for a disc. The header contains the AccurateRip Id of the disc.

An AccurateRip response may contain different ARBlocks for a single disc id and the ARBlocks may differ in the ARCSs they contain for the tracks.

Public types

using const_iterator = const ARTriplet*
A const-iterator over the ARTriplets of an ARBlock.
using iterator = ARTriplet*
An iterator over the ARTriplets of an ARBlock.
using size_type = std::size_t
Size type for ARBlock.

Constructors, destructors, conversion operators

ARBlock(ARBlock&& rhs) noexcept
Move constructor.
ARBlock(ARId&& id, std::initializer_list<ARTriplet> triplets)
Constructor.
ARBlock(const ARBlock& rhs)
Copy constructor.
ARBlock(const ARId& id) explicit
Constructor.
ARBlock(std::unique_ptr<Impl> impl) noexcept
Constructor for predefined implementation.
~ARBlock() noexcept
Default destructor.

Public functions

auto at(const size_type index) const -> const ARTriplet&
The ARTriplet with the specified 0-based index.
auto begin() const -> const_iterator
Obtain a const_iterator pointing to first ARTriplet.
auto cbegin() const -> const_iterator
Obtain a const_iterator pointing to first ARTriplet.
auto cend() const -> const_iterator
Obtain a const_iterator pointing behind last ARTriplet.
auto end() const -> const_iterator
Obtain a const_iterator pointing behind last ARTriplet.
auto id() const -> const ARId& noexcept
The AccurateRip Id of this ARBlock.
auto operator[](const size_type index) const -> const ARTriplet&
The ARTriplet with the specified 0-based index.
auto size() const -> size_type noexcept
Total Number of ARTriplets in this ARBlock.

Function documentation

arcstk::v_1_0_0::ARBlock::ARBlock(ARBlock&& rhs) noexcept

Move constructor.

Parameters
rhs in Instance to move

arcstk::v_1_0_0::ARBlock::ARBlock(ARId&& id, std::initializer_list<ARTriplet> triplets)

Constructor.

Parameters
id in Id of this block
triplets in Sequence of triplets

This constructor is intended for testing purposes only.

arcstk::v_1_0_0::ARBlock::ARBlock(const ARBlock& rhs)

Copy constructor.

Parameters
rhs in Instance to copy

arcstk::v_1_0_0::ARBlock::ARBlock(const ARId& id) explicit

Constructor.

Parameters
id in AccurateRip id of the CD this ARBlock describes

arcstk::v_1_0_0::ARBlock::ARBlock(std::unique_ptr<Impl> impl) noexcept

Constructor for predefined implementation.

Parameters
impl in Implementation of this block

const ARTriplet& arcstk::v_1_0_0::ARBlock::at(const size_type index) const

The ARTriplet with the specified 0-based index.

Parameters
index in Index of the ARTriplet to read
Returns ARTriplet at index index.
Exceptions
std::out_of_range Iff index >= ARBlock::size().

Bounds checking is performed. If index is illegal, an exception is thrown.

const_iterator arcstk::v_1_0_0::ARBlock::begin() const

Obtain a const_iterator pointing to first ARTriplet.

Returns const_iterator pointing to first ARTriplet

const_iterator arcstk::v_1_0_0::ARBlock::cbegin() const

Obtain a const_iterator pointing to first ARTriplet.

Returns const_iterator pointing to first ARTriplet

const_iterator arcstk::v_1_0_0::ARBlock::cend() const

Obtain a const_iterator pointing behind last ARTriplet.

Returns const_iterator pointing behind last ARTriplet

const_iterator arcstk::v_1_0_0::ARBlock::end() const

Obtain a const_iterator pointing behind last ARTriplet.

Returns const_iterator pointing behind last ARTriplet

const ARId& arcstk::v_1_0_0::ARBlock::id() const noexcept

The AccurateRip Id of this ARBlock.

Returns ARId of this block

const ARTriplet& arcstk::v_1_0_0::ARBlock::operator[](const size_type index) const

The ARTriplet with the specified 0-based index.

Parameters
index in The 0-based index of the ARTriplet to return
Returns ARTriplet at the specified index

No bounds checking is performed. For index based access with bounds checking, see at().

size_type arcstk::v_1_0_0::ARBlock::size() const noexcept

Total Number of ARTriplets in this ARBlock.

Returns The total number of ARTriplets in this block.