added hex type

This commit is contained in:
john30
2014-12-03 20:57:22 +01:00
parent c9015eb4f4
commit eff24a8b06
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -165,6 +165,9 @@ void Appl::setOptVal(const char* option, const string value, DataType datatype)
case dt_bool:
m_optvals[option] = true;
break;
case dt_hex:
m_optvals[option] = strtol(value.c_str(), NULL, 16);
break;
case dt_int:
m_optvals[option] = strtol(value.c_str(), NULL, 10);
break;
+2 -1
View File
@@ -33,7 +33,8 @@ using namespace std;
enum DataType {
dt_none, /*!< default for __text_only__ */
dt_bool, /*!< boolean */
dt_int, /*!< integer */
dt_hex, /*!< hex integer */
dt_int, /*!< dec integer */
dt_long, /*!< long */
dt_float, /*!< float */
dt_string /*!< string */