#include <libmpd++/ContentPopularityRate.hh>
ContentPopularityRate::PR class
This is a container for the PR elements of a ContentPopularityRate.
◆ PR() [1/4]
com::bbc::libmpdpp::ContentPopularityRate::PR::PR |
( |
| ) |
|
|
delete |
Default constructor (deleted)
Please use the value assignment constructor to create a new PR. Since the value assign constructor's parameters are all optional, you can still use PR()
to use the default values.
◆ PR() [2/4]
com::bbc::libmpdpp::ContentPopularityRate::PR::PR |
( |
const std::optional< unsigned int > & | popularity_rate = std::nullopt, |
|
|
const std::optional< unsigned long > & | start = std::nullopt, |
|
|
int | r = 0 ) |
|
inline |
Value assignment constructor
Create a new PR with the values provided in popularity_rate
, start
and r
. If no parameters are given then this will default to no popularity rate, no start offset and an r value of 0.
- Parameters
-
popularity_rate | The popularity rate to set (default: no @popularityRate). |
start | The start offset to use (default: no @start). |
r | The r value for the popularity rate (default: 0). |
◆ PR() [3/4]
com::bbc::libmpdpp::ContentPopularityRate::PR::PR |
( |
const PR & | other | ) |
|
|
inline |
Copy constructor
Copy the value from other
to create a new PR.
- Parameters
-
other | The other PR to copy. |
◆ PR() [4/4]
com::bbc::libmpdpp::ContentPopularityRate::PR::PR |
( |
PR && | other | ) |
|
|
inline |
Move constructor
Move the values from other
to create a new PR.
- Parameters
-
other | The other PR to move the values from. |
◆ ~PR()
virtual com::bbc::libmpdpp::ContentPopularityRate::PR::~PR |
( |
| ) |
|
|
inlinevirtual |
◆ hasPopularityRate()
bool com::bbc::libmpdpp::ContentPopularityRate::PR::hasPopularityRate |
( |
| ) |
const |
|
inline |
Check if @popularityRate attribute is set
- Returns
true
if @popularityRate attribute has been set.
◆ hasStart()
bool com::bbc::libmpdpp::ContentPopularityRate::PR::hasStart |
( |
| ) |
const |
|
inline |
Check if @start attribute is set
- Returns
true
if @start attribute has been set.
◆ operator!=()
bool com::bbc::libmpdpp::ContentPopularityRate::PR::operator!= |
( |
const PR & | other | ) |
|
|
inline |
Inequality operator
Compare this PR to other
PR for differing values.
- Parameters
-
other | The other PR to compare to this one to see if they have different values. |
- Returns
true
if other
has a different value to this PR.
◆ operator=() [1/2]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::operator= |
( |
const PR & | other | ) |
|
|
inline |
Assignment operator
Set this PR to the same value as other
.
- Parameters
-
other | The other PR to copy/move the values from into this PR. |
- Returns
- This PR.
◆ operator=() [2/2]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::operator= |
( |
PR && | other | ) |
|
|
inline |
Assignment operator
Set this PR to the same value as other
.
- Parameters
-
other | The other PR to copy/move the values from into this PR. |
- Returns
- This PR.
◆ operator==()
bool com::bbc::libmpdpp::ContentPopularityRate::PR::operator== |
( |
const PR & | other | ) |
|
|
inline |
Equality operator
Compare this PR to other
PR for equal values.
- Parameters
-
other | The other PR to compare to this one to see if they have the same value. |
- Returns
true
if other
has the same value as this PR.
◆ popularityRate() [1/5]
const std::optional< unsigned int > & com::bbc::libmpdpp::ContentPopularityRate::PR::popularityRate |
( |
| ) |
const |
|
inline |
Get optional @popularityRate attribute value
- Returns
- The optional @popularityRate attribute value.
◆ popularityRate() [2/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::popularityRate |
( |
const std::nullopt_t & | | ) |
|
|
inline |
◆ popularityRate() [3/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::popularityRate |
( |
const std::optional< unsigned int > & | val | ) |
|
|
inline |
Set the @popularityRate attribute value
- Parameters
-
val | The value to set the @popularityRate attribute to. |
- Returns
- This ContentPopularityRate::PR.
◆ popularityRate() [4/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::popularityRate |
( |
std::optional< unsigned int > && | val | ) |
|
|
inline |
Set the @popularityRate attribute value
- Parameters
-
val | The value to set the @popularityRate attribute to. |
- Returns
- This ContentPopularityRate::PR.
◆ popularityRate() [5/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::popularityRate |
( |
unsigned int | val | ) |
|
|
inline |
Set the @popularityRate attribute value
- Parameters
-
val | The value to set the @popularityRate attribute to. |
- Returns
- This ContentPopularityRate::PR.
◆ r() [1/2]
int com::bbc::libmpdpp::ContentPopularityRate::PR::r |
( |
| ) |
const |
|
inline |
Get the @r attribute value
- Returns
- The @r attribute value.
◆ r() [2/2]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::r |
( |
int | val | ) |
|
|
inline |
Set the @r attribute value
The default for this value is 0, therefore setting the @r attribute to 0 will removing it from the MPD XML output.
- Parameters
-
val | The value to set the @r value to. |
- Returns
- This PR.
◆ start() [1/5]
const std::optional< unsigned long > & com::bbc::libmpdpp::ContentPopularityRate::PR::start |
( |
| ) |
const |
|
inline |
Get optional @start attribute value
- Returns
- The optional @start attribute value.
◆ start() [2/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::start |
( |
const std::nullopt_t & | | ) |
|
|
inline |
◆ start() [3/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::start |
( |
const std::optional< unsigned long > & | val | ) |
|
|
inline |
Set the @start attribute value
- Parameters
-
val | The value to set the @start attribute to. |
- Returns
- This ContentPopularityRate::PR.
◆ start() [4/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::start |
( |
std::optional< unsigned long > && | val | ) |
|
|
inline |
Set the @start attribute value
- Parameters
-
val | The value to set the @start attribute to. |
- Returns
- This ContentPopularityRate::PR.
◆ start() [5/5]
PR & com::bbc::libmpdpp::ContentPopularityRate::PR::start |
( |
unsigned long | val | ) |
|
|
inline |
Set the @start attribute value
- Parameters
-
val | The value to set the @start attribute to. |
- Returns
- This ContentPopularityRate::PR.
The documentation for this class was generated from the following file: