top | up | prev | next

JsonNumber Class

Definition at line 53 of Json.hpp

Constructors

JsonNumber()
JsonNumber(double value_)

Member Functions

JsonValue* Clone() const override
std::string ToString() const override
double Value() const

Member Variables

double value

Constructor Details

JsonNumber Constructor

soulng::util::JsonNumber::JsonNumber()

Definition at line 94 of Json.cpp :
 94 : JsonValue(JsonValueType::number)value(0.0)
 95 {
 96 }


Declaration at line 56 of Json.hpp


JsonNumber Constructor

soulng::util::JsonNumber::JsonNumber(double value_)

Definition at line 98 of Json.cpp :
 98 : JsonValue(JsonValueType::number)value(value_)
 99 {
100 }


Declaration at line 57 of Json.hpp


Member Function Details

Clone Member Function

JsonValue * soulng::util::JsonNumber::Clone() const override

Definition at line 102 of Json.cpp :
103 {
104     return new JsonNumber(value);
105 }


Declaration at line 58 of Json.hpp

Base class overridden functions: soulng::util::JsonValue::Clone


ToString Member Function

std::string soulng::util::JsonNumber::ToString() const override

Definition at line 107 of Json.cpp :
108 {
109     return std::to_string(value);
110 }


Declaration at line 60 of Json.hpp

Base class overridden functions: soulng::util::JsonValue::ToString


Value Member Function

double soulng::util::JsonNumber::Value() const

Definition at line 59 of Json.hpp :
 59 { return value; }


top | up | prev | next