added hex type
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user