21 : m_title(title), m_id(++g_id), m_completed(0), m_total(total) {
25 std::lock_guard<std::mutex> guard(
m_mutex);
32 std::lock_guard<std::mutex> guard(
m_mutex);
41 std::lock_guard<std::mutex> guard(
m_mutex);
A class to manage flag bits.
static void ReportProgress(uint64_t progress_id, std::string title, std::string details, uint64_t completed, uint64_t total, std::optional< lldb::user_id_t > debugger_id)
Report progress events.
bool m_complete
Set to true when progress has been reported where m_completed == m_total to ensure that we don't send...
void Increment(uint64_t amount=1, std::string update={})
Increment the progress and send a notification to the intalled callback.
uint64_t m_completed
How much work ([0...m_total]) that has been completed.
static std::atomic< uint64_t > g_id
std::optional< lldb::user_id_t > m_debugger_id
The optional debugger ID to report progress to.
std::string m_title
The title of the progress activity.
Progress(std::string title, uint64_t total=UINT64_MAX, lldb_private::Debugger *debugger=nullptr)
Construct a progress object that will report information.
~Progress()
Destroy the progress object.
void ReportProgress(std::string update={})
const uint64_t m_id
A unique integer identifier for progress reporting.
const uint64_t m_total
Total amount of work, UINT64_MAX for non deterministic progress.
A class that represents a running process on the host machine.
lldb::user_id_t GetID() const
Get accessor for the user ID.