9 #ifndef ZYPP_MEDIA_MEDIAURL_INCLUDED 10 #define ZYPP_MEDIA_MEDIAURL_INCLUDED 15 #include <unordered_map> 26 using SettingsMap = std::unordered_map<std::string, std::any>;
29 std::unordered_map<std::string, std::any> settings = {});
31 ~MediaUrl() =
default;
32 MediaUrl(
const MediaUrl &) =
default;
33 MediaUrl(MediaUrl &&) =
default;
34 MediaUrl &operator=(
const MediaUrl &) =
default;
35 MediaUrl &operator=(MediaUrl &&) =
default;
37 bool hasConfig(
const std::string &key )
const;
38 void setConfig(
const std::string &key, std::any value );
39 const std::any &getConfig(
const std::string &key )
const;
40 const SettingsMap &config()
const;
47 setConfig( key, std::make_any<T>( std::forward<T>(value) ) );
52 const std::any &c = getConfig(key);
55 const T* ref = std::any_cast<
const T>(&c);
57 throw std::out_of_range(
"Key was not found in settings map.");
64 SettingsMap _settings;
67 std::ostream &
operator<<( std::ostream &
str,
const MediaUrl & url );
72 bool operator<(
const MediaUrl &lhs,
const MediaUrl &rhs );
77 bool operator==(
const MediaUrl &lhs,
const MediaUrl &rhs );
80 bool operator!=(
const MediaUrl &lhs,
const MediaUrl &rhs );
82 #else // __cpp_lib_any 84 #endif // __cpp_lib_any
String related utilities and Regular expression matching.
typename enable_if< B, T >::type enable_if_t