LLDB mainline
|
A Progress indicator helper class. More...
#include <SBProgress.h>
Public Member Functions | |
SBProgress (const char *title, const char *details, SBDebugger &debugger) | |
Construct a progress object with a title, details and a given debugger. | |
SBProgress (const char *title, const char *details, uint64_t total_units, SBDebugger &debugger) | |
Construct a progress object with a title, details, the total units of work to be done, and a given debugger. | |
SBProgress (SBProgress &&rhs) | |
~SBProgress () | |
void | Increment (uint64_t amount, const char *description=nullptr) |
void | Finalize () |
Explicitly finalize an SBProgress, this can be used to terminate a progress on command instead of waiting for a garbage collection or other RAII to destroy the contained progress object. | |
Protected Member Functions | |
lldb_private::Progress & | ref () const |
Private Member Functions | |
SBProgress (const SBProgress &rhs)=delete | |
const SBProgress & | operator= (const SBProgress &rhs)=delete |
Private Attributes | |
std::unique_ptr< lldb_private::Progress > | m_opaque_up |
A Progress indicator helper class.
Any potentially long running sections of code in LLDB should report progress so that clients are aware of delays that might appear during debugging. Delays commonly include indexing debug information, parsing symbol tables for object files, downloading symbols from remote repositories, and many more things.
The Progress class helps make sure that progress is correctly reported and will always send an initial progress update, updates when Progress::Increment() is called, and also will make sure that a progress completed update is reported even if the user doesn't explicitly cause one to be sent.
Definition at line 30 of file SBProgress.h.
SBProgress::SBProgress | ( | const char * | title, |
const char * | details, | ||
SBDebugger & | debugger | ||
) |
Construct a progress object with a title, details and a given debugger.
title | The title of the progress object. |
details | The details of the progress object. |
debugger | The debugger for this progress object to report to. |
Definition at line 15 of file SBProgress.cpp.
References lldb_private::Progress::eExternal, lldb::SBDebugger::get(), LLDB_INSTRUMENT_VA, and m_opaque_up.
SBProgress::SBProgress | ( | const char * | title, |
const char * | details, | ||
uint64_t | total_units, | ||
SBDebugger & | debugger | ||
) |
Construct a progress object with a title, details, the total units of work to be done, and a given debugger.
title | The title of the progress object. |
details | The details of the progress object. |
total_units | The total number of units of work to be done. |
debugger | The debugger for this progress object to report to. |
Definition at line 25 of file SBProgress.cpp.
References lldb_private::Progress::eExternal, lldb::SBDebugger::get(), LLDB_INSTRUMENT_VA, and m_opaque_up.
SBProgress::SBProgress | ( | SBProgress && | rhs | ) |
Definition at line 35 of file SBProgress.cpp.
|
default |
|
privatedelete |
void SBProgress::Finalize | ( | ) |
Explicitly finalize an SBProgress, this can be used to terminate a progress on command instead of waiting for a garbage collection or other RAII to destroy the contained progress object.
Definition at line 52 of file SBProgress.cpp.
References m_opaque_up.
void SBProgress::Increment | ( | uint64_t | amount, |
const char * | description = nullptr |
||
) |
Definition at line 40 of file SBProgress.cpp.
References LLDB_INSTRUMENT_VA, and m_opaque_up.
|
privatedelete |
|
protected |
Definition at line 61 of file SBProgress.cpp.
References m_opaque_up.
|
private |
Definition at line 74 of file SBProgress.h.
Referenced by Finalize(), Increment(), ref(), and SBProgress().