libzypp 17.31.23
zyppng::HeaderValue Class Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-media/ng/headervaluemap.h>

Public Types

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

Public Member Functions

 HeaderValue ()
 
 HeaderValue (const HeaderValue &other)
 
 HeaderValue (HeaderValue &&other)
 
 HeaderValue (const bool val)
 
 HeaderValue (const int32_t val)
 
 HeaderValue (const int64_t val)
 
 HeaderValue (const double 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
 
double asDouble () const
 
bool asBool () const
 
value_typeasVariant ()
 
const value_typeasVariant () const
 
HeaderValueoperator= (const HeaderValue &other)
 
HeaderValueoperator= (HeaderValue &&other)
 
HeaderValueoperator= (const std::string &val)
 
HeaderValueoperator= (int32_t val)
 
HeaderValueoperator= (int64_t val)
 
HeaderValueoperator= (double 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, double, bool>

Definition at line 23 of file headervaluemap.h.

Constructor & Destructor Documentation

◆ HeaderValue() [1/10]

zyppng::HeaderValue::HeaderValue ( )

Definition at line 8 of file headervaluemap.cc.

◆ HeaderValue() [2/10]

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

Definition at line 12 of file headervaluemap.cc.

◆ HeaderValue() [3/10]

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

Definition at line 16 of file headervaluemap.cc.

◆ HeaderValue() [4/10]

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

Definition at line 20 of file headervaluemap.cc.

◆ HeaderValue() [5/10]

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

Definition at line 24 of file headervaluemap.cc.

◆ HeaderValue() [6/10]

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

Definition at line 28 of file headervaluemap.cc.

◆ HeaderValue() [7/10]

zyppng::HeaderValue::HeaderValue ( const double  val)

Definition at line 32 of file headervaluemap.cc.

◆ HeaderValue() [8/10]

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

Definition at line 44 of file headervaluemap.cc.

◆ HeaderValue() [9/10]

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

Definition at line 36 of file headervaluemap.cc.

◆ HeaderValue() [10/10]

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

Definition at line 40 of file headervaluemap.cc.

Member Function Documentation

◆ valid()

bool zyppng::HeaderValue::valid ( ) const

Definition at line 48 of file headervaluemap.cc.

◆ isString()

bool zyppng::HeaderValue::isString ( ) const

Definition at line 53 of file headervaluemap.cc.

◆ isInt()

bool zyppng::HeaderValue::isInt ( ) const

Definition at line 58 of file headervaluemap.cc.

◆ isInt64()

bool zyppng::HeaderValue::isInt64 ( ) const

Definition at line 63 of file headervaluemap.cc.

◆ isDouble()

bool zyppng::HeaderValue::isDouble ( ) const

Definition at line 68 of file headervaluemap.cc.

◆ isBool()

bool zyppng::HeaderValue::isBool ( ) const

Definition at line 73 of file headervaluemap.cc.

◆ asString()

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

Definition at line 78 of file headervaluemap.cc.

◆ asInt()

int32_t zyppng::HeaderValue::asInt ( ) const

Definition at line 83 of file headervaluemap.cc.

◆ asInt64()

int64_t zyppng::HeaderValue::asInt64 ( ) const

Definition at line 88 of file headervaluemap.cc.

◆ asDouble()

double zyppng::HeaderValue::asDouble ( ) const

Definition at line 95 of file headervaluemap.cc.

◆ asBool()

bool zyppng::HeaderValue::asBool ( ) const

Definition at line 100 of file headervaluemap.cc.

◆ asVariant() [1/2]

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

Definition at line 105 of file headervaluemap.cc.

◆ asVariant() [2/2]

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

Definition at line 110 of file headervaluemap.cc.

◆ operator=() [1/7]

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

Definition at line 115 of file headervaluemap.cc.

◆ operator=() [2/7]

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

Definition at line 126 of file headervaluemap.cc.

◆ operator=() [3/7]

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

Definition at line 132 of file headervaluemap.cc.

◆ operator=() [4/7]

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

Definition at line 138 of file headervaluemap.cc.

◆ operator=() [5/7]

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

Definition at line 144 of file headervaluemap.cc.

◆ operator=() [6/7]

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

Definition at line 150 of file headervaluemap.cc.

◆ operator=() [7/7]

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

Definition at line 156 of file headervaluemap.cc.

◆ operator==()

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

Definition at line 121 of file headervaluemap.cc.

Member Data Documentation

◆ _val

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

Definition at line 66 of file headervaluemap.h.


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