class final
#include <include/parse.hpp>
v_1_0_0::ARResponse Response content from AccurateRip when responding to an request.
An ARResponse represents the HTTP-response of AccurateRip to an request for some ARId.
Syntactically, an ARResponse is essentially an iterable sequence of ARBlocks.
Semantically, an ARResponse represents the collected checksums AccurateRip has obtained for albums with the specified ARId.
Although an ARResponse represents content that is usually not created by the client, the client may nonetheless create an ARResponse on its own or modify an existing instance. This allows for easy testing ARResponse objects.
Public types
- using const_iterator = const ARBlock*
- A const_
iterator over the ARBlocks of an ARResponse. - using iterator = ARBlock*
- An iterator over the ARBlocks of an ARResponse.
- using size_type = std::size_t
- Size type of ARResponse.
Constructors, destructors, conversion operators
- ARResponse()
- Constructor.
- ARResponse(ARResponse&& rhs) noexcept
- Move constructor.
- ARResponse(const ARResponse& rhs)
- Copy constructor.
- ARResponse(std::initializer_list<ARBlock> blocks)
- Constructor.
- ~ARResponse() noexcept
- Destructor.
Public functions
-
auto at(const size_
type index) const -> const ARBlock& - The ARBlock with the specified 0-based
index
. -
auto begin() const -> const_
iterator - Obtain a const_
iterator pointing to the first ARBlock. -
auto cbegin() const -> const_
iterator - Obtain a const_
iterator pointing to the first ARBlock. -
auto cend() const -> const_
iterator - Obtain a const_
iterator pointing behind the last ARBlock. -
auto end() const -> const_
iterator - Obtain a const_
iterator pointing behind the last ARBlock. -
auto operator[](const size_
type index) const -> const ARBlock& - The ARBlock with the specified 0-based
index
. -
auto size() const -> size_
type noexcept - Number of ARBlocks in this instance.
- auto tracks_per_block() const -> int noexcept
- Number of tracks per ARBlock.
Function documentation
arcstk:: v_1_0_0:: ARResponse:: ARResponse(ARResponse&& rhs) noexcept
Move constructor.
Parameters | |
---|---|
rhs in | Instance to move |
arcstk:: v_1_0_0:: ARResponse:: ARResponse(const ARResponse& rhs)
Copy constructor.
Parameters | |
---|---|
rhs in | Instance to copy |
arcstk:: v_1_0_0:: ARResponse:: ARResponse(std::initializer_list<ARBlock> blocks)
Constructor.
Parameters | |
---|---|
blocks in | Sequence of blocks |
This constructor is intended for testing purposes only.
const ARBlock& arcstk:: v_1_0_0:: ARResponse:: at(const size_ type index) const
The ARBlock with the specified 0-based index
.
Parameters | |
---|---|
index in | Index of the ARBlock to read |
Returns | ARBlock at index index . |
Exceptions | |
std::out_of_range | Iff index > ARResponse:: |
Bounds checking is performed. If index
is illegal, an exception is thrown.
const_ iterator arcstk:: v_1_0_0:: ARResponse:: begin() const
Obtain a const_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARResponse:: cbegin() const
Obtain a const_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARResponse:: cend() const
Obtain a const_
Returns | const_ |
---|
const_ iterator arcstk:: v_1_0_0:: ARResponse:: end() const
Obtain a const_
Returns | const_ |
---|
int arcstk:: v_1_0_0:: ARResponse:: tracks_per_block() const noexcept
Number of tracks per ARBlock.
Returns | Number of tracks per ARBlocks |
---|