1 | //===-- SBStringList.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_SBSTRINGLIST_H |
10 | #define LLDB_API_SBSTRINGLIST_H |
11 | |
12 | #include "lldb/API/SBDefines.h" |
13 | |
14 | namespace lldb { |
15 | |
16 | class LLDB_API SBStringList { |
17 | public: |
18 | SBStringList(); |
19 | |
20 | SBStringList(const lldb::SBStringList &rhs); |
21 | |
22 | const SBStringList &operator=(const SBStringList &rhs); |
23 | |
24 | ~SBStringList(); |
25 | |
26 | explicit operator bool() const; |
27 | |
28 | bool IsValid() const; |
29 | |
30 | void AppendString(const char *str); |
31 | |
32 | void AppendList(const char **strv, int strc); |
33 | |
34 | void AppendList(const lldb::SBStringList &strings); |
35 | |
36 | uint32_t GetSize() const; |
37 | |
38 | const char *GetStringAtIndex(size_t idx); |
39 | |
40 | const char *GetStringAtIndex(size_t idx) const; |
41 | |
42 | void Clear(); |
43 | |
44 | protected: |
45 | friend class SBCommandInterpreter; |
46 | friend class SBDebugger; |
47 | friend class SBBreakpoint; |
48 | friend class SBBreakpointLocation; |
49 | friend class SBBreakpointName; |
50 | friend class SBStructuredData; |
51 | |
52 | SBStringList(const lldb_private::StringList *lldb_strings); |
53 | |
54 | void AppendList(const lldb_private::StringList &strings); |
55 | |
56 | lldb_private::StringList *operator->(); |
57 | |
58 | const lldb_private::StringList *operator->() const; |
59 | |
60 | const lldb_private::StringList &operator*() const; |
61 | |
62 | private: |
63 | std::unique_ptr<lldb_private::StringList> m_opaque_up; |
64 | }; |
65 | |
66 | } // namespace lldb |
67 | |
68 | #endif // LLDB_API_SBSTRINGLIST_H |
69 | |