1 //===-- SBStringList.h ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_SBStringList_h_
11 #define LLDB_SBStringList_h_
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class LLDB_API SBStringList {
18 public:
19   SBStringList();
20 
21   SBStringList(const lldb::SBStringList &rhs);
22 
23   const SBStringList &operator=(const SBStringList &rhs);
24 
25   ~SBStringList();
26 
27   bool IsValid() const;
28 
29   void AppendString(const char *str);
30 
31   void AppendList(const char **strv, int strc);
32 
33   void AppendList(const lldb::SBStringList &strings);
34 
35   uint32_t GetSize() const;
36 
37   const char *GetStringAtIndex(size_t idx);
38 
39   const char *GetStringAtIndex(size_t idx) const;
40 
41   void Clear();
42 
43 protected:
44   friend class SBCommandInterpreter;
45   friend class SBDebugger;
46   friend class SBBreakpoint;
47   friend class SBBreakpointLocation;
48   friend class SBBreakpointName;
49 
50   SBStringList(const lldb_private::StringList *lldb_strings);
51 
52   void AppendList(const lldb_private::StringList &strings);
53 
54   const lldb_private::StringList *operator->() const;
55 
56   const lldb_private::StringList &operator*() const;
57 
58 private:
59   std::unique_ptr<lldb_private::StringList> m_opaque_ap;
60 };
61 
62 } // namespace lldb
63 
64 #endif // LLDB_SBStringList_h_
65