libzypp: zypp::json::Number Class Reference

libzypp 17.38.13

zypp::json::Number Class Reference

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

## Public Member Functions
| Number ()=default
| Number (double v)
| Number (float v)
| ~Number ()=default
| Number (const Number &)=default
| Number (Number &&)=default
Number & | operator= (const Number &)=default
Number & | operator= (Number &&)=default
| operator double () const
double | value () const
std::string | asJSON () const
| JSON representation.
std::ostream & | dumpOn (std::ostream &str) const
| Stream output.

## Static Public Member Functions
static zyppng::expected< Number > | fromString (const std::string &str)

## Private Attributes
double | _value = 0

## Detailed Description

Definition at line 19 of file JsonNumber.h.

## Constructor & Destructor Documentation

## ◆ Number() [1/5]

zypp::json::Number::Number | ( |  | ) |
| default

## ◆ Number() [2/5]

zypp::json::Number::Number | ( | double | v | ) |
| inlineexplicit

Definition at line 23 of file JsonNumber.h.

## ◆ Number() [3/5]

zypp::json::Number::Number | ( | float | v | ) |
| inlineexplicit

Definition at line 24 of file JsonNumber.h.

## ◆ ~Number()

zypp::json::Number::~Number | ( |  | ) |
| default

## ◆ Number() [4/5]

zypp::json::Number::Number | ( | const Number & |  | ) |
| default

## ◆ Number() [5/5]

zypp::json::Number::Number | ( | Number && |  | ) |
| default

## Member Function Documentation

## ◆ operator=() [1/2]

Number & zypp::json::Number::operator= | ( | const Number & |  | ) |
| default

## ◆ operator=() [2/2]

Number & zypp::json::Number::operator= | ( | Number && |  | ) |
| default

## ◆ fromString()

zyppng::expected< Number > zypp::json::Number::fromString | ( | const std::string & | str | ) |
| inlinestatic

Definition at line 32 of file JsonNumber.h.

## ◆ operator double()

zypp::json::Number::operator double | ( |  | ) | const
| inline

Definition at line 39 of file JsonNumber.h.

## ◆ value()

double zypp::json::Number::value | ( |  | ) | const
| inline

Definition at line 43 of file JsonNumber.h.

## ◆ asJSON()

std::string zypp::json::Number::asJSON | ( |  | ) | const
| inline

JSON representation.

Definition at line 48 of file JsonNumber.h.

## ◆ dumpOn()

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

Stream output.

Definition at line 52 of file JsonNumber.h.

## Member Data Documentation

## ◆ _value

double zypp::json::Number::_value = 0
| private

Definition at line 56 of file JsonNumber.h.

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

- zypp-core/parser/json/JsonNumber.h