Prevent copy calls from repeat events of ctrl + c
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-url.h
index 08a276a..9a85ee3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -17,6 +17,8 @@
  * limitations under the License.
  */
 
+// EXTERNAL INCLUDES
+#include <cstdint>
 #include <string>
 
 namespace Dali
@@ -84,12 +86,30 @@ public:
   VisualUrl& operator=(const VisualUrl& url);
 
   /**
+   * Move constructor
+   * @param[in] url The VisualUrl to move
+   */
+  VisualUrl(VisualUrl&& url) noexcept;
+
+  /**
+   * Move assignment operator
+   * @param[in] url The VisualUrl to move
+   */
+  VisualUrl& operator=(VisualUrl&& url) noexcept;
+
+  /**
    * Get the full URL
    * @return The url
    */
   const std::string& GetUrl() const;
 
   /**
+   * Get the hash value of full URL
+   * @return The hash value of url
+   */
+  std::uint64_t GetUrlHash() const;
+
+  /**
    * Get the visual type of the URL
    * @return The visual type of the URL
    */
@@ -154,6 +174,8 @@ private:
   std::string  mUrl;
   Type         mType;
   ProtocolType mLocation;
+
+  mutable std::uint64_t mUrlHash;
 };
 
 } // namespace Internal