|
|
|||
File indexing completed on 2026-05-10 08:42:42
0001 //===-- SBProgress.h --------------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLDB_API_SBPROGRESS_H 0010 #define LLDB_API_SBPROGRESS_H 0011 0012 #include "lldb/API/SBDebugger.h" 0013 #include "lldb/API/SBDefines.h" 0014 0015 namespace lldb { 0016 0017 /// A Progress indicator helper class. 0018 /// 0019 /// Any potentially long running sections of code in LLDB should report 0020 /// progress so that clients are aware of delays that might appear during 0021 /// debugging. Delays commonly include indexing debug information, parsing 0022 /// symbol tables for object files, downloading symbols from remote 0023 /// repositories, and many more things. 0024 /// 0025 /// The Progress class helps make sure that progress is correctly reported 0026 /// and will always send an initial progress update, updates when 0027 /// Progress::Increment() is called, and also will make sure that a progress 0028 /// completed update is reported even if the user doesn't explicitly cause one 0029 /// to be sent. 0030 class LLDB_API SBProgress { 0031 public: 0032 /// Construct a progress object with a title, details and a given debugger. 0033 /// \param title 0034 /// The title of the progress object. 0035 /// \param details 0036 /// The details of the progress object. 0037 /// \param debugger 0038 /// The debugger for this progress object to report to. 0039 SBProgress(const char *title, const char *details, SBDebugger &debugger); 0040 0041 /// Construct a progress object with a title, details, the total units of work 0042 /// to be done, and a given debugger. 0043 /// \param title 0044 /// The title of the progress object. 0045 /// \param details 0046 /// The details of the progress object. 0047 /// \param total_units 0048 /// The total number of units of work to be done. 0049 /// \param debugger 0050 /// The debugger for this progress object to report to. 0051 SBProgress(const char *title, const char *details, uint64_t total_units, 0052 SBDebugger &debugger); 0053 0054 #ifndef SWIG 0055 SBProgress(SBProgress &&rhs); 0056 #endif 0057 0058 ~SBProgress(); 0059 0060 void Increment(uint64_t amount, const char *description = nullptr); 0061 0062 protected: 0063 lldb_private::Progress &ref() const; 0064 0065 private: 0066 SBProgress(const SBProgress &rhs) = delete; 0067 const SBProgress &operator=(const SBProgress &rhs) = delete; 0068 0069 std::unique_ptr<lldb_private::Progress> m_opaque_up; 0070 }; // SBProgress 0071 } // namespace lldb 0072 0073 #endif // LLDB_API_SBPROGRESS_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|