Definition at line 140 of file spec_test_generator.cpp.
◆ array
◆ object
◆ value() [1/10]
picojson::value::value |
( |
| ) |
|
|
inline |
◆ value() [2/10]
picojson::value::value |
( |
int | type, |
|
|
bool | ) |
|
inline |
Definition at line 226 of file spec_test_generator.cpp.
227 switch (type) {
228# define INIT(p, v) \
229 case p##type: u_.p = v; break
230 INIT(boolean_,
false);
232# ifdef PICOJSON_USE_INT64
234# endif
235 INIT(string_,
new std::string());
237 INIT(object_,
new object());
238# undef INIT
239 default: break;
240 }
241}
std::vector< value > array
◆ value() [3/10]
picojson::value::value |
( |
bool | b | ) |
|
|
inlineexplicit |
◆ value() [4/10]
picojson::value::value |
( |
double | n | ) |
|
|
inlineexplicit |
Definition at line 249 of file spec_test_generator.cpp.
250 if (
251# ifdef _MSC_VER
252 !_finite(n)
253# elif __cplusplus >= 201103L
254 std::isnan(n) || std::isinf(n)
255# else
257# endif
258 ) {
259 throw std::overflow_error("");
260 }
262}
◆ value() [5/10]
picojson::value::value |
( |
const std::string & | s | ) |
|
|
inlineexplicit |
◆ value() [6/10]
picojson::value::value |
( |
const array & | a | ) |
|
|
inlineexplicit |
◆ value() [7/10]
picojson::value::value |
( |
const object & | o | ) |
|
|
inlineexplicit |
◆ value() [8/10]
picojson::value::value |
( |
const char * | s | ) |
|
|
inlineexplicit |
◆ value() [9/10]
picojson::value::value |
( |
const char * | s, |
|
|
size_t | len ) |
|
inline |
◆ ~value()
picojson::value::~value |
( |
| ) |
|
|
inline |
◆ value() [10/10]
picojson::value::value |
( |
const value & | x | ) |
|
|
inline |
Definition at line 296 of file spec_test_generator.cpp.
298# define INIT(p, v) \
299 case p##type: u_.p = v; break
300 INIT(string_,
new std::string(*x.u_.string_));
302 INIT(object_,
new object(*x.u_.object_));
303# undef INIT
304 default:
u_ = x.u_;
break;
305 }
306}
◆ contains() [1/2]
bool picojson::value::contains |
( |
const size_t | idx | ) |
const |
|
inline |
◆ contains() [2/2]
bool picojson::value::contains |
( |
const std::string & | key | ) |
const |
|
inline |
◆ evaluate_as_boolean()
bool picojson::value::evaluate_as_boolean |
( |
| ) |
const |
|
inline |
Definition at line 407 of file spec_test_generator.cpp.
407 {
412# ifdef PICOJSON_USE_INT64
413 case int64_type:
return u_.int64_ != 0;
414# endif
416 default: return true;
417 }
418}
◆ get() [1/6]
T & picojson::value::get |
( |
| ) |
|
◆ get() [2/6]
const T & picojson::value::get |
( |
| ) |
const |
◆ get() [3/6]
value & picojson::value::get |
( |
const size_t | idx | ) |
|
|
inline |
◆ get() [4/6]
const value & picojson::value::get |
( |
const size_t | idx | ) |
const |
|
inline |
◆ get() [5/6]
value & picojson::value::get |
( |
const std::string & | key | ) |
|
|
inline |
◆ get() [6/6]
const value & picojson::value::get |
( |
const std::string & | key | ) |
const |
|
inline |
◆ is() [1/2]
bool picojson::value::is |
( |
| ) |
const |
◆ is() [2/2]
template<>
bool picojson::value::is |
( |
| ) |
const |
|
inline |
◆ operator=()
value & picojson::value::operator= |
( |
const value & | x | ) |
|
|
inline |
Definition at line 308 of file spec_test_generator.cpp.
308 {
309 if (this != &x) {
312 }
313 return *this;
314}
void swap(value &x) PICOJSON_NOEXCEPT
◆ serialize() [1/2]
std::string picojson::value::serialize |
( |
bool | prettify = false | ) |
const |
|
inline |
◆ serialize() [2/2]
template<typename Iter >
void picojson::value::serialize |
( |
Iter | os, |
|
|
bool | prettify = false ) const |
◆ set()
void picojson::value::set |
( |
const T & | | ) |
|
◆ swap()
void picojson::value::swap |
( |
value & | x | ) |
|
|
inline |
◆ to_str()
std::string picojson::value::to_str |
( |
| ) |
const |
|
inline |
Definition at line 457 of file spec_test_generator.cpp.
457 {
461# ifdef PICOJSON_USE_INT64
462 case int64_type: {
463 char buf[
sizeof(
"-9223372036854775808")];
466 }
467# endif
470 double tmp;
473# if PICOJSON_USE_LOCALE
474 char* decimal_point = localeconv()->decimal_point;
475 if (strcmp(decimal_point, ".") != 0) {
476 size_t decimal_point_len = strlen(decimal_point);
477 for (
char*
p =
buf; *
p !=
'\0'; ++
p) {
478 if (strncmp(
p, decimal_point, decimal_point_len) == 0) {
479 return std::string(
buf,
p) +
"." + (
p + decimal_point_len);
480 }
481 }
482 }
483# endif
485 }
490# ifdef _MSC_VER
491 __assume(0);
492# endif
493 }
494 return std::string();
495}
◆ type_
int picojson::value::type_ |
|
protected |
◆ u_
The documentation for this class was generated from the following file: