[libsigcplusplus] signal_base/signal_exec: Make some member data protected.wq



commit 0a5096d269151dd093f3b52da34798f035cd7eff
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 30 16:19:19 2016 +0200

    signal_base/signal_exec: Make some member data protected.wq

 sigc++/signal_base.h |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/sigc++/signal_base.h b/sigc++/signal_base.h
index 763828a..8571154 100644
--- a/sigc++/signal_base.h
+++ b/sigc++/signal_base.h
@@ -176,6 +176,11 @@ struct SIGC_API signal_impl : public notifiable
    */
   static void notify(notifiable* d);
 
+public:
+  /// The list of slots.
+  std::list<slot_base> slots_;
+
+private:
   /** Reference counter.
    * The object is destroyed when @em ref_count_ reaches zero.
    */
@@ -188,17 +193,11 @@ struct SIGC_API signal_impl : public notifiable
 
   /// Indicates whether the execution of sweep() is being deferred.
   bool deferred_;
-
-  /// The list of slots.
-  std::list<slot_base> slots_;
 };
 
 /// Exception safe sweeper for cleaning up invalid slots on the slot list.
 struct SIGC_API signal_exec
 {
-  /// The parent sigc::signal_impl object.
-  signal_impl* sig_;
-
   /** Increments the reference and execution counter of the parent sigc::signal_impl object.
    * @param sig The parent sigc::signal_impl object.
    */
@@ -209,6 +208,11 @@ struct SIGC_API signal_exec
 
   /// Decrements the reference and execution counter of the parent sigc::signal_impl object.
   inline ~signal_exec() { sig_->unreference_exec(); }
+
+protected:
+  /// The parent sigc::signal_impl object.
+  signal_impl* sig_;
+
 };
 
 /** Temporary slot list used during signal emission.


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