// Created: 10/09/98
// RCS-ID: $Id$
// Copyright: (c)
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#if wxUSE_IOSTREAMH
# include <fstream.h>
#else
# include <fstream>
-# ifdef _MSC_VER
- using namespace std;
-# endif
#endif
#include "wx/stream.h"
return TRUE;
}
+#ifdef HAVE_BOOL
/*
* wxVariantDataBool
*/
m_value = (atol((const char*) str) != 0);
return TRUE;
}
+#endif // HAVE_BOOL
/*
* wxVariantDataChar
m_name = name;
}
+#ifdef HAVE_BOOL
wxVariant::wxVariant(bool val, const wxString& name)
{
m_data = new wxVariantDataBool(val);
m_name = name;
}
+#endif
wxVariant::wxVariant(char val, const wxString& name)
{
}
}
+#ifdef HAVE_BOOL
bool wxVariant::operator== (bool value) const
{
bool thisValue;
m_data = new wxVariantDataBool(value);
}
}
+#endif // HAVE_BOOL
bool wxVariant::operator== (const wxString& value) const
{
*value = (long) (((wxVariantDataReal*)GetData())->GetValue());
else if (type == "long")
*value = ((wxVariantDataLong*)GetData())->GetValue();
+#ifdef HAVE_BOOL
else if (type == "bool")
*value = (long) (((wxVariantDataBool*)GetData())->GetValue());
+#endif
else if (type == "string")
*value = atol((const char*) ((wxVariantDataString*)GetData())->GetValue());
else
*value = ((int) (((wxVariantDataReal*)GetData())->GetValue()) != 0);
else if (type == "long")
*value = (((wxVariantDataLong*)GetData())->GetValue() != 0);
+#ifdef HAVE_BOOL
else if (type == "bool")
*value = ((wxVariantDataBool*)GetData())->GetValue();
+#endif
else if (type == "string")
{
wxString val(((wxVariantDataString*)GetData())->GetValue());
*value = ((wxVariantDataReal*)GetData())->GetValue();
else if (type == "long")
*value = (double) (((wxVariantDataLong*)GetData())->GetValue());
+#ifdef HAVE_BOOL
else if (type == "bool")
*value = (double) (((wxVariantDataBool*)GetData())->GetValue());
+#endif
else if (type == "string")
*value = (double) atof((const char*) ((wxVariantDataString*)GetData())->GetValue());
else
*value = ((wxVariantDataChar*)GetData())->GetValue();
else if (type == "long")
*value = (char) (((wxVariantDataLong*)GetData())->GetValue());
+#ifdef HAVE_BOOL
else if (type == "bool")
*value = (char) (((wxVariantDataBool*)GetData())->GetValue());
+#endif
else
return FALSE;