summaryrefslogtreecommitdiff
path: root/glib/glibmm/objectbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'glib/glibmm/objectbase.h')
-rw-r--r--glib/glibmm/objectbase.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h
index a3afd834..44fb7adb 100644
--- a/glib/glibmm/objectbase.h
+++ b/glib/glibmm/objectbase.h
@@ -29,7 +29,7 @@
#include <sigc++/trackable.h>
#include <typeinfo>
#include <map> // Needed until the next ABI break.
-#include <memory> // auto_ptr, needed until the next ABI break.
+#include <memory> // Not used by ObjectBase any more, but user code may rely on it being here.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GObject GObject; }
@@ -57,6 +57,12 @@ class Mutex;
*/
class GLIBMM_API ObjectBase : virtual public sigc::trackable
{
+public:
+
+ // noncopyable
+ ObjectBase(const ObjectBase&) = delete;
+ ObjectBase& operator=(const ObjectBase&) = delete;
+
protected:
/** This default constructor is called implicitly from the constructor of user-derived
* classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor.
@@ -70,7 +76,7 @@ protected:
* The C++ language itself ensures that the constructor
* is only invoked once.
*
- * All classes generated by gtkmmproc use this constructor, with custom_type_name = 0,
+ * All classes generated by gtkmmproc use this constructor, with custom_type_name = nullptr,
* which essentially means it's not a custom type. This is used to optimize
* vfunc and signal handler callbacks -- since the C++ virtual methods are
* not overridden, invocation can be skipped.
@@ -209,10 +215,10 @@ typedef std::map<const ObjectBase*, ExtraObjectBaseData> extra_object_base_data_
static extra_object_base_data_type extra_object_base_data;
// ObjectBase instances may be used in different threads.
// Accesses to extra_object_base_data must be thread-safe.
-// auto_ptr, because we don't want to include glibmm/threads.h in objectbase.h.
+// Threads::Mutex*, because we don't want to include glibmm/threads.h in objectbase.h.
// threads.h must be the first included file that includes glib.h. That could cause
// problems in files that directly or indirectly include objectbase.h.
-static std::auto_ptr<Threads::Mutex> extra_object_base_data_mutex;
+static Threads::Mutex* extra_object_base_data_mutex;
public: // is_derived_() must be public, so that overridden vfuncs and signal handlers can call it via ObjectBase.
@@ -224,7 +230,7 @@ public: // is_derived_() must be public, so that overridden vfuncs and signal h
/// This is for use by gtkmm wrappers only, and not by applications.
//inline bool is_derived_inline_() const
//{
- // return (custom_type_name_ != 0);
+ // return (custom_type_name_ != nullptr);
//}
protected:
@@ -235,9 +241,6 @@ protected:
#endif //DOXYGEN_SHOULD_SKIP_THIS
private:
- // noncopyable
- ObjectBase(const ObjectBase&);
- ObjectBase& operator=(const ObjectBase&);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
virtual void set_manage(); // calls g_error()