]> git.saurik.com Git - wxWidgets.git/commitdiff
Add factory functions for use with future unit tests.
authorDavid Elliott <dfe@tgwbd.org>
Sat, 7 Jul 2007 18:09:11 +0000 (18:09 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sat, 7 Jul 2007 18:09:11 +0000 (18:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/corefoundation/strconv_cf.cpp

index 94cb8f34af291e67f1f80d5b2b5c0190b52d52ca..1aad21c2983da639b5dba0d709305af619609cd5 100644 (file)
 // 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.