libmpd++
DASH MPD parsing and manipulation library
 
Loading...
Searching...
No Matches
SAP.hh
Go to the documentation of this file.
1#ifndef _BBC_PARSE_DASH_MPD_SAP_HH_
2#define _BBC_PARSE_DASH_MPD_SAP_HH_
3/*****************************************************************************
4 * DASH MPD parsing library in C++: SAP class
5 *****************************************************************************
6 * Copyright: (C) 2025 British Broadcasting Corporation
7 * Author(s): Dev Audsin <dev.audsin@bbc.co.uk>
8 * License: LGPLv3
9 *
10 * For full license terms please see the LICENSE file distributed with this
11 * library or refer to: https://www.gnu.org/licenses/lgpl-3.0.txt.
12 */
13#include <optional>
14#include <string>
15#include <sstream>
16
17#include "macros.hh"
18
21// Forward declarations for types only used by pointer or reference
22namespace xmlpp {
23 class Element;
24 class Node;
25}
28
30
37public:
38 using value_type = unsigned int;
39
40 SAP();
41 SAP(const std::string &sap_str);
43 SAP(const SAP&);
44 SAP(SAP&&);
45
46 virtual ~SAP() {};
47
48 SAP &operator=(const SAP&);
50
51 bool operator==(const SAP &other) const;
52
53 operator std::string() const;
54
55 value_type value() const { return m_value; }
56
58
60protected:
61 friend class AdaptationSet;
62 SAP(xmlpp::Node &node);
63 void setXMLElement(xmlpp::Element &elem) const;
65
66private:
67 void convertString(const std::string &sap_str);
68
69 value_type m_value;
70};
71
73
74/* vim:ts=8:sts=4:sw=4:expandtab:
75 */
76#endif /*_BBC_PARSE_DASH_MPD_SAP_HH_*/
AdaptationSet class.
Definition AdaptationSet.hh:60
SAP(value_type value)
SAP & operator=(SAP &&)
SAP & value(value_type val)
bool operator==(const SAP &other) const
SAP(const std::string &sap_str)
virtual ~SAP()
Definition SAP.hh:46
SAP & operator=(const SAP &)
value_type value() const
Definition SAP.hh:55
unsigned int value_type
Definition SAP.hh:38
#define LIBMPDPP_NAMESPACE_END
Definition macros.hh:54
#define LIBMPDPP_PUBLIC_API
Used to mark something as part of the public API.
Definition macros.hh:21
#define LIBMPDPP_NAMESPACE_BEGIN
Definition macros.hh:50