/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
storage/downloader_queue_universal.hpp
37 строк
893 B
Arsentiy Milchakov
[storage] method Count is added into QueueInterface
30 мар 2021, 13:59
30 мар 2021, 13:59
a6b61cd
Код
Авторство
О чём код?
#pragma once #include "storage/downloader_queue_interface.hpp" #include "storage/queued_country.hpp" #include "storage/storage_defines.hpp" #include <list> #include <utility> namespace storage { class Queue : public QueueInterface { public: using ForEachCountryMutable = std::function<void(QueuedCountry & country)>; // QueueInterface overrides: bool IsEmpty() const override; size_t Count() const override; bool Contains(CountryId const & country) const override; void ForEachCountry(ForEachCountryFunction const & fn) const override; void ForEachCountry(ForEachCountryMutable const & fn); CountryId const & GetFirstId() const; QueuedCountry const & GetFirstCountry() const; void PopFront(); void Append(QueuedCountry && country); void Remove(CountryId const & country); void Clear(); private: std::list<QueuedCountry> m_queue; }; } // namespace storage