Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,37 @@
#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