X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..a70ab3b804b6c363f8bcbed0b4fce94b7fb03612:/interface/wx/object.h diff --git a/interface/wx/object.h b/interface/wx/object.h index b6467e9fe6..55814598ef 100644 --- a/interface/wx/object.h +++ b/interface/wx/object.h @@ -8,7 +8,6 @@ /** @class wxObjectRefData - @wxheader{object.h} This class is used to store reference-counted data. @@ -126,7 +125,7 @@ protected: It's declared @c protected so that wxObjectRefData instances will never be destroyed directly but only as result of a DecRef() call. */ - ~wxObjectRefData(); + virtual ~wxObjectRefData(); public: /** @@ -162,7 +161,6 @@ public: /** @class wxObject - @wxheader{object.h} This is the root class of many of the wxWidgets classes. @@ -202,7 +200,7 @@ public: Performs dereferencing, for those objects that use reference counting. */ - wxObject(); + virtual ~wxObject(); /** A virtual function that may be redefined by derived classes to allow dumping of @@ -227,7 +225,7 @@ public: This virtual function is redefined for every class that requires run-time type information, when using the ::DECLARE_CLASS macro (or similar). */ - wxClassInfo* GetClassInfo(); + virtual wxClassInfo* GetClassInfo() const; /** Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. @@ -253,7 +251,7 @@ public: @return @true if the class represented by info is the same class as this one or is derived from it. */ - bool IsKindOf(wxClassInfo* info); + bool IsKindOf(const wxClassInfo* info) const; /** Returns @true if this object has the same data pointer as @a obj. @@ -265,7 +263,7 @@ public: @see @ref overview_refcount */ - bool IsSameAs(const wxObject& obj); + bool IsSameAs(const wxObject& obj) const; /** Makes this object refer to the data in @a clone. @@ -338,7 +336,6 @@ protected: /** @class wxClassInfo - @wxheader{object.h} This class stores meta-information about classes. @@ -381,17 +378,17 @@ public: /** Returns the name of the first base class (@NULL if none). */ - wxChar* GetBaseClassName1() const; + const wxChar* GetBaseClassName1() const; /** Returns the name of the second base class (@NULL if none). */ - wxChar* GetBaseClassName2() const; + const wxChar* GetBaseClassName2() const; /** Returns the string form of the class name. */ - wxChar* GetClassName() const; + const wxChar* GetClassName() const; /** Returns the size of the class. @@ -412,13 +409,12 @@ public: /** Returns @true if this class is a kind of (inherits from) the given class. */ - bool IsKindOf(wxClassInfo* info); + bool IsKindOf(const wxClassInfo* info) const; }; /** - @wxheader{object.h} This is helper template class primarily written to avoid memory leaks because of missing calls to wxObjectRefData::DecRef().