unicode fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-08-26 01:12:29 +00:00
parent b1f6de838e
commit c681bd248f
2 changed files with 13 additions and 8 deletions

View File

@@ -492,17 +492,22 @@ private :
class WXDLLIMPEXP_BASE wxCollectionTypeInfo : public wxTypeInfo
{
public :
wxCollectionTypeInfo( wxTypeInfo *elementType , converterToString_t to , converterFromString_t from , const wxString &name) :
wxCollectionTypeInfo( const wxString &elementName , converterToString_t to , converterFromString_t from , const wxString &name) :
wxTypeInfo( wxT_COLLECTION , to , from , name )
{ m_elementType = elementType ;}
{ m_elementTypeName = elementName ; m_elementType = NULL ;}
#if wxUSE_UNICODE
wxCollectionTypeInfo( wxTypeInfo *elementType , converterToString_t to , converterFromString_t from , const char *name ) :
wxCollectionTypeInfo( const char *elementName , converterToString_t to , converterFromString_t from , const char *name ) :
wxTypeInfo( wxT_COLLECTION , to , from , name )
{ m_elementType = elementType ;}
{ m_elementTypeName = wxString::FromAscii( elementName ) ; m_elementType = NULL ;}
#endif
const wxTypeInfo* GetElementType() const { return m_elementType ; }
const wxTypeInfo* GetElementType() const
{
if ( m_elementType == NULL )
m_elementType = wxTypeInfo::FindType( m_elementTypeName ) ;
return m_elementType ; }
private :
wxTypeInfo * m_elementType ;
mutable wxTypeInfo * m_elementType ;
wxString m_elementTypeName ;
} ;
// a delegate is an exposed event source
@@ -525,7 +530,7 @@ template<typename T> const wxTypeInfo* wxGetTypeInfo( T * ) { return wxTypeInfo:
wxCustomTypeInfo s_typeInfo##e(typeid(e).name() , &toString , &fromString) ;
#define WX_COLLECTION_TYPE_INFO( element , collection ) \
wxCollectionTypeInfo s_typeInfo##collection( (wxTypeInfo*) wxGetTypeInfo( (element *) NULL) , NULL , NULL , typeid(collection).name() ) ;
wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name() , NULL , NULL , typeid(collection).name() ) ;
// sometimes a compiler invents specializations that are nowhere called, use this macro to satisfy the refs

View File

@@ -280,7 +280,7 @@ wxTypeInfo *wxTypeInfo::FindType(const wxChar *typeName)
}
#if wxUSE_UNICODE
wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind , wxClassInfo* classInfo , converterToString_t to , converterFromString_t from , const char *name) :
wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind , wxClassInfo* classInfo , converterToString_t to , converterFromString_t from , const char *6name) :
wxTypeInfo( kind , to , from , name)
{ wxASSERT_MSG( kind == wxT_OBJECT_PTR || kind == wxT_OBJECT , wxT("Illegal Kind for Enum Type")) ; m_classInfo = classInfo ;}
#endif