summaryrefslogtreecommitdiff
path: root/include/nmeaparse/NumberConversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/nmeaparse/NumberConversion.h')
-rw-r--r--include/nmeaparse/NumberConversion.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/nmeaparse/NumberConversion.h b/include/nmeaparse/NumberConversion.h
new file mode 100644
index 0000000..b872124
--- /dev/null
+++ b/include/nmeaparse/NumberConversion.h
@@ -0,0 +1,47 @@
+/*
+ * NumberConversion.h
+ *
+ * Created on: Aug 14, 2014
+ * Author: Cameron Karlsson
+ */
+
+#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_ */