[gtkmm] C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.



commit 9767e0d79100f97fd9b6c8b7caa806a4899b7ed8
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Aug 22 12:45:20 2015 +0200

    C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.
    
    Because _CLASS_OPAQUE_REFCOUNTED already generates a comment
    telling us not to derive from them, presumably because they can
    only be instantiated by reinterpret_cast<>ing a base C struct.
    
    Ideally, _CLASS_OPAQUE_REFCOUNTED would add the final keyword,
    but the class line is is not generated, so that would be a little
    difficult.

 gtk/src/csssection.hg |    2 +-
 gtk/src/iconset.hg    |    2 +-
 gtk/src/recentinfo.hg |    2 +-
 gtk/src/targetlist.hg |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/csssection.hg b/gtk/src/csssection.hg
index ee44910..4e585f0 100644
--- a/gtk/src/csssection.hg
+++ b/gtk/src/csssection.hg
@@ -36,7 +36,7 @@ _WRAP_ENUM(CssSectionType, GtkCssSectionType)
  *
  * @newin{3,16}
  */
-class CssSection
+class CssSection final
 {
   _CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section_ref, gtk_css_section_unref)
   _IGNORE(gtk_css_section_ref, gtk_css_section_unref)
diff --git a/gtk/src/iconset.hg b/gtk/src/iconset.hg
index edc1f1c..24f8a86 100644
--- a/gtk/src/iconset.hg
+++ b/gtk/src/iconset.hg
@@ -44,7 +44,7 @@ class Widget;
  * Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each 
GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted 
first when searching for an icon. If the theme doesn't set a particular icon, GTK+ looks for the icon in a 
list of default icon factories, maintained by gtk_icon_factory_add_default() and 
gtk_icon_factory_remove_default(). Applications with icons should add a default icon factory with their 
icons, which will allow themes to override the icons for the application.
  * @deprecated Use Gtk::IconTheme instead.
  */
-class IconSet
+class IconSet final
 {
   //GtkIconSet is registered as a boxed type, but it has ref/unref functions instead of copy/free,
   //so we use it via RefPtr.
diff --git a/gtk/src/recentinfo.hg b/gtk/src/recentinfo.hg
index 1a72486..19cbfdf 100644
--- a/gtk/src/recentinfo.hg
+++ b/gtk/src/recentinfo.hg
@@ -42,7 +42,7 @@ namespace Gtk
  *
  * @ingroup RecentFiles
  */
-class RecentInfo
+class RecentInfo final
 {
   _CLASS_OPAQUE_REFCOUNTED(RecentInfo, GtkRecentInfo, NONE, gtk_recent_info_ref, gtk_recent_info_unref)
   _IGNORE(gtk_recent_info_ref, gtk_recent_info_unref)
diff --git a/gtk/src/targetlist.hg b/gtk/src/targetlist.hg
index 480af83..3002a09 100644
--- a/gtk/src/targetlist.hg
+++ b/gtk/src/targetlist.hg
@@ -31,7 +31,7 @@ namespace Gtk
 
 class TextBuffer;
 
-class TargetList
+class TargetList final
 {
   //GtkTargetList is actually registered as a boxed type, but it has custom
   //reference-counting instead of copy/free functions, so we use it via RefPtr.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]