wxEnumData s_enumData##e( s_enumDataMembers##e ); \
wxEnumData *wxGetEnumData(e) { return &s_enumData##e; } \
template<> void wxStringReadValue(const wxString& s, e &data ) \
- { data = (e) s_enumData##e.GetEnumMemberValue(s); } \
+ { data = (e) s_enumData##e.GetEnumMemberValue(s.c_str()); } \
template<> void wxStringWriteValue(wxString &s, const e &data ) \
{ s = s_enumData##e.GetEnumMemberName((int)data); } \
void FromLong##e( long data, wxAny& result ) \
{
flag = array[i];
int ivalue;
- if ( edata->HasEnumMemberValue( flag, &ivalue ) )
+ if ( edata->HasEnumMemberValue( flag.c_str(), &ivalue ) )
{
data.m_data |= ivalue;
}
// statics:
+ // looks for the corresponding type, will return NULL if not found
static wxTypeInfo *FindType( const wxString& typeName );
private:
void Register();
const wxString &name = wxEmptyString ) :
wxTypeInfo( kind, to, from, name )
{ wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }
-
-#if 0 // wxUSE_UNICODE
- wxBuiltInTypeInfo( wxTypeKind kind, wxVariant2StringFnc to,
- wxString2VariantFnc from , const char *name ) :
- wxTypeInfo( kind, to, from, name )
- { wxASSERT_MSG( GetKind() < wxT_SET, wxT("Illegal Kind for Base Type") ); }
-#endif
};
class WXDLLIMPEXP_BASE wxCustomTypeInfo : public wxTypeInfo
wxString2VariantFnc from ) :
wxTypeInfo( wxT_CUSTOM, to, from, name )
{}
-
-#if 0 // wxUSE_UNICODE
- wxCustomTypeInfo( const char *name , wxVariant2StringFnc to,
- wxString2VariantFnc from ) :
- wxTypeInfo( wxT_CUSTOM, to, from, name )
- {}
-#endif
};
class WXDLLIMPEXP_BASE wxEnumTypeInfo : public wxTypeInfo
m_enumInfo = enumInfo;
}
-#if 0 //wxUSE_UNICODE
- wxEnumTypeInfo( wxTypeKind kind, wxEnumData* enumInfo, wxVariant2StringFnc to,
- wxString2VariantFnc from, converterToLong_t toLong,
- converterFromLong_t fromLong, const char * name ) :
- wxTypeInfo( kind, to, from, name ), m_toLong( toLong ), m_fromLong( fromLong )
- {
- wxASSERT_MSG( kind == wxT_ENUM || kind == wxT_SET,
- wxT("Illegal Kind for Enum Type"));
- m_enumInfo = enumInfo;
- }
-#endif
const wxEnumData* GetEnumData() const { return m_enumInfo; }
// convert a wxAny holding data of this type into a long
wxVariant2StringFnc to = NULL, wxString2VariantFnc from = NULL,
const wxString &name = wxEmptyString);
-#if 0 // wxUSE_UNICODE
- wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, wxVariant2StringFnc to,
- wxString2VariantFnc from , const char *name );
-#endif
-
const wxClassInfo *GetClassInfo() const { return m_classInfo; }
private:
wxTypeInfo( wxT_COLLECTION, to, from, name )
{ m_elementTypeName = elementName; m_elementType = NULL; }
-#if 0 // wxUSE_UNICODE
- wxCollectionTypeInfo( const char *elementName, wxVariant2StringFnc to,
- wxString2VariantFnc from , const char *name ) :
- wxTypeInfo( wxT_COLLECTION, to, from, name )
- { m_elementTypeName = wxString::FromAscii( elementName ); m_elementType = NULL; }
-#endif
-
const wxTypeInfo* GetElementType() const
{
if ( m_elementType == NULL )