9 #ifndef ZYPP_MEDIA_NG_HEADERVALUEMAP_H_INCLUDED 10 #define ZYPP_MEDIA_NG_HEADERVALUEMAP_H_INCLUDED 22 using value_type = std::variant<std::monostate, std::string, int32_t, int64_t, bool>;
44 const std::string &
asString ()
const;
45 int32_t
asInt ()
const;
69 using ValueMap = std::map<std::string, std::vector<Value>>;
80 using reference =
const std::pair<const std::string&, const Value&>;
83 ValueMap::const_iterator
_it;
94 const std::string &
key ()
const {
99 auto &l =
_it->second;
126 return !(*
this == other);
129 const ValueMap::const_iterator&
base()
const {
return _it; }
133 HeaderValueMap( std::initializer_list<ValueMap::value_type> init );
135 bool contains(
const std::string &key )
const;
136 bool contains(
const std::string_view &key )
const {
140 void set(
const std::string &key,
Value val );
141 void set(
const std::string &key, std::vector<Value> val );
142 void add(
const std::string &key,
const Value &val);
150 return values( std::string(key) );
153 const std::vector<Value> &
values (
const std::string_view &key )
const {
154 return values( std::string(key) );
169 const_iterator
erase(
const const_iterator &i );
170 bool erase(
const std::string &key );
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.