#include "wx/object.h"
#include "wx/hash.h"
#include "wx/memory.h"
+ #include "wx/crt.h"
#endif
#include <string.h>
wxClassInfo wxObject::ms_classInfo(ms_classParents , wxEmptyString , wxT("wxObject"),
(int) sizeof(wxObject), \
(wxObjectConstructorFn) 0 ,
- (wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 ,
+ NULL,NULL,0 , 0 ,
0 , wxVariantOfPtrToObjectConverterwxObject , wxVariantToObjectConverterwxObject , wxObjectToVariantConverterwxObject);
template<> void wxStringReadValue(const wxString & , wxObject * & ){assert(0) ;}
template<> void wxStringWriteValue(wxString & , wxObject* const & ){assert(0) ;}
// E.g. is wxWindow a kind of wxObject?
// Go from this class to superclass, taking into account
// two possible base classes.
-bool wxObject::IsKindOf(wxClassInfo *info) const
+bool wxObject::IsKindOf(const wxClassInfo *info) const
{
- wxClassInfo *thisInfo = GetClassInfo();
+ const wxClassInfo *thisInfo = GetClassInfo();
return (thisInfo) ? thisInfo->IsKindOf(info) : false ;
}
Unregister();
}
-wxClassInfo *wxClassInfo::FindClass(const wxChar *className)
+wxClassInfo *wxClassInfo::FindClass(const wxString& className)
{
if ( sm_classTable )
{
{
for ( wxClassInfo *info = sm_first; info ; info = info->m_next )
{
- if ( wxStrcmp(info->GetClassName(), className) == 0 )
+ if ( className == info->GetClassName() )
return info;
}
}
}
-wxObject *wxCreateDynamicObject(const wxChar *name)
+wxObject *wxCreateDynamicObject(const wxString& name)
{
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
DEBUG_PRINTF(wxObject *wxCreateDynamicObject)