source: rtos_arduino/trunk/arduino_lib/libraries/ArduinoJson/include/ArduinoJson/Internals/Parse.hpp@ 209

Last change on this file since 209 was 209, checked in by ertl-honda, 8 years ago

BlueMix用のフィアルを追加

File size: 924 bytes
Line 
1// Copyright Benoit Blanchon 2014-2016
2// MIT License
3//
4// Arduino JSON library
5// https://github.com/bblanchon/ArduinoJson
6// If you like this project, please add a star!
7
8#pragma once
9
10#include <stdlib.h>
11
12namespace ArduinoJson {
13namespace Internals {
14template <typename TFloat>
15TFloat parse(const char *);
16
17template <>
18inline float parse<float>(const char *s) {
19 return static_cast<float>(strtod(s, NULL));
20}
21
22template <>
23inline double parse<double>(const char *s) {
24 return strtod(s, NULL);
25}
26
27template <>
28inline long parse<long>(const char *s) {
29 return strtol(s, NULL, 10);
30}
31
32template <>
33inline int parse<int>(const char *s) {
34 return atoi(s);
35}
36
37#if ARDUINOJSON_USE_LONG_LONG
38template <>
39inline long long parse<long long>(const char *s) {
40 return strtoll(s, NULL, 10);
41}
42#endif
43
44#if ARDUINOJSON_USE_INT64
45template <>
46inline __int64 parse<__int64>(const char *s) {
47 return _strtoi64(s, NULL, 10);
48}
49#endif
50}
51}
Note: See TracBrowser for help on using the repository browser.