summaryrefslogtreecommitdiff
path: root/src/datax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datax.cpp')
-rw-r--r--src/datax.cpp32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/datax.cpp b/src/datax.cpp
index e1e3f5f..d5a5b04 100644
--- a/src/datax.cpp
+++ b/src/datax.cpp
@@ -26,22 +26,28 @@ namespace W32DLib
// ------------------------------------------------------------
//
-DataX::DataX(DataX::EType type) : m_type(type)
+DataX::DataX(int value) : m_type(eInt)
{
- switch(m_type)
- {
- case eString:
- m_data=static_cast<void*>(new std::string());
- break;
+ m_data=static_cast<void*>(new int);
+ Set(value);
+}
- case eInt:
- m_data=static_cast<void*>(new int);
- break;
- case eBool:
- m_data=static_cast<void*>(new bool);
- break;
- }
+// ------------------------------------------------------------
+//
+DataX::DataX(const char *value) : m_type(eString)
+{
+ m_data=static_cast<void*>(new std::string());
+ Set(value);
+}
+
+
+// ------------------------------------------------------------
+//
+DataX::DataX(bool value) : m_type(eBool)
+{
+ m_data=static_cast<void*>(new bool);
+ Set(value);
}