Support SVG thread pool
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / helpers / round-robin-container-view.h
index c3619f9..5a5f07c 100644 (file)
@@ -3,7 +3,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROUND_ROBIN_CONTAINER_VIEW_H
 
 /*
- * Copyright (c) 2017 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
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief RoundRobinContainerView is a view to a container that allows iterating through the elements cyclically.
  */
@@ -59,6 +56,14 @@ public:
   }
 
   /**
+   * @brief Clear all elements.
+   */
+  void Clear()
+  {
+    mElements.clear();
+  }
+
+  /**
    * @brief Reset the position of the iterator returned by GetNext() to the first element.
    */
   void Reset()
@@ -89,12 +94,21 @@ public:
     return mElements.cend();
   }
 
+  /**
+   * @brief Returns the element count.
+   * @return The element count
+   */
+  size_t GetElementCount() const
+  {
+    return mElements.size();
+  }
+
   // default members
   ~RoundRobinContainerView() = default;
 
-  RoundRobinContainerView(const RoundRobinContainerView&)  = delete;
-  RoundRobinContainerView& operator=(const RoundRobinContainerView&)  = delete;
-  RoundRobinContainerView(RoundRobinContainerView&&) = default;
+  RoundRobinContainerView(const RoundRobinContainerView&) = delete;
+  RoundRobinContainerView& operator=(const RoundRobinContainerView&) = delete;
+  RoundRobinContainerView(RoundRobinContainerView&&)                 = default;
   RoundRobinContainerView& operator=(RoundRobinContainerView&&) = default;
 
 private:
@@ -110,8 +124,8 @@ private:
   }
 
 private:
-  ContainerType mElements; //< container of elements
-  size_t mNextIndex;       //< index to the next element to be viewed
+  ContainerType mElements;  //< container of elements
+  size_t        mNextIndex; //< index to the next element to be viewed
 };
 
 } // namespace Internal
@@ -120,5 +134,4 @@ private:
 
 } // namespace Dali
 
-
 #endif // DALI_TOOLKIT_INTERNAL_ROUND_ROBIN_CONTAINER_VIEW_H