#include <NumberToString.h>
static json_string NumberToString::_ftoa |
( |
json_number |
value | ) |
|
|
inlinestatic |
References _floatsAreEqual(), EXTRA_LONG, FLOAT_STRING, json_char, json_likely, JSON_TEXT, json_unlikely, and LFLOAT_STRING.
131 return _uitoa<unsigned EXTRA_LONG long>((
unsigned EXTRA_LONG long)value);
138 return _itoa<long EXTRA_LONG>((
long EXTRA_LONG)value);
141 #ifdef JSON_LESS_MEMORY
157 for(
json_char * pos = &num_str_result[0]; *pos; ++pos){
161 for(
json_char * runner = pos + 1; *runner; ++runner){
172 return json_string(num_str_result);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define json_unlikely(x)
Definition: Unknown_C.h:17
#define FLOAT_STRING
Definition: NumberToString.h:122
#define EXTRA_LONG
Definition: NumberToString.h:121
Definition: JSONMemory.h:129
#define json_char
Definition: Strings_Defs.h:21
double json_number
Definition: JSONDefs.h:91
#define json_likely(x)
Definition: Unknown_C.h:16
#define LFLOAT_STRING
Definition: NumberToString.h:123
static bool _floatsAreEqual(const json_number &one, const json_number &two) json_pure
Definition: NumberToString.h:41
static json_string NumberToString::_ftoa |
( |
json_number |
value | ) |
|
|
inlinestatic |
References _floatsAreEqual(), EXTRA_LONG, FLOAT_STRING, json_char, json_likely, JSON_TEXT, json_unlikely, and LFLOAT_STRING.
131 return _uitoa<unsigned EXTRA_LONG long>((
unsigned EXTRA_LONG long)value);
138 return _itoa<long EXTRA_LONG>((
long EXTRA_LONG)value);
141 #ifdef JSON_LESS_MEMORY
157 for(
json_char * pos = &num_str_result[0]; *pos; ++pos){
161 for(
json_char * runner = pos + 1; *runner; ++runner){
172 return json_string(num_str_result);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define LFLOAT_STRING
Definition: NumberToString.h:123
#define json_unlikely(x)
Definition: Unknown_C.h:17
static bool _floatsAreEqual(const json_number &one, const json_number &two) json_pure
Definition: NumberToString.h:41
Definition: JSONMemory.h:129
#define json_char
Definition: Strings_Defs.h:21
#define FLOAT_STRING
Definition: NumberToString.h:122
#define EXTRA_LONG
Definition: NumberToString.h:121
double json_number
Definition: JSONDefs.h:91
#define json_likely(x)
Definition: Unknown_C.h:16
template<typename T >
static json_string NumberToString::_itoa |
( |
T |
val | ) |
|
|
inlinestatic |
References END_MEM_SCOPE, json_char, JSON_TEXT, and START_MEM_SCOPE.
53 #ifdef JSON_LESS_MEMORY
63 long value = (long)val;
85 return json_string(runner);
90 return json_string(runner + 1);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define END_MEM_SCOPE
Definition: JSONDefs.h:89
Definition: JSONMemory.h:129
#define START_MEM_SCOPE
Definition: JSONDefs.h:88
#define json_char
Definition: Strings_Defs.h:21
Definition: NumberToString.h:15
template<typename T >
static json_string NumberToString::_itoa |
( |
T |
val | ) |
|
|
inlinestatic |
References END_MEM_SCOPE, json_char, JSON_TEXT, and START_MEM_SCOPE.
53 #ifdef JSON_LESS_MEMORY
63 long value = (long)val;
85 return json_string(runner);
90 return json_string(runner + 1);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define END_MEM_SCOPE
Definition: JSONDefs.h:89
Definition: JSONMemory.h:129
#define START_MEM_SCOPE
Definition: JSONDefs.h:88
#define json_char
Definition: Strings_Defs.h:21
Definition: NumberToString.h:15
template<typename T >
static json_string NumberToString::_uitoa |
( |
T |
val | ) |
|
|
inlinestatic |
References END_MEM_SCOPE, json_char, JSON_TEXT, and START_MEM_SCOPE.
96 #ifdef JSON_LESS_MEMORY
106 unsigned long value = (
unsigned long)val;
109 }
while(value /= 10);
112 return json_string(runner + 1);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define END_MEM_SCOPE
Definition: JSONDefs.h:89
Definition: JSONMemory.h:129
#define START_MEM_SCOPE
Definition: JSONDefs.h:88
#define json_char
Definition: Strings_Defs.h:21
Definition: NumberToString.h:15
template<typename T >
static json_string NumberToString::_uitoa |
( |
T |
val | ) |
|
|
inlinestatic |
References END_MEM_SCOPE, json_char, JSON_TEXT, and START_MEM_SCOPE.
96 #ifdef JSON_LESS_MEMORY
106 unsigned long value = (
unsigned long)val;
109 }
while(value /= 10);
112 return json_string(runner + 1);
#define JSON_TEXT(s)
Definition: Strings_Defs.h:30
#define END_MEM_SCOPE
Definition: JSONDefs.h:89
Definition: JSONMemory.h:129
#define START_MEM_SCOPE
Definition: JSONDefs.h:88
#define json_char
Definition: Strings_Defs.h:21
Definition: NumberToString.h:15
The documentation for this class was generated from the following file: