[glibmm] Rename Glib::SignalProxyDetailedAnyType
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Rename Glib::SignalProxyDetailedAnyType
- Date: Thu, 1 Dec 2016 11:36:55 +0000 (UTC)
commit 01162c0365d87245e71322a970e5d1d4d8c448c5
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Dec 1 12:34:19 2016 +0100
Rename Glib::SignalProxyDetailedAnyType
Rename SignalProxyDetailed to SignalProxyDetailedBase, and
SignalProxyDetailedAnyType to SignalProxyDetailed.
Remove SignalProxyDetailed# aliases (# = 0..6).
glib/glibmm/signalproxy.cc | 12 +++++-----
glib/glibmm/signalproxy.h | 49 +++++++++++--------------------------------
tools/m4/signal.m4 | 12 +++++-----
3 files changed, 25 insertions(+), 48 deletions(-)
---
diff --git a/glib/glibmm/signalproxy.cc b/glib/glibmm/signalproxy.cc
index e7815df..8778ca3 100644
--- a/glib/glibmm/signalproxy.cc
+++ b/glib/glibmm/signalproxy.cc
@@ -110,9 +110,9 @@ SignalProxyNormal::slot0_void_callback(GObject* self, void* data)
}
}
-// SignalProxyDetailed implementation:
+// SignalProxyDetailedBase implementation:
-SignalProxyDetailed::SignalProxyDetailed(
+SignalProxyDetailedBase::SignalProxyDetailedBase(
Glib::ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name)
: SignalProxyBase(obj),
info_(info),
@@ -121,12 +121,12 @@ SignalProxyDetailed::SignalProxyDetailed(
{
}
-SignalProxyDetailed::~SignalProxyDetailed() noexcept
+SignalProxyDetailedBase::~SignalProxyDetailedBase() noexcept
{
}
sigc::slot_base&
-SignalProxyDetailed::connect_impl_(bool notify, const sigc::slot_base& slot, bool after)
+SignalProxyDetailedBase::connect_impl_(bool notify, const sigc::slot_base& slot, bool after)
{
// create a proxy to hold our connection info
auto pConnectionNode = new SignalProxyConnectionNode(slot, obj_->gobj());
@@ -142,7 +142,7 @@ SignalProxyDetailed::connect_impl_(bool notify, const sigc::slot_base& slot, boo
}
sigc::slot_base&
-SignalProxyDetailed::connect_impl_(bool notify, sigc::slot_base&& slot, bool after)
+SignalProxyDetailedBase::connect_impl_(bool notify, sigc::slot_base&& slot, bool after)
{
// create a proxy to hold our connection info
auto pConnectionNode = new SignalProxyConnectionNode(std::move(slot), obj_->gobj());
@@ -158,7 +158,7 @@ SignalProxyDetailed::connect_impl_(bool notify, sigc::slot_base&& slot, bool aft
}
void
-SignalProxyDetailed::emission_stop()
+SignalProxyDetailedBase::emission_stop()
{
g_signal_stop_emission_by_name(obj_->gobj(), detailed_name_.c_str());
}
diff --git a/glib/glibmm/signalproxy.h b/glib/glibmm/signalproxy.h
index 8aae39d..cb7ffeb 100644
--- a/glib/glibmm/signalproxy.h
+++ b/glib/glibmm/signalproxy.h
@@ -47,7 +47,7 @@ struct SignalProxyInfo
#endif // DOXYGEN_SHOULD_SKIP_THIS
-// This base class is used by SignalProxyNormal, SignalProxyDetailed and SignalProxyProperty.
+// This base class is used by SignalProxyNormal, SignalProxyDetailedBase and SignalProxyProperty.
class SignalProxyBase
{
public:
@@ -67,7 +67,7 @@ protected:
ObjectBase* obj_;
private:
- SignalProxyBase& operator=(const SignalProxyBase&); // not implemented
+ SignalProxyBase& operator=(const SignalProxyBase&) = delete;
};
// Shared portion of a Signal without detail
@@ -79,7 +79,7 @@ private:
* the template derivatives, which serve as gatekeepers for the
* types allowed on a particular signal.
*
- * For signals with a detailed name (signal_name::detail_name) see SignalProxyDetailed.
+ * For signals with a detailed name (signal_name::detail_name) see SignalProxyDetailedBase.
*/
class SignalProxyNormal : public SignalProxyBase
{
@@ -140,7 +140,7 @@ private:
sigc::slot_base& connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after);
// no copy assignment
- SignalProxyNormal& operator=(const SignalProxyNormal&);
+ SignalProxyNormal& operator=(const SignalProxyNormal&) = delete;
};
/**** Glib::SignalProxy ***************************************************/
@@ -227,10 +227,6 @@ public:
}
};
-// TODO: When we can break ABI, consider renaming
-// SignalProxyDetailed => SignalProxyDetailedBase
-// SignalProxyDetailedAnyType => SignalProxyDetailed
-
// Shared portion of a Signal with detail
/** The SignalProxy provides an API similar to sigc::signal that can be used to
* connect sigc::slots to glib signals.
@@ -240,10 +236,10 @@ public:
* the template derivatives, which serve as gatekeepers for the
* types allowed on a particular signal.
*/
-class SignalProxyDetailed : public SignalProxyBase
+class SignalProxyDetailedBase : public SignalProxyBase
{
public:
- ~SignalProxyDetailed() noexcept;
+ ~SignalProxyDetailedBase() noexcept;
/// Stops the current signal emission (not in libsigc++)
void emission_stop();
@@ -255,11 +251,11 @@ protected:
* and the C callbacks that should be called by glib.
* @param detail_name The detail name, if any.
*/
- SignalProxyDetailed(
+ SignalProxyDetailedBase(
Glib::ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name);
/** Connects a signal handler to a signal.
- * This is called by connect() and connect_notify() in derived SignalProxyDetailedAnyType classes.
+ * This is called by connect() and connect_notify() in derived SignalProxyDetailed classes.
*
* @param notify Whether this method is called by connect_notify() or by connect().
* @param slot The signal handler, usually created with sigc::mem_fun() or sigc::ptr_fun().
@@ -280,7 +276,7 @@ private:
const Glib::ustring detailed_name_; // signal_name[::detail_name]
// no copy assignment
- SignalProxyDetailed& operator=(const SignalProxyDetailed&);
+ SignalProxyDetailedBase& operator=(const SignalProxyDetailedBase&) = delete;
};
/** Proxy for signals with any number of arguments and possibly a detailed name.
@@ -288,18 +284,18 @@ private:
* to connect signal handlers to signals.
*/
template <class R, class... T>
-class SignalProxyDetailedAnyType;
+class SignalProxyDetailed;
template <class R, class... T>
-class SignalProxyDetailedAnyType<R(T...)> : public SignalProxyDetailed
+class SignalProxyDetailed<R(T...)> : public SignalProxyDetailedBase
{
public:
using SlotType = sigc::slot<R(T...)>;
using VoidSlotType = sigc::slot<void(T...)>;
- SignalProxyDetailedAnyType(
+ SignalProxyDetailed(
ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name)
- : SignalProxyDetailed(obj, info, detail_name)
+ : SignalProxyDetailedBase(obj, info, detail_name)
{
}
@@ -365,25 +361,6 @@ public:
}
};
-/* Templates below has been added to avoid API break, and should not be
- * used in a newly created code. SignalProxyDetailedAnyType class should be
- * used instead of SignalProxyDetailed# class.
- */
-template <typename R>
-using SignalProxyDetailed0 = SignalProxyDetailedAnyType<R>;
-template <typename R, typename T1>
-using SignalProxyDetailed1 = SignalProxyDetailedAnyType<R, T1>;
-template <typename R, typename T1, typename T2>
-using SignalProxyDetailed2 = SignalProxyDetailedAnyType<R, T1, T2>;
-template <typename R, typename T1, typename T2, typename T3>
-using SignalProxyDetailed3 = SignalProxyDetailedAnyType<R, T1, T2, T3>;
-template <typename R, typename T1, typename T2, typename T3, typename T4>
-using SignalProxyDetailed4 = SignalProxyDetailedAnyType<R, T1, T2, T3, T4>;
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5>
-using SignalProxyDetailed5 = SignalProxyDetailedAnyType<R, T1, T2, T3, T4, T5>;
-template <typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
-using SignalProxyDetailed6 = SignalProxyDetailedAnyType<R, T1, T2, T3, T4, T5, T6>;
-
} // namespace Glib
#endif /* _GLIBMM_SIGNALPROXY_H */
diff --git a/tools/m4/signal.m4 b/tools/m4/signal.m4
index d121b15..fa2cd99 100644
--- a/tools/m4/signal.m4
+++ b/tools/m4/signal.m4
@@ -28,13 +28,13 @@ $10
',dnl detail_name
$14,0,`dnl
$10
- Glib::SignalProxyDetailedAnyType<$5`'($6)> signal_$4`'(const Glib::ustring& $13 = Glib::ustring());
+ Glib::SignalProxyDetailed<$5`'($6)> signal_$4`'(const Glib::ustring& $13 = Glib::ustring());
',`dnl detail_name and two_signal_methods
$10
Glib::SignalProxy<$5`'($6)> signal_$4`'();
$10
- Glib::SignalProxyDetailedAnyType<$5`'($6)> signal_$4`'(const Glib::ustring& $13);
+ Glib::SignalProxyDetailed<$5`'($6)> signal_$4`'(const Glib::ustring& $13);
')dnl end detail_name
ifelse(`$9',,,`_DEPRECATE_IFDEF_END
')dnl
@@ -167,9 +167,9 @@ Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'()
}
',dnl detail_name
$14,0,`dnl
-Glib::SignalProxyDetailedAnyType<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13)
+Glib::SignalProxyDetailed<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13)
{
- return Glib::SignalProxyDetailedAnyType<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13);
+ return Glib::SignalProxyDetailed<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13);
}
',`dnl detail_name and two_signal_methods
Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'()
@@ -177,9 +177,9 @@ Glib::SignalProxy<$5`'($6)> __CPPNAME__::signal_$4`'()
return Glib::SignalProxy<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info);
}
-Glib::SignalProxyDetailedAnyType<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13)
+Glib::SignalProxyDetailed<$5`'($6)> __CPPNAME__::signal_$4`'(const Glib::ustring& $13)
{
- return Glib::SignalProxyDetailedAnyType<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13);
+ return Glib::SignalProxyDetailed<$5`'($6)>(this, &__CPPNAME__`'_signal_$4_info, $13);
}
')dnl end detail_name
ifelse(`$9',,,`_DEPRECATE_IFDEF_END
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]