libmpd++
DASH MPD parsing and manipulation library
 
Loading...
Searching...
No Matches
com::bbc::libmpdpp::Descriptor Class Reference

#include <libmpd++/Descriptor.hh>

Inheritance diagram for com::bbc::libmpdpp::Descriptor:

Public Member Functions

 Descriptor ()=delete
 
 Descriptor (const Descriptor &other)
 
 Descriptor (Descriptor &&other)
 
virtual ~Descriptor ()
 
Descriptoroperator= (const Descriptor &other)
 
Descriptoroperator= (Descriptor &&other)
 
bool operator== (const Descriptor &other) const
 
bool has_value () const
 
Descriptorvalue (const std::nullopt_t &)
 
bool has_id () const
 
Descriptorid (const std::nullopt_t &)
 
 Descriptor (const URI &scheme_id, const std::optional< std::string > &value=std::nullopt, const std::optional< std::string > &id=std::nullopt)
 Constructs a new Descriptor object.
 
 Descriptor (URI &&scheme_id, const std::optional< std::string > &value=std::nullopt, const std::optional< std::string > &id=std::nullopt)
 Constructs a new Descriptor object.
 
const URIschemeId () const
 
URIschemeId ()
 
DescriptorschemeId (const URI &scheme_id)
 
DescriptorschemeId (URI &&scheme_id)
 
const std::optional< std::string > & value () const
 
std::optional< std::string > & value ()
 
Descriptorvalue (const std::string &val)
 
Descriptorvalue (std::string &&val)
 
const std::optional< std::string > & id () const
 
std::optional< std::string > & id ()
 
Descriptorid (const std::string &id)
 
Descriptorid (std::string &&id)
 

Detailed Description

Descriptor class

This is a container for DASH MPD XML elements which use the DescriptorType from the XML schema. This type is defined in ISO 23009-1:2022 Clause 5.8.3.

Constructor & Destructor Documentation

◆ Descriptor() [1/5]

com::bbc::libmpdpp::Descriptor::Descriptor ( )
delete

Default constructor (deleted).

This constructor is explicitly deleted to prevent instantiation of a Descriptor object without the necessary initialization parameters. Users must utilize one of the provided parameterized constructors.

◆ Descriptor() [2/5]

com::bbc::libmpdpp::Descriptor::Descriptor ( const URI & scheme_id,
const std::optional< std::string > & value = std::nullopt,
const std::optional< std::string > & id = std::nullopt )
inline

Constructs a new Descriptor object.

This constructor initializes a Descriptor with a required scheme URI and optional value and identifier strings. The optional parameters default to std::nullopt when no value is provided.

Parameters
scheme_idThe URI specifying the scheme identifier for this descriptor.
valueAn optional string value associated with the descriptor. Defaults to std::nullopt.
idAn optional identifier string that further describes the descriptor. Defaults to std::nullopt.

◆ Descriptor() [3/5]

com::bbc::libmpdpp::Descriptor::Descriptor ( URI && scheme_id,
const std::optional< std::string > & value = std::nullopt,
const std::optional< std::string > & id = std::nullopt )
inline

Constructs a new Descriptor object.

This constructor initializes a Descriptor with a required scheme URI and optional value and identifier strings. The optional parameters default to std::nullopt when no value is provided.

Parameters
scheme_idThe URI specifying the scheme identifier for this descriptor.
valueAn optional string value associated with the descriptor. Defaults to std::nullopt.
idAn optional identifier string that further describes the descriptor. Defaults to std::nullopt.

◆ Descriptor() [4/5]

com::bbc::libmpdpp::Descriptor::Descriptor ( const Descriptor & other)
inline

Copy constructor

Creates a new Descriptor object which is a copy of other.

Parameters
otherThe Descriptor object to copy.

◆ Descriptor() [5/5]

com::bbc::libmpdpp::Descriptor::Descriptor ( Descriptor && other)
inline

Move constructor

Creates a new Descriptor object which transfers the resources from other.

Parameters
otherThe ContentPopularityRate object to move.

◆ ~Descriptor()

virtual com::bbc::libmpdpp::Descriptor::~Descriptor ( )
inlinevirtual

Destructor

Member Function Documentation

◆ has_id()

bool com::bbc::libmpdpp::Descriptor::has_id ( ) const
inline

Check if the id attribute is set

Returns
true if the id attribute has been set.

◆ has_value()

bool com::bbc::libmpdpp::Descriptor::has_value ( ) const
inline

Check if the value attribute is set

Returns
true if the value attribute has been set.

◆ id() [1/5]

std::optional< std::string > & com::bbc::libmpdpp::Descriptor::id ( )
inline

Get the optional id attribute value

Returns
The optional id attribute value.

◆ id() [2/5]

const std::optional< std::string > & com::bbc::libmpdpp::Descriptor::id ( ) const
inline

Get the optional id attribute value

Returns
The optional id attribute value.

◆ id() [3/5]

Descriptor & com::bbc::libmpdpp::Descriptor::id ( const std::nullopt_t & )
inline

Unset the id attribute value

Returns
This Descriptor.

◆ id() [4/5]

Descriptor & com::bbc::libmpdpp::Descriptor::id ( const std::string & id)
inline

Set the @id attribute value

Parameters
idThe value to set for the @id attribute.
Returns
This Descriptor.

◆ id() [5/5]

Descriptor & com::bbc::libmpdpp::Descriptor::id ( std::string && id)
inline

Set the @id attribute value

Parameters
idThe value to set for the @id attribute.
Returns
This Descriptor.

◆ operator=() [1/2]

Descriptor & com::bbc::libmpdpp::Descriptor::operator= ( const Descriptor & other)
inline

Copy operator

Copies the values from other into this Descriptor object.

Parameters
otherThe Descriptor object to copy.
Returns
This Descriptor object.

◆ operator=() [2/2]

Descriptor & com::bbc::libmpdpp::Descriptor::operator= ( Descriptor && other)
inline

Move operator

Transfers the resources from other into this Descriptor object.

Parameters
otherThe Descriptor object to move.
Returns
This Descriptor object.

◆ operator==()

bool com::bbc::libmpdpp::Descriptor::operator== ( const Descriptor & other) const
inline

Comparison operator

Parameters
otherThe other Descriptor to compare to this one.
Returns
true if the value of other is the same as the value of this Descriptor, otherwise false.

◆ schemeId() [1/4]

URI & com::bbc::libmpdpp::Descriptor::schemeId ( )
inline

Get the schemeId URI attribute value

Returns
The schemeId URI attribute value.

◆ schemeId() [2/4]

const URI & com::bbc::libmpdpp::Descriptor::schemeId ( ) const
inline

Get the schemeId URI attribute value

Returns
The schemeId URI attribute value.

◆ schemeId() [3/4]

Descriptor & com::bbc::libmpdpp::Descriptor::schemeId ( const URI & scheme_id)
inline

Set the @schemeIdUri attribute value

Parameters
scheme_idThe value to set for the @schemeIdUri attribute.
Returns
This Descriptor.

◆ schemeId() [4/4]

Descriptor & com::bbc::libmpdpp::Descriptor::schemeId ( URI && scheme_id)
inline

Set the @schemeIdUri attribute value

Parameters
scheme_idThe value to set for the @schemeIdUri attribute.
Returns
This Descriptor.

◆ value() [1/5]

std::optional< std::string > & com::bbc::libmpdpp::Descriptor::value ( )
inline

Get the optional id attribute value

Returns
The optional id attribute value.

◆ value() [2/5]

const std::optional< std::string > & com::bbc::libmpdpp::Descriptor::value ( ) const
inline

Get the optional id attribute value

Returns
The optional id attribute value.

◆ value() [3/5]

Descriptor & com::bbc::libmpdpp::Descriptor::value ( const std::nullopt_t & )
inline

Unset the value attribute

Returns
This Descriptor.

◆ value() [4/5]

Descriptor & com::bbc::libmpdpp::Descriptor::value ( const std::string & val)
inline

Set the @value attribute value

Parameters
valThe value to set for the @value attribute.
Returns
This Descriptor.

◆ value() [5/5]

Descriptor & com::bbc::libmpdpp::Descriptor::value ( std::string && val)
inline

Set the @value attribute value

Parameters
valThe value to set for the @value attribute.
Returns
This Descriptor.

The documentation for this class was generated from the following file: