blob: 342d200df8e30a4837775bb646fe108f424f1bdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*
* NumberConversion.h
*
* Created on: Aug 14, 2014
* Author: Cameron Karlsson
*
* See the license file included with this source.
*/
#ifndef NUMBERCONVERSION_H_
#define NUMBERCONVERSION_H_
#include <cstdint>
#include <string>
#include <sstream>
#include <exception>
namespace nmea {
class NumberConversionError : public std::exception {
public:
std::string message;
NumberConversionError(std::string msg)
: message(msg)
{};
virtual ~NumberConversionError()
{};
std::string what(){
return message;
}
};
double parseDouble(std::string s);
int64_t parseInt(std::string s, int radix = 10);
//void NumberConversion_test();
}
#endif /* NUMBERCONVERSION_H_ */
|