X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4de6207afa9a78be63fe93df44ff5b90cecd2781..b9b3ccd9ea9bf892369a6fa2c8e28e0ceca18527:/src/common/object.cpp?ds=sidebyside diff --git a/src/common/object.cpp b/src/common/object.cpp index c5b9737d3d..3e3a612d48 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -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())