libzypp 17.37.17
zyppng::HeaderValue Class Reference

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

Public Types

using value_type = std::variant<std::monostate, std::string, int32_t, int64_t, bool>

Public Member Functions

 HeaderValue ()
 HeaderValue (const HeaderValue &other)
 HeaderValue (HeaderValue &&other) noexcept
 HeaderValue (const bool val)
 HeaderValue (const int32_t val)
 HeaderValue (const int64_t val)
 HeaderValue (std::string &&val)
 HeaderValue (const std::string &val)
 HeaderValue (const char *val)
bool valid () const
bool isString () const
bool isInt () const
bool isInt64 () const
bool isDouble () const
bool isBool () const
const std::string & asString () const
int32_t asInt () const
int64_t asInt64 () const
bool asBool () const
value_typeasVariant ()
const value_typeasVariant () const
HeaderValueoperator= (const HeaderValue &other)
HeaderValueoperator= (HeaderValue &&other) noexcept
HeaderValueoperator= (const std::string &val)
HeaderValueoperator= (int32_t val)
HeaderValueoperator= (int64_t val)
HeaderValueoperator= (bool val)
bool operator== (const HeaderValue &other) const

Private Attributes

zypp::RWCOW_pointer< value_type_val

Detailed Description

Definition at line 20 of file headervaluemap.h.

Member Typedef Documentation

◆ value_type

using zyppng::HeaderValue::value_type = std::variant<std::monostate, std::string, int32_t, int64_t, bool>

Definition at line 23 of file headervaluemap.h.

Constructor & Destructor Documentation

◆ HeaderValue() [1/9]

zyppng::HeaderValue::HeaderValue ( )

Definition at line 8 of file headervaluemap.cc.

◆ HeaderValue() [2/9]

zyppng::HeaderValue::HeaderValue ( const HeaderValue & other)

Definition at line 12 of file headervaluemap.cc.

◆ HeaderValue() [3/9]

zyppng::HeaderValue::HeaderValue ( HeaderValue && other)
noexcept

Definition at line 16 of file headervaluemap.cc.

◆ HeaderValue() [4/9]

zyppng::HeaderValue::HeaderValue ( const bool val)

Definition at line 20 of file headervaluemap.cc.

◆ HeaderValue() [5/9]

zyppng::HeaderValue::HeaderValue ( const int32_t val)

Definition at line 24 of file headervaluemap.cc.

◆ HeaderValue() [6/9]

zyppng::HeaderValue::HeaderValue ( const int64_t val)

Definition at line 28 of file headervaluemap.cc.

◆ HeaderValue() [7/9]

zyppng::HeaderValue::HeaderValue ( std::string && val)

Definition at line 40 of file headervaluemap.cc.

◆ HeaderValue() [8/9]

zyppng::HeaderValue::HeaderValue ( const std::string & val)

Definition at line 32 of file headervaluemap.cc.

◆ HeaderValue() [9/9]

zyppng::HeaderValue::HeaderValue ( const char * val)

Definition at line 36 of file headervaluemap.cc.

Member Function Documentation

◆ valid()

bool zyppng::HeaderValue::valid ( ) const

Definition at line 44 of file headervaluemap.cc.

◆ isString()

bool zyppng::HeaderValue::isString ( ) const

Definition at line 49 of file headervaluemap.cc.

◆ isInt()

bool zyppng::HeaderValue::isInt ( ) const

Definition at line 54 of file headervaluemap.cc.

◆ isInt64()

bool zyppng::HeaderValue::isInt64 ( ) const

Definition at line 59 of file headervaluemap.cc.

◆ isDouble()

bool zyppng::HeaderValue::isDouble ( ) const

◆ isBool()

bool zyppng::HeaderValue::isBool ( ) const

Definition at line 64 of file headervaluemap.cc.

◆ asString()

const std::string & zyppng::HeaderValue::asString ( ) const

Definition at line 69 of file headervaluemap.cc.

◆ asInt()

int32_t zyppng::HeaderValue::asInt ( ) const

Definition at line 74 of file headervaluemap.cc.

◆ asInt64()

int64_t zyppng::HeaderValue::asInt64 ( ) const

Definition at line 79 of file headervaluemap.cc.

◆ asBool()

bool zyppng::HeaderValue::asBool ( ) const

Definition at line 86 of file headervaluemap.cc.

◆ asVariant() [1/2]

HeaderValue::value_type & zyppng::HeaderValue::asVariant ( )

Definition at line 91 of file headervaluemap.cc.

◆ asVariant() [2/2]

const HeaderValue::value_type & zyppng::HeaderValue::asVariant ( ) const

Definition at line 96 of file headervaluemap.cc.

◆ operator=() [1/6]

HeaderValue & zyppng::HeaderValue::operator= ( const HeaderValue & other)

Definition at line 101 of file headervaluemap.cc.

◆ operator=() [2/6]

HeaderValue & zyppng::HeaderValue::operator= ( HeaderValue && other)
noexcept

Definition at line 112 of file headervaluemap.cc.

◆ operator=() [3/6]

HeaderValue & zyppng::HeaderValue::operator= ( const std::string & val)

Definition at line 118 of file headervaluemap.cc.

◆ operator=() [4/6]

HeaderValue & zyppng::HeaderValue::operator= ( int32_t val)

Definition at line 124 of file headervaluemap.cc.

◆ operator=() [5/6]

HeaderValue & zyppng::HeaderValue::operator= ( int64_t val)

Definition at line 130 of file headervaluemap.cc.

◆ operator=() [6/6]

HeaderValue & zyppng::HeaderValue::operator= ( bool val)

Definition at line 136 of file headervaluemap.cc.

◆ operator==()

bool zyppng::HeaderValue::operator== ( const HeaderValue & other) const

Definition at line 107 of file headervaluemap.cc.

Member Data Documentation

◆ _val

zypp::RWCOW_pointer<value_type> zyppng::HeaderValue::_val
private

Definition at line 63 of file headervaluemap.h.


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