New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include "drape_frontend/threads_commutator.hpp"
#include "drape/pointers.hpp"
#include "base/thread_pool_delayed.hpp"
#include <atomic>
#include <cstdint>
#include <functional>
namespace df
{
class DrapeNotifier
{
public:
static uint64_t constexpr kInvalidId = 0;
using Functor = std::function<void(uint64_t notifyId)>;
explicit DrapeNotifier(ref_ptr<ThreadsCommutator> commutator);
uint64_t Notify(ThreadsCommutator::ThreadName threadName,
base::DelayedThreadPool::Duration const & duration,
bool repeating, Functor && functor);
private:
void NotifyImpl(ThreadsCommutator::ThreadName threadName,
base::DelayedThreadPool::Duration const & duration, bool repeating,
uint64_t notifyId, Functor && functor);
ref_ptr<ThreadsCommutator> m_commutator;
std::atomic<uint64_t> m_counter;
};
} // namespace df