Merge "Clean up the code to build successfully on macOS" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / signals / slot-delegate.h
index ee04c58..a757da6 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_SLOT_DELEGATE_H__
-#define __DALI_SLOT_DELEGATE_H__
+#ifndef DALI_SLOT_DELEGATE_H
+#define DALI_SLOT_DELEGATE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
+/**
+ * @addtogroup dali_core_signals
+ * @{
+ */
 
 /**
  * @brief SlotDelegates can be used to connect member functions to signals, without inheriting from SlotDelegateInterface.
@@ -66,33 +70,34 @@ namespace Dali
  * };
  *
  * @endcode
+ * @SINCE_1_0.0
  */
-template <typename Slot>
+template<typename Slot>
 class SlotDelegate
 {
 public:
-
   /**
    * @brief Constructor.
    *
-   * @param[in] slot The object with a callback.
+   * @SINCE_1_0.0
+   * @param[in] slot The object with a callback
    */
-  SlotDelegate( Slot* slot )
-  : mSlot( slot )
+  SlotDelegate(Slot* slot)
+  : mSlot(slot)
   {
   }
 
   /**
    * @brief Non-virtual destructor.
    *
+   * @SINCE_1_0.0
    */
-  ~SlotDelegate()
-  {
-  }
+  ~SlotDelegate() = default;
 
   /**
-   * @brief Disconnect all signals from this object.
+   * @brief Disconnects all signals from this object.
    *
+   * @SINCE_1_0.0
    */
   void DisconnectAll()
   {
@@ -108,9 +113,10 @@ public:
   }
 
   /**
-   * @brief Retrieve the slot object.
+   * @brief Retrieves the slot object.
    *
-   * @return The object with a callback.
+   * @SINCE_1_0.0
+   * @return The object with a callback
    */
   Slot* GetSlot()
   {
@@ -118,9 +124,10 @@ public:
   }
 
   /**
-   * @brief Retrieve the connection tracker component.
+   * @brief Retrieves the connection tracker component.
    *
-   * @return The connection tracker component.
+   * @SINCE_1_0.0
+   * @return The connection tracker component
    */
   ConnectionTracker* GetConnectionTracker()
   {
@@ -128,18 +135,21 @@ public:
   }
 
 private:
-
-  SlotDelegate( const SlotDelegate& );            ///< undefined copy constructor
-  SlotDelegate& operator=( const SlotDelegate& ); ///< undefined assignment operator
+  SlotDelegate(const SlotDelegate&) = delete;            ///< Deleted copy constructor. @SINCE_1_0.0
+  SlotDelegate(SlotDelegate&&)      = delete;            ///< Deleted move constructor. @SINCE_1_9.25
+  SlotDelegate& operator=(const SlotDelegate&) = delete; ///< Deleted copy assignment operator. @SINCE_1_0.0
+  SlotDelegate& operator=(SlotDelegate&&) = delete;      ///< Deleted move assignment operator. @SINCE_1_9.25
 
 private:
-
   Slot* mSlot; ///< The slot object
 
   // Use composition instead of inheritance (virtual methods don't mix well with templates)
   ConnectionTracker mConnectionTracker; ///< A connection tracker
 };
 
+/**
+ * @}
+ */
 } // namespace Dali
 
-#endif // __DALI_SLOT_DELEGATE_H__
+#endif // DALI_SLOT_DELEGATE_H