xref: /freebsd/contrib/llvm-project/lldb/include/lldb/API/SBSymbolContextList.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- SBSymbolContextList.h -----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_API_SBSYMBOLCONTEXTLIST_H
10 #define LLDB_API_SBSYMBOLCONTEXTLIST_H
11 
12 #include "lldb/API/SBDefines.h"
13 #include "lldb/API/SBSymbolContext.h"
14 
15 namespace lldb {
16 
17 class LLDB_API SBSymbolContextList {
18 public:
19   SBSymbolContextList();
20 
21   SBSymbolContextList(const lldb::SBSymbolContextList &rhs);
22 
23   ~SBSymbolContextList();
24 
25   const lldb::SBSymbolContextList &
26   operator=(const lldb::SBSymbolContextList &rhs);
27 
28   explicit operator bool() const;
29 
30   bool IsValid() const;
31 
32   uint32_t GetSize() const;
33 
34   lldb::SBSymbolContext GetContextAtIndex(uint32_t idx);
35 
36   bool GetDescription(lldb::SBStream &description);
37 
38   void Append(lldb::SBSymbolContext &sc);
39 
40   void Append(lldb::SBSymbolContextList &sc_list);
41 
42   void Clear();
43 
44 protected:
45   friend class SBModule;
46   friend class SBTarget;
47   friend class SBCompileUnit;
48 
49   lldb_private::SymbolContextList *operator->() const;
50 
51   lldb_private::SymbolContextList &operator*() const;
52 
53 private:
54   std::unique_ptr<lldb_private::SymbolContextList> m_opaque_up;
55 };
56 
57 } // namespace lldb
58 
59 #endif // LLDB_API_SBSYMBOLCONTEXTLIST_H
60