Add factory functions for use with future unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2007-07-07 18:09:11 +00:00
parent 9bb3f212e2
commit ec0114abef

View File

@@ -29,6 +29,33 @@
// CoreFoundation conversion classes
// ============================================================================
/* Provide factory functions for unit tests. Not in any header. Do not
* assume ABI compatibility even within a given wxWidgets release.
*/
WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf( const char* name)
{
wxMBConv_cf *result = new wxMBConv_cf(name);
if(!result->IsOk())
{
delete result;
return NULL;
}
else
return result;
}
WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding)
{
wxMBConv_cf *result = new wxMBConv_cf(encoding);
if(!result->IsOk())
{
delete result;
return NULL;
}
else
return result;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
// Provide a constant for the wchat_t encoding used by the host platform.