class final
#include <include/parse.hpp>
v_1_0_0::ARBlock 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(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:: |
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_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARBlock:: cbegin() const
Obtain a const_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARBlock:: cend() const
Obtain a const_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARBlock:: end() const
Obtain a const_
Returns | const_ |
---|
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. |
---|