libzypp 17.37.17
zyppng::HeaderValueMap Class Reference

#include <zypp-media/ng/headervaluemap.h>

Classes

class  const_iterator

Public Types

using Value = HeaderValue
using ValueMap = std::map<std::string, std::vector<Value>>

Public Member Functions

 HeaderValueMap ()=default
 HeaderValueMap (std::initializer_list< ValueMap::value_type > init)
bool contains (const std::string &key) const
bool contains (const std::string_view &key) const
void set (const std::string &key, Value val)
void set (const std::string &key, std::vector< Value > val)
void add (const std::string &key, const Value &val)
void clear ()
ValueMap::size_type size () const noexcept
std::vector< Value > & values (const std::string &key)
const std::vector< Value > & values (const std::string &key) const
std::vector< Value > & values (const std::string_view &key)
const std::vector< Value > & values (const std::string_view &key) const
Value value (const std::string_view &str, const Value &defaultVal=Value()) const
Value value (const std::string &str, const Value &defaultVal=Value()) const
Valueoperator[] (const std::string &key)
Valueoperator[] (const std::string_view &key)
const Valueoperator[] (const std::string &key) const
const Valueoperator[] (const std::string_view &key) const
const_iterator erase (const const_iterator &i)
bool erase (const std::string &key)
const_iterator begin () const
const_iterator end () const
ValueMap::iterator beginList ()
ValueMap::iterator endList ()
ValueMap::const_iterator beginList () const
ValueMap::const_iterator endList () const
ValueMap::const_iterator cbeginList () const
ValueMap::const_iterator cendList () const

Static Public Attributes

static Value InvalidValue

Private Attributes

ValueMap _values

Detailed Description

Definition at line 66 of file headervaluemap.h.

Member Typedef Documentation

◆ Value

Definition at line 69 of file headervaluemap.h.

◆ ValueMap

using zyppng::HeaderValueMap::ValueMap = std::map<std::string, std::vector<Value>>

Definition at line 70 of file headervaluemap.h.

Constructor & Destructor Documentation

◆ HeaderValueMap() [1/2]

zyppng::HeaderValueMap::HeaderValueMap ( )
default

◆ HeaderValueMap() [2/2]

zyppng::HeaderValueMap::HeaderValueMap ( std::initializer_list< ValueMap::value_type > init)

Member Function Documentation

◆ contains() [1/2]

bool zyppng::HeaderValueMap::contains ( const std::string & key) const

Definition at line 147 of file headervaluemap.cc.

◆ contains() [2/2]

bool zyppng::HeaderValueMap::contains ( const std::string_view & key) const
inline

Definition at line 121 of file headervaluemap.h.

◆ set() [1/2]

void zyppng::HeaderValueMap::set ( const std::string & key,
Value val )

Definition at line 152 of file headervaluemap.cc.

◆ set() [2/2]

void zyppng::HeaderValueMap::set ( const std::string & key,
std::vector< Value > val )

Definition at line 162 of file headervaluemap.cc.

◆ add()

void zyppng::HeaderValueMap::add ( const std::string & key,
const Value & val )

Definition at line 172 of file headervaluemap.cc.

◆ clear()

void zyppng::HeaderValueMap::clear ( )

Definition at line 182 of file headervaluemap.cc.

◆ size()

HeaderValueMap::ValueMap::size_type zyppng::HeaderValueMap::size ( ) const
noexcept

Definition at line 187 of file headervaluemap.cc.

◆ values() [1/4]

std::vector< HeaderValueMap::Value > & zyppng::HeaderValueMap::values ( const std::string & key)

Definition at line 192 of file headervaluemap.cc.

◆ values() [2/4]

const std::vector< HeaderValueMap::Value > & zyppng::HeaderValueMap::values ( const std::string & key) const

Definition at line 197 of file headervaluemap.cc.

◆ values() [3/4]

std::vector< Value > & zyppng::HeaderValueMap::values ( const std::string_view & key)
inline

Definition at line 134 of file headervaluemap.h.

◆ values() [4/4]

const std::vector< Value > & zyppng::HeaderValueMap::values ( const std::string_view & key) const
inline

Definition at line 138 of file headervaluemap.h.

◆ value() [1/2]

HeaderValueMap::Value zyppng::HeaderValueMap::value ( const std::string_view & str,
const Value & defaultVal = Value() ) const

Returns the last entry with key str in the list of values or the default value specified in defaultVal

Definition at line 202 of file headervaluemap.cc.

◆ value() [2/2]

HeaderValueMap::Value zyppng::HeaderValueMap::value ( const std::string & str,
const Value & defaultVal = Value() ) const

Definition at line 205 of file headervaluemap.cc.

◆ operator[]() [1/4]

HeaderValueMap::Value & zyppng::HeaderValueMap::operator[] ( const std::string & key)

Definition at line 212 of file headervaluemap.cc.

◆ operator[]() [2/4]

HeaderValueMap::Value & zyppng::HeaderValueMap::operator[] ( const std::string_view & key)

Definition at line 219 of file headervaluemap.cc.

◆ operator[]() [3/4]

const HeaderValueMap::Value & zyppng::HeaderValueMap::operator[] ( const std::string & key) const

Definition at line 224 of file headervaluemap.cc.

◆ operator[]() [4/4]

const HeaderValueMap::Value & zyppng::HeaderValueMap::operator[] ( const std::string_view & key) const

Definition at line 231 of file headervaluemap.cc.

◆ erase() [1/2]

HeaderValueMap::const_iterator zyppng::HeaderValueMap::erase ( const const_iterator & i)

Definition at line 236 of file headervaluemap.cc.

◆ erase() [2/2]

bool zyppng::HeaderValueMap::erase ( const std::string & key)

Definition at line 242 of file headervaluemap.cc.

◆ begin()

const_iterator zyppng::HeaderValueMap::begin ( ) const
inline

Definition at line 157 of file headervaluemap.h.

◆ end()

const_iterator zyppng::HeaderValueMap::end ( ) const
inline

Definition at line 160 of file headervaluemap.h.

◆ beginList() [1/2]

ValueMap::iterator zyppng::HeaderValueMap::beginList ( )
inline

Definition at line 164 of file headervaluemap.h.

◆ endList() [1/2]

ValueMap::iterator zyppng::HeaderValueMap::endList ( )
inline

Definition at line 167 of file headervaluemap.h.

◆ beginList() [2/2]

ValueMap::const_iterator zyppng::HeaderValueMap::beginList ( ) const
inline

Definition at line 171 of file headervaluemap.h.

◆ endList() [2/2]

ValueMap::const_iterator zyppng::HeaderValueMap::endList ( ) const
inline

Definition at line 174 of file headervaluemap.h.

◆ cbeginList()

ValueMap::const_iterator zyppng::HeaderValueMap::cbeginList ( ) const
inline

Definition at line 178 of file headervaluemap.h.

◆ cendList()

ValueMap::const_iterator zyppng::HeaderValueMap::cendList ( ) const
inline

Definition at line 181 of file headervaluemap.h.

Member Data Documentation

◆ InvalidValue

HeaderValueMap::Value zyppng::HeaderValueMap::InvalidValue
static

Definition at line 72 of file headervaluemap.h.

◆ _values

ValueMap zyppng::HeaderValueMap::_values
private

Definition at line 186 of file headervaluemap.h.


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