![]() |
SPT JSON API
1.0.0
Developed by Sans Pareil Technologies, Inc. (SPT)
|
Represents a JSON number value.
More...
#include <Number.h>
Inheritance diagram for spt::json::Number:
Collaboration diagram for spt::json::Number:Public Member Functions | |
| Number (int64_t ival) | |
| Number (double dval) | |
| Number (Number &&rhs) | |
| Move CTOR. More... | |
| Number & | operator= (Number &&rhs) |
| Move assignment operator. More... | |
| bool | isInt () const |
| bool | isFloat () const |
| int64_t | getInt () const |
| Number & | set (int64_t ival) |
| Update the value stored in this instance to the specified integral value. More... | |
| double | getFloat () const |
| Number & | set (double dval) |
| Update the value stored in this instance to the specified integral value. More... | |
Public Member Functions inherited from spt::json::Value | |
| virtual | ~Value () |
| Virtual DTOR for sub-classes. More... | |
| Value (Value &&rhs) | |
| Move CTOR. More... | |
| Value & | operator= (Value &&rhs) |
| Move assignment operator. More... | |
| Value (const Value &)=delete | |
| Copy CTOR. Deleted. More... | |
| Value & | operator= (Value &)=delete |
| Copy assignment operator deleted. More... | |
| Type | getType () const |
| Return the type of data that is represented by this instance. More... | |
Additional Inherited Members | |
Public Types inherited from spt::json::Value | |
| enum | Type : int8_t { Type::String, Type::Number, Type::Object, Type::Array, Type::Boolean, Type::Null } |
| Enumeration of JSON data types. More... | |
| typedef std::unique_ptr< Value > | Ptr |
| Unique pointer that holds a value instance. More... | |
Protected Member Functions inherited from spt::json::Value | |
| Value (Type t) | |
| CTOR with specified type. More... | |
Represents a JSON number value.
A number may be integral or floating point. Use the isInt or isFloat methods to determine whether the value represents an integral or floating value.
|
inlineexplicit |
| ival | Create a new instance with the specified integral value |
|
inlineexplicit |
| dval | Create a new instance with the specified float value. |
|
inline |
Move CTOR.
|
inline |
|
inline |
|
inline |
true if this instance was constructed using a double.
|
inline |
true if this instance was constructed using an integer.
|
inline |
Update the value stored in this instance to the specified integral value.
| ival | The new integral value to set |
|
inline |
Update the value stored in this instance to the specified integral value.
| dval | The new integral value to set |