libzypp 17.31.23
zyppng::HeaderValueMap Class Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/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, const Value &val)
 
void set (const std::string &key, 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 69 of file headervaluemap.h.

Member Typedef Documentation

◆ Value

Definition at line 72 of file headervaluemap.h.

◆ ValueMap

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

Definition at line 73 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 167 of file headervaluemap.cc.

◆ contains() [2/2]

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

Definition at line 123 of file headervaluemap.h.

◆ set() [1/2]

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

Definition at line 172 of file headervaluemap.cc.

◆ set() [2/2]

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

Definition at line 182 of file headervaluemap.cc.

◆ add()

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

Definition at line 192 of file headervaluemap.cc.

◆ clear()

void zyppng::HeaderValueMap::clear ( )

Definition at line 202 of file headervaluemap.cc.

◆ size()

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

Definition at line 207 of file headervaluemap.cc.

◆ values() [1/4]

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

Definition at line 212 of file headervaluemap.cc.

◆ values() [2/4]

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

Definition at line 217 of file headervaluemap.cc.

◆ values() [3/4]

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

Definition at line 136 of file headervaluemap.h.

◆ values() [4/4]

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

Definition at line 140 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 222 of file headervaluemap.cc.

◆ value() [2/2]

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

Definition at line 225 of file headervaluemap.cc.

◆ operator[]() [1/4]

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

Definition at line 232 of file headervaluemap.cc.

◆ operator[]() [2/4]

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

Definition at line 239 of file headervaluemap.cc.

◆ operator[]() [3/4]

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

Definition at line 244 of file headervaluemap.cc.

◆ operator[]() [4/4]

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

Definition at line 251 of file headervaluemap.cc.

◆ erase() [1/2]

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

Definition at line 256 of file headervaluemap.cc.

◆ erase() [2/2]

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

Definition at line 262 of file headervaluemap.cc.

◆ begin()

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

Definition at line 159 of file headervaluemap.h.

◆ end()

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

Definition at line 162 of file headervaluemap.h.

◆ beginList() [1/2]

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

Definition at line 166 of file headervaluemap.h.

◆ endList() [1/2]

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

Definition at line 169 of file headervaluemap.h.

◆ beginList() [2/2]

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

Definition at line 173 of file headervaluemap.h.

◆ endList() [2/2]

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

Definition at line 176 of file headervaluemap.h.

◆ cbeginList()

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

Definition at line 180 of file headervaluemap.h.

◆ cendList()

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

Definition at line 183 of file headervaluemap.h.

Member Data Documentation

◆ InvalidValue

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

Definition at line 75 of file headervaluemap.h.

◆ _values

ValueMap zyppng::HeaderValueMap::_values
private

Definition at line 188 of file headervaluemap.h.


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