Merge "Ensure BaseHandle class move noexcept (core public-api)" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / rendering / texture-set.h
index f6c71bf..d53dc58 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEXTURE_SET_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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_rendering_effects
+ * @{
+ */
 
 namespace Internal DALI_INTERNAL
 {
@@ -40,12 +44,11 @@ class TextureSet;
  * The images have to be ordered in the same order they are declared in the shader.
  * @SINCE_1_1.43
  */
-class DALI_IMPORT_API TextureSet : public BaseHandle
+class DALI_CORE_API TextureSet : public BaseHandle
 {
 public:
-
   /**
-   * @brief Creates a new TextureSet object
+   * @brief Creates a new TextureSet object.
    *
    * @SINCE_1_1.43
    * @return A handle to a newly allocated TextureSet
@@ -53,102 +56,119 @@ public:
   static TextureSet New();
 
   /**
-   * @brief Default constructor, creates an empty handle
+   * @brief Default constructor, creates an empty handle.
    *
    * @SINCE_1_1.43
    */
   TextureSet();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * @SINCE_1_1.43
    */
   ~TextureSet();
 
   /**
-   * @brief Copy constructor, creates a new handle to the same object
+   * @brief Copy constructor, creates a new handle to the same object.
    *
    * @SINCE_1_1.43
    * @param[in] handle Handle to an object
    */
-  TextureSet( const TextureSet& handle );
+  TextureSet(const TextureSet& handle);
 
   /**
-   * @brief Downcast to a TextureSet handle.
-   *
-   * @SINCE_1_1.43
+   * @brief Downcasts to a TextureSet handle.
    * If handle is not a TextureSet, the returned handle is left uninitialized.
+   * @SINCE_1_1.43
    * @param[in] handle Handle to an object
    * @return TextureSet handle or an uninitialized handle
    */
-  static TextureSet DownCast( BaseHandle handle );
+  static TextureSet DownCast(BaseHandle handle);
 
   /**
-   * @brief Assignment operator, changes this handle to point at the same object
+   * @brief Assignment operator, changes this handle to point at the same object.
    *
    * @SINCE_1_1.43
    * @param[in] handle Handle to an object
    * @return A reference to this
    */
-  TextureSet& operator=( const TextureSet& handle );
+  TextureSet& operator=(const TextureSet& handle);
+
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   */
+  TextureSet(TextureSet&& rhs) noexcept;
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.22
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this handle
+   */
+  TextureSet& operator=(TextureSet&& rhs) noexcept;
 
   /**
-   * @brief Set the texture at position "index"
+   * @brief Sets the texture at position "index".
    *
    * @SINCE_1_1.43
    * @param[in] index The position in the texture set of the texture
    * @param[in] texture The texture
    */
-  void SetTexture( size_t index, Texture texture );
+  void SetTexture(size_t index, Texture texture);
 
   /**
-   * @brief Get the image at position "index"
+   * @brief Gets the image at position "index".
    *
    * @SINCE_1_1.43
    * @param[in] index The position in the texture set of the image
    * @return A handle to the image at the the specified position
    */
-  Texture GetTexture( size_t index ) const;
+  Texture GetTexture(size_t index) const;
 
   /**
-   * @brief Set the sampler to be used by the image at position "index"
+   * @brief Sets the sampler to be used by the image at position "index".
    *
    * @SINCE_1_1.43
    * @param[in] index The position in the texture set of the sampler
    * @param[in] sampler The sampler to use
    */
-  void SetSampler( size_t index, Sampler sampler );
+  void SetSampler(size_t index, Sampler sampler);
 
   /**
-   * @brief Set the sampler to be used by the image at position "index"
+   * @brief Sets the sampler to be used by the image at position "index".
    *
    * @SINCE_1_1.43
    * @param[in] index The position in the texture set of the image
    * @return A handle to the sampler at the specified position
    */
-  Sampler GetSampler( size_t index ) const;
+  Sampler GetSampler(size_t index) const;
 
   /**
-   * @brief Get the number of textures present in the TextureSet
+   * @brief Gets the number of textures present in the TextureSet.
    *
    * @SINCE_1_1.43
    * @return The number of textures in the TextureSet
    */
-  size_t GetTextureCount() const;
+  uint32_t GetTextureCount() const;
 
 public:
-
   /**
    * @brief The constructor.
    * @note  Not intended for application developers.
    * @SINCE_1_1.43
    * @param[in] pointer A pointer to a newly allocated TextureSet
    */
-  explicit DALI_INTERNAL TextureSet( Internal::TextureSet* pointer );
+  explicit DALI_INTERNAL TextureSet(Internal::TextureSet* pointer);
 };
 
+/**
+ * @}
+ */
 } //namespace Dali
 
-
 #endif // DALI_TEXTURE_SET_H