+ typedef Dali::FreeList TextureIdConverterType; ///< The converter type from TextureId to index of TextureInfoContainer.
+
+ typedef std::unordered_map<TextureCacheManager::TextureHash, std::vector<TextureCacheManager::TextureId>> TextureHashContainerType; ///< The container type used to fast-find the TextureId by TextureHash.
+ typedef std::vector<TextureCacheManager::TextureInfo> TextureInfoContainerType; ///< The container type used to manage the life-cycle and caching of Textures
+ typedef std::vector<TextureCacheManager::ExternalTextureInfo> ExternalTextureInfoContainerType; ///< The container type used to manage the life-cycle and caching of ExternalTexture url
+ typedef std::vector<TextureCacheManager::EncodedImageBufferInfo> EncodedImageBufferInfoContainerType; ///< The container type used to manage the life-cycle and caching of EncodedImageBuffer url
+
+private:
+ // Private API: only used internally
+
+ /**
+ * @brief Used to lookup an index into the ExternalTextureInfoContainer from a textureId
+ * @param[in] textureId The TextureId to look up
+ * @return The cache index
+ */
+ TextureCacheManager::TextureCacheIndex GetCacheIndexFromExternalTextureId(const TextureCacheManager::TextureId& textureId);
+
+ /**
+ * @brief Used to lookup an index into the EncodedImageBufferInfoContainer from a bufferId
+ * @param[in] bufferId The bufferId to look up
+ * @return The cache index
+ */
+ TextureCacheManager::TextureCacheIndex GetCacheIndexFromEncodedImageBufferId(const TextureCacheManager::TextureId& bufferId);
+
+ /**
+ * @brief Looks up a cached encoded image buffer cached by its hash.
+ * If found, the given parameters are used to check there is no hash-collision.
+ * @param[in] hash The hash to look up
+ * @param[in] encodedImageBuffer The image buffer to load
+ * @return A TextureCacheIndex of a cached Texture if found. Or INVALID_CACHE_INDEX if not found.
+ */
+ TextureCacheManager::TextureCacheIndex FindCachedEncodedImageBuffer(const TextureCacheManager::TextureHash& hash, const EncodedImageBuffer& encodedImageBuffer);
+
+ /**
+ * @brief Remove id in HashContainer.
+ * @param[in] hash The hash of the texture/buffer to be delete
+ * @param[in] id The texture/buffer id to be deleted.
+ */
+ void RemoveHashId(const TextureCacheManager::TextureHash& hash, const TextureCacheManager::TextureId& id);
+
+ /**
+ * @brief Remove data from container by the TextureCacheIndex.
+ * It also valiate the TextureIdConverter internally.
+ * We will assume that only valid TextureCacheIndex will come.
+ *
+ * @tparam ContainerType The type of container. It will automatically defined
+ * @param[in] cacheContainer The container that will remove texture info.
+ * @param[in] removeContainerIndex The index of texture info that will remove.
+ */
+ template<class ContainerType>
+ void RemoveTextureInfoByIndex(ContainerType& cacheContainer, const TextureCacheManager::TextureCacheIndex& removeContainerIndex);