]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
Remaining Makefile.ins,
[wxWidgets.git] / src / common / object.cpp
index c5b9737d3d4974221d2215e61ec5a08b47e7c7e7..dbc9d46ef41a7b4159ca34cdbe249e804c5e6ca9 100644 (file)
@@ -87,6 +87,18 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
         return FALSE;
 }
 
+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 defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
 void wxObject::Dump(ostream& str)
 {