Files
comaps/storage/downloader_queue_universal.hpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

38 lines
893 B
C++

#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