summaryrefslogtreecommitdiff
path: root/include/nmeaparse/NumberConversion.h
diff options
context:
space:
mode:
authorckgt <ckarlsson25@gmail.com>2015-03-28 19:08:43 -0400
committerckgt <ckarlsson25@gmail.com>2015-03-28 19:08:43 -0400
commit09a3c9c3485a023b5ae98652c46129941ca7fd41 (patch)
treefb3b89f819d54d3efdef291079ddd061c40a4eb5 /include/nmeaparse/NumberConversion.h
parent78627e9bc711b012d38855daeb004fe55b3d4d26 (diff)
Initial commit.
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_ */