]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
basic support for encodings for wxMSW::wxFont
[wxWidgets.git] / src / common / object.cpp
index c5b9737d3d4974221d2215e61ec5a08b47e7c7e7..3e3a612d488dedbd56ce666646560a7bad775658 100644 (file)
@@ -87,7 +87,19 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
         return FALSE;
 }
 
-#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
+wxObject *wxObject::Clone() const
+{
+    wxObject *object = GetClassInfo()->CreateObject();
+    CopyObject(*object);
+    return object;
+}
+
+void wxObject::CopyObject(wxObject& object_dest) const
+{
+    wxASSERT(object_dest.GetClassInfo()->IsKindOf(GetClassInfo()));
+}
+
+#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
 void wxObject::Dump(ostream& str)
 {
     if (GetClassInfo() && GetClassInfo()->GetClassName())