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 SBStringList 18 { 19 public: 20 21 SBStringList (); 22 23 SBStringList (const lldb::SBStringList &rhs); 24 25 const SBStringList & 26 operator = (const SBStringList &rhs); 27 28 ~SBStringList (); 29 30 bool 31 IsValid() const; 32 33 void 34 AppendString (const char *str); 35 36 void 37 AppendList (const char **strv, int strc); 38 39 void 40 AppendList (const lldb::SBStringList &strings); 41 42 uint32_t 43 GetSize () const; 44 45 const char * 46 GetStringAtIndex (size_t idx); 47 48 void 49 Clear (); 50 51 protected: 52 friend class SBCommandInterpreter; 53 friend class SBDebugger; 54 55 SBStringList (const lldb_private::StringList *lldb_strings); 56 57 const lldb_private::StringList * 58 operator->() const; 59 60 const lldb_private::StringList & 61 operator*() const; 62 63 private: 64 65 std::unique_ptr<lldb_private::StringList> m_opaque_ap; 66 67 }; 68 69 } // namespace lldb 70 71 #endif // LLDB_SBStringList_h_ 72