#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.
*/
}
/**
+ * @brief Clear all elements.
+ */
+ void Clear()
+ {
+ mElements.clear();
+ }
+
+ /**
* @brief Reset the position of the iterator returned by GetNext() to the first element.
*/
void Reset()
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:
}
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
} // namespace Dali
-
#endif // DALI_TOOLKIT_INTERNAL_ROUND_ROBIN_CONTAINER_VIEW_H