libzypp 17.38.14
zypp::json::Value Class Reference

#include <zypp-core/parser/json/JsonValue.h>

Public Types

enum  Type {
  NullType , BoolType , StringType , IntType ,
  UIntType , NumberType , ObjectType , ArrayType
}

Public Member Functions

 ~Value ()=default
 Value (const Value &)=default
 Value (Value &&)=default
Valueoperator= (const Value &)=default
Valueoperator= (Value &&)=default
 Value ()=default
 Value (std::nullptr_t)
 Value (bool val_r)
 Value (std::int8_t val_r)
 Value (std::int16_t val_r)
 Value (std::int32_t val_r)
 Value (std::int64_t val_r)
 Value (std::uint8_t val_r)
 Value (std::uint16_t val_r)
 Value (std::uint32_t val_r)
 Value (std::uint64_t val_r)
 Value (float val_r)
 Value (double val_r)
 Value (const char val_r)
 Value (const char *val_r)
 Value (std::string val_r)
 Value (Null val_r)
 Value (Bool val_r)
 Value (String val_r)
 Value (Int val_r)
 Value (UInt val_r)
 Value (Number val_r)
 Value (Object val_r)
 Value (Array val_r)
std::string asJSON () const
 JSON representation.
const NullasNull () const
const BoolasBool () const
const StringasString () const
const IntasInt () const
const UIntasUInt () const
const NumberasNumber () const
const ObjectasObject () const
const ArrayasArray () const
std::ostream & dumpOn (std::ostream &str) const
 Stream output.
bool isNull () const
Type type () const
bool operator== (const Value &other) const

Private Types

using JsonValueData = std::variant<Null, Bool, String, Int, UInt, Number, Object, Array>

Private Attributes

JsonValueData _value = Null()

Detailed Description

Definition at line 175 of file JsonValue.h.

Member Typedef Documentation

◆ JsonValueData

using zypp::json::Value::JsonValueData = std::variant<Null, Bool, String, Int, UInt, Number, Object, Array>
private

Definition at line 309 of file JsonValue.h.

Member Enumeration Documentation

◆ Type

Enumerator
NullType 
BoolType 
StringType 
IntType 
UIntType 
NumberType 
ObjectType 
ArrayType 

Definition at line 180 of file JsonValue.h.

Constructor & Destructor Documentation

◆ ~Value()

zypp::json::Value::~Value ( )
default

◆ Value() [1/26]

zypp::json::Value::Value ( const Value & )
default

◆ Value() [2/26]

zypp::json::Value::Value ( Value && )
default

◆ Value() [3/26]

zypp::json::Value::Value ( )
default

◆ Value() [4/26]

zypp::json::Value::Value ( std::nullptr_t )
inline

Definition at line 200 of file JsonValue.h.

◆ Value() [5/26]

zypp::json::Value::Value ( bool val_r)
inline

Definition at line 203 of file JsonValue.h.

◆ Value() [6/26]

zypp::json::Value::Value ( std::int8_t val_r)
inline

Definition at line 206 of file JsonValue.h.

◆ Value() [7/26]

zypp::json::Value::Value ( std::int16_t val_r)
inline

Definition at line 207 of file JsonValue.h.

◆ Value() [8/26]

zypp::json::Value::Value ( std::int32_t val_r)
inline

Definition at line 208 of file JsonValue.h.

◆ Value() [9/26]

zypp::json::Value::Value ( std::int64_t val_r)
inline

Definition at line 209 of file JsonValue.h.

◆ Value() [10/26]

zypp::json::Value::Value ( std::uint8_t val_r)
inline

Definition at line 211 of file JsonValue.h.

◆ Value() [11/26]

zypp::json::Value::Value ( std::uint16_t val_r)
inline

Definition at line 212 of file JsonValue.h.

◆ Value() [12/26]

zypp::json::Value::Value ( std::uint32_t val_r)
inline

Definition at line 213 of file JsonValue.h.

◆ Value() [13/26]

zypp::json::Value::Value ( std::uint64_t val_r)
inline

Definition at line 214 of file JsonValue.h.

◆ Value() [14/26]

zypp::json::Value::Value ( float val_r)
inline

Definition at line 216 of file JsonValue.h.

◆ Value() [15/26]

zypp::json::Value::Value ( double val_r)
inline

Definition at line 217 of file JsonValue.h.

◆ Value() [16/26]

zypp::json::Value::Value ( const char val_r)
inline

Definition at line 220 of file JsonValue.h.

◆ Value() [17/26]

zypp::json::Value::Value ( const char * val_r)
inline

Definition at line 221 of file JsonValue.h.

◆ Value() [18/26]

zypp::json::Value::Value ( std::string val_r)
inline

Definition at line 222 of file JsonValue.h.

◆ Value() [19/26]

zypp::json::Value::Value ( Null val_r)
inline

Definition at line 231 of file JsonValue.h.

◆ Value() [20/26]

zypp::json::Value::Value ( Bool val_r)
inline

Definition at line 232 of file JsonValue.h.

◆ Value() [21/26]

zypp::json::Value::Value ( String val_r)
inline

Definition at line 233 of file JsonValue.h.

◆ Value() [22/26]

zypp::json::Value::Value ( Int val_r)
inline

Definition at line 234 of file JsonValue.h.

◆ Value() [23/26]

zypp::json::Value::Value ( UInt val_r)
inline

Definition at line 235 of file JsonValue.h.

◆ Value() [24/26]

zypp::json::Value::Value ( Number val_r)
inline

Definition at line 236 of file JsonValue.h.

◆ Value() [25/26]

zypp::json::Value::Value ( Object val_r)
inline

Definition at line 237 of file JsonValue.h.

◆ Value() [26/26]

zypp::json::Value::Value ( Array val_r)
inline

Definition at line 238 of file JsonValue.h.

Member Function Documentation

◆ operator=() [1/2]

Value & zypp::json::Value::operator= ( const Value & )
default

◆ operator=() [2/2]

Value & zypp::json::Value::operator= ( Value && )
default

◆ asJSON()

std::string zypp::json::Value::asJSON ( ) const

JSON representation.

Definition at line 110 of file JsonValue.cc.

◆ asNull()

const Null & zypp::json::Value::asNull ( ) const
inline

Definition at line 243 of file JsonValue.h.

◆ asBool()

const Bool & zypp::json::Value::asBool ( ) const
inline

Definition at line 247 of file JsonValue.h.

◆ asString()

const String & zypp::json::Value::asString ( ) const
inline

Definition at line 251 of file JsonValue.h.

◆ asInt()

const Int & zypp::json::Value::asInt ( ) const
inline

Definition at line 255 of file JsonValue.h.

◆ asUInt()

const UInt & zypp::json::Value::asUInt ( ) const
inline

Definition at line 259 of file JsonValue.h.

◆ asNumber()

const Number & zypp::json::Value::asNumber ( ) const
inline

Definition at line 263 of file JsonValue.h.

◆ asObject()

const Object & zypp::json::Value::asObject ( ) const
inline

Definition at line 267 of file JsonValue.h.

◆ asArray()

const Array & zypp::json::Value::asArray ( ) const
inline

Definition at line 271 of file JsonValue.h.

◆ dumpOn()

std::ostream & zypp::json::Value::dumpOn ( std::ostream & str) const
inline

Stream output.

Definition at line 276 of file JsonValue.h.

◆ isNull()

bool zypp::json::Value::isNull ( ) const
inline

Definition at line 279 of file JsonValue.h.

◆ type()

Type zypp::json::Value::type ( ) const
inline

Definition at line 283 of file JsonValue.h.

◆ operator==()

bool zypp::json::Value::operator== ( const Value & other) const
inline

Definition at line 306 of file JsonValue.h.

Member Data Documentation

◆ _value

JsonValueData zypp::json::Value::_value = Null()
private

Definition at line 310 of file JsonValue.h.


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