#pragma once #include namespace Cevo { // Equivalent of SyncCounter.pas's TSyncCounter: a thread-safe counter/ID allocator. class SyncCounter { public: int allocate(); bool currentEqualTo(int value) const; void increment(); // NOTE: matches the original, which copies Top/Current without locking. void assign(const SyncCounter &source); private: mutable QMutex m_lock; int m_top = 0; int m_current = 0; }; } // namespace Cevo