libzypp 17.37.17
MediaPriority.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_MEDIA_MEDIAPRIORITY_H
13#define ZYPP_MEDIA_MEDIAPRIORITY_H
14
15#include <string>
16
18namespace zypp
19{
20
21 class Url;
22
24 namespace media
25 {
26
28 //
29 // CLASS NAME : MediaPriority
30 //
44 {
45 public:
46 using value_type = int;
47
48 public:
51 : _val( 0 )
52 {}
53
56 : _val( val_r )
57 {}
58
60 MediaPriority( const std::string & scheme_r );
61
63 MediaPriority( const Url & url_r );
64
65 public:
68 { _val = rhs; return *this; }
69
71 MediaPriority & operator=( const std::string & scheme_r )
72 { _val = MediaPriority(scheme_r); return *this; }
73
75 MediaPriority & operator=( const Url & url_r )
76 { _val = MediaPriority(url_r); return *this; }
77
78 public:
81
82 value_type & get() { return _val; }
84 const value_type & get() const { return _val; }
86 operator value_type &() { return get(); }
88 operator const value_type &() const { return get(); }
90
91 private:
93 };
94
96 } // namespace media
99} // namespace zypp
101#endif // ZYPP_MEDIA_MEDIAPRIORITY_H
Url manipulation class.
Definition Url.h:93
value_type & get()
Conversion to value_type.
MediaPriority & operator=(const std::string &scheme_r)
Assign priority of scheme string.
MediaPriority & operator=(value_type rhs)
Assign.
MediaPriority & operator=(const Url &url_r)
Assign priority of scheme string defined by Url.
MediaPriority(value_type val_r)
Copy ctor.
const value_type & get() const
Explicit.
Easy-to use interface to the ZYPP dependency resolver.