Use modern construct 'using' instead of typedef.
[platform/core/uifw/dali-core.git] / dali / public-api / animation / constraint.h
index c2722fb..52008ac 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_CONSTRAINT_H__
-#define __DALI_CONSTRAINT_H__
+#ifndef DALI_CONSTRAINT_H
+#define DALI_CONSTRAINT_H
 
 /*
- * Copyright (c) 2018 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.
@@ -43,7 +43,7 @@ namespace Internal DALI_INTERNAL
 class ConstraintBase;
 }
 
-typedef Vector< PropertyInput* > PropertyInputContainer;
+using PropertyInputContainer = Vector<PropertyInput*>;
 
 /**
  * @brief An abstract base class for Constraints.
@@ -200,7 +200,7 @@ public:
      * @brief Used to call the function to copy the stored object.
      * @SINCE_1_0.0
      */
-    typedef UndefinedClass* (*CopyConstructorDispatcher) ( UndefinedClass* object );
+    using CopyConstructorDispatcher = UndefinedClass* (*)( UndefinedClass* );
 
     /**
      * @brief Copies the actual object in Constraint::Function.
@@ -225,17 +225,10 @@ public:
       }
     };
 
-    /**
-     * @brief Undefined copy constructor.
-     * @SINCE_1_0.0
-     */
-    Function( const Function& );
-
-    /**
-     * @brief Undefined assignment operator.
-     * @SINCE_1_0.0
-     */
-    Function& operator=( const Function& );
+    Function( const Function& ) = delete; ///< Deleted copy constructor. @SINCE_1_0.0
+    Function( Function&& ) = delete; ///< Deleted move constructor. @SINCE_1_9.25
+    Function& operator=( const Function& ) = delete; ///< Deleted copy assignment operator. @SINCE_1_0.0
+    Function& operator=( Function&& ) = delete; ///< Deleted move assignment operator. @SINCE_1_9.25
 
     /**
      * @brief Constructor used when copying the stored object.
@@ -283,11 +276,11 @@ public:
    */
   enum RemoveAction
   {
-    Bake,   ///< When the constraint is fully-applied, the constrained value is saved. @SINCE_1_0.0
-    Discard ///< When the constraint is removed, the constrained value is discarded. @SINCE_1_0.0
+    BAKE,   ///< When the constraint is fully-applied, the constrained value is saved. @SINCE_1_9.28
+    DISCARD ///< When the constraint is removed, the constrained value is discarded. @SINCE_1_9.28
   };
 
-  static const RemoveAction  DEFAULT_REMOVE_ACTION;  ///< Bake
+  static const RemoveAction  DEFAULT_REMOVE_ACTION;  ///< BAKE
 
   /**
    * @brief Creates an uninitialized Constraint; this can be initialized with Constraint::New().
@@ -428,6 +421,23 @@ public:
   Constraint& operator=( const Constraint& rhs );
 
   /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  Constraint( Constraint&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  Constraint& operator=( Constraint&& rhs );
+
+  /**
    * @brief Downcasts a handle to Constraint handle.
    *
    * If handle points to a Constraint object, the downcast produces valid handle.
@@ -479,10 +489,10 @@ public:
   Dali::Property::Index GetTargetProperty();
 
   /**
-   * @brief Sets the remove action. Constraint::Bake will "bake" a value when fully-applied.
+   * @brief Sets the remove action. Constraint::BAKE will "bake" a value when fully-applied.
    *
-   * In case of Constraint::Discard, the constrained value will be discarded, when the constraint is removed.
-   * The default value is Constraint::Bake.
+   * In case of Constraint::DISCARD, the constrained value will be discarded, when the constraint is removed.
+   * The default value is Constraint::BAKE.
    * @SINCE_1_0.0
    * @param[in] action The remove-action
    */
@@ -502,7 +512,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] tag An integer to identify the constraint
    */
-  void SetTag( uint32_t tag );
+  void SetTag( const uint32_t tag );
 
   /**
    * @brief Gets the tag.
@@ -545,4 +555,4 @@ private: // Not intended for use by Application developers
  */
 } // namespace Dali
 
-#endif // __DALI_CONSTRAINT_H__
+#endif // DALI_CONSTRAINT_H