Constructors
Declared in <bdljsn_jsonnumber.h>
Create a JsonNumber having the value "0". Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory.
JsonNumber();
» more...
Create a JsonNumber object having the same value and the same allocator as the specified original object. The value of original becomes unspecified but valid, and its allocator remains unchanged.
JsonNumber(bslmf::MovableRef<JsonNumber> original) noexcept;
» more...
Create a JsonNumber object having the same value and the same allocator as the specified text. The contents of the value string becomes unspecified but valid, and its allocator remains unchanged. The behavior is undefined unless isValidNumber(text) is true. See {JSON Textual Specification}.
explicit
JsonNumber(bslmf::MovableRef<bsl::string> text);
» more...
Create a JsonNumber having the value "0" that uses the specified allocator (e.g., the address of a bslma::Allocator object) to supply memory.
explicit
JsonNumber(allocator_type const& allocator);
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
bdldfp::Decimal64 value,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
double value,
allocator_type const& allocator = allocator_type());
» more...
Create a JsonNumber having the specified value. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory. The behavior is undefined if the value is infinite (INF) or not-a-number (NaN).
explicit
JsonNumber(
float value,
allocator_type const& allocator = allocator_type());
» more...
Create a JsonNumber having the specified value. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory.
explicit
JsonNumber(
int value,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
long value,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
long long value,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
unsigned int value,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
unsigned long value,
allocator_type const& allocator = allocator_type());
» more...
Create a JsonNumber having the specified value. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory.
explicit
JsonNumber(
unsigned long long value,
allocator_type const& allocator = allocator_type());
» more...
Create a JsonNumber object having the same value as the specified original object, using the specified allocator (e.g., the address of a bslma::Allocator object) to supply memory. The allocator of original remains unchanged. If original and the newly created object have the same allocator then the value of original becomes unspecified but valid, and no exceptions will be thrown; otherwise original is unchanged (and an exception may be thrown).
JsonNumber(
bslmf::MovableRef<JsonNumber> original,
allocator_type const& allocator);
» more...
Create a JsonNumber object having the same value as the specified text, using the specified allocator (e.g., the address of a bslma::Allocator object) to supply memory. The allocator of the text string remains unchanged. If the text and the newly created object have the same allocator then the contents of text string becomes unspecified but valid, and no exceptions will be thrown; otherwise the text string is unchanged and an exception may be thrown. The behavior is undefined unless isValidNumber(text) is true. See {JSON Textual Specification}.
explicit
JsonNumber(
bslmf::MovableRef<bsl::string> text,
allocator_type const& allocator);
» more...
Create a JsonNumber object having the same value as the specified original object. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory.
JsonNumber(
JsonNumber const& original,
allocator_type const& allocator = allocator_type());
» more...
Same as the related overload above for JsonNumber.
explicit
JsonNumber(
std::string_view const& text,
allocator_type const& allocator = allocator_type());
» more...
Create a JsonNumber having the value of the specified text. Optionally specify an allocator (e.g., the address of a bslma::Allocator object) used to supply memory. The behavior is undefined unless isValidJsonNumber(text) is true. See {JSON Textual Specification}.
explicit
JsonNumber(
char const* text,
allocator_type const& allocator = allocator_type());
» more...