libzypp  17.37.5
zypp::json::Int Class Reference

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

Public Member Functions

 Int ()=default
 
 Int (std::int64_t v)
 
 ~Int ()=default
 
 Int (const Int &)=default
 
 Int (Int &&)=default
 
Intoperator= (const Int &)=default
 
Intoperator= (Int &&)=default
 
 operator std::int64_t () const
 
std::int64_t value () const
 
std::string asJSON () const
 JSON representation. More...
 
std::ostream & dumpOn (std::ostream &str) const
 Stream output. More...
 

Static Public Member Functions

static zyppng::expected< IntfromString (const std::string &str)
 

Private Attributes

std::int64_t _value = 0
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Int &obj)
 

Detailed Description

Definition at line 66 of file JsonNumber.h.

Constructor & Destructor Documentation

◆ Int() [1/4]

zypp::json::Int::Int ( )
default

◆ Int() [2/4]

zypp::json::Int::Int ( std::int64_t  v)
inline

Definition at line 70 of file JsonNumber.h.

◆ ~Int()

zypp::json::Int::~Int ( )
default

◆ Int() [3/4]

zypp::json::Int::Int ( const Int )
default

◆ Int() [4/4]

zypp::json::Int::Int ( Int &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator std::int64_t()

zypp::json::Int::operator std::int64_t ( ) const
inline

Definition at line 78 of file JsonNumber.h.

◆ value()

std::int64_t zypp::json::Int::value ( ) const
inline

Definition at line 82 of file JsonNumber.h.

◆ fromString()

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

Definition at line 86 of file JsonNumber.h.

◆ asJSON()

std::string zypp::json::Int::asJSON ( ) const
inline

JSON representation.

Definition at line 94 of file JsonNumber.h.

◆ dumpOn()

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

Stream output.

Definition at line 98 of file JsonNumber.h.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  str,
const Int obj 
)
related

Stream output

Definition at line 106 of file JsonNumber.h.

Member Data Documentation

◆ _value

std::int64_t zypp::json::Int::_value = 0
private

Definition at line 102 of file JsonNumber.h.


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