summaryrefslogtreecommitdiff
path: root/src/datax.cpp
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-04-11 00:03:53 +0000
committerIan C <ianc@noddybox.co.uk>2005-04-11 00:03:53 +0000
commitf8ba03594573e8487927c236180ad5895e73db17 (patch)
tree7ca7b24be4ce8adb411bd74ec4c5fd27c8a360c7 /src/datax.cpp
parent517295ea0928dfd2bd30d997949c472f68d22e06 (diff)
Some changes and added RadioButton
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);
}