namespace Dali
{
+
SlotConnection::SlotConnection(SlotObserver* slotObserver, CallbackBase* callback)
: mSlotObserver(slotObserver),
mCallback(callback)
{
}
-SlotConnection::~SlotConnection()
-{
-}
-
-CallbackBase* SlotConnection::GetCallback()
-{
- return mCallback;
-}
-
-SlotObserver* SlotConnection::GetSlotObserver()
-{
- return mSlotObserver;
-}
-
void SignalConnection::Disconnect(SlotObserver* slotObserver) noexcept
{
if(mSignalObserver)
SlotConnection(SlotObserver* slotObserver, CallbackBase* callback);
/**
- * @brief Non-virtual destructor, not intended as a base class.
- * @SINCE_1_0.0
- */
- ~SlotConnection();
-
- /**
* @brief Retrieves the callback.
*
* @SINCE_1_0.0
* @return A pointer to the callback
*/
- CallbackBase* GetCallback();
+ CallbackBase* GetCallback() const
+ {
+ return mCallback;
+ }
/**
* @brief Retrieves the slot observer.
* @SINCE_1_0.0
* @return A pointer to the slot observer
*/
- SlotObserver* GetSlotObserver();
-
-private:
- SlotConnection(const SlotConnection&) = delete; ///< Deleted copy constructor. @SINCE_1_0.0
- SlotConnection(SlotConnection&&) = delete; ///< Deleted move constructor. @SINCE_1_9.25
- SlotConnection& operator=(const SlotConnection&) = delete; ///< Deleted copy assignment operator. @SINCE_1_0.0
- SlotConnection& operator=(SlotConnection&&) = delete; ///< Deleted move assignment operator. @SINCE_1_9.25
+ SlotObserver* GetSlotObserver() const
+ {
+ return mSlotObserver;
+ }
private:
- SlotObserver* mSlotObserver; ///< a pointer to the slot observer (not owned)
- CallbackBase* mCallback; ///< The callback. This is not owned, the corresponding SignalConnection has ownership.
+ SlotObserver* mSlotObserver{nullptr}; ///< a pointer to the slot observer (not owned)
+ CallbackBase* mCallback{nullptr}; ///< The callback. This is not owned, the corresponding SignalConnection has ownership.
};
/**