]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/strconv_cf.cpp
add wxMBConvStrictUTF8 class implementing just UTF-8 conversion, without support...
[wxWidgets.git] / 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.