summaryrefslogtreecommitdiff
path: root/library/globalFunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/globalFunctions.cpp')
-rw-r--r--library/globalFunctions.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/library/globalFunctions.cpp b/library/globalFunctions.cpp
index 4b387293..7c4a1b92 100644
--- a/library/globalFunctions.cpp
+++ b/library/globalFunctions.cpp
@@ -2,6 +2,7 @@
#include "resources.h"
#include <wx/msgdlg.h>
#include <wx/file.h>
+#include <fstream>
std::string globalFunctions::numberToString(const unsigned int number)
@@ -20,6 +21,14 @@ std::string globalFunctions::numberToString(const int number)
}
+std::string globalFunctions::numberToString(const long number)
+{
+ char result[100];
+ sprintf(result, "%ld", number);
+ return std::string(result);
+}
+
+
std::string globalFunctions::numberToString(const float number)
{
char result[100];
@@ -52,14 +61,18 @@ int globalFunctions::stringToInt(const std::string& number)
}
-inline
+long globalFunctions::stringToLong(const std::string& number)
+{
+ return atol(number.c_str());
+}
+
+
double globalFunctions::stringToDouble(const std::string& number)
{
return atof(number.c_str());
}
-inline
int globalFunctions::wxStringToInt(const wxString& number)
{
long result = 0;
@@ -70,7 +83,6 @@ int globalFunctions::wxStringToInt(const wxString& number)
}
-inline
double globalFunctions::wxStringToDouble(const wxString& number)
{
double result = 0;
bgstack15