SBStringList.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. #ifndef LLDB_API_SBSTRINGLIST_H
  9. #define LLDB_API_SBSTRINGLIST_H
  10. #include "lldb/API/SBDefines.h"
  11. namespace lldb {
  12. class LLDB_API SBStringList {
  13. public:
  14. SBStringList();
  15. SBStringList(const lldb::SBStringList &rhs);
  16. const SBStringList &operator=(const SBStringList &rhs);
  17. ~SBStringList();
  18. explicit operator bool() const;
  19. bool IsValid() const;
  20. void AppendString(const char *str);
  21. void AppendList(const char **strv, int strc);
  22. void AppendList(const lldb::SBStringList &strings);
  23. uint32_t GetSize() const;
  24. const char *GetStringAtIndex(size_t idx);
  25. const char *GetStringAtIndex(size_t idx) const;
  26. void Clear();
  27. protected:
  28. friend class SBCommandInterpreter;
  29. friend class SBDebugger;
  30. friend class SBBreakpoint;
  31. friend class SBBreakpointLocation;
  32. friend class SBBreakpointName;
  33. SBStringList(const lldb_private::StringList *lldb_strings);
  34. void AppendList(const lldb_private::StringList &strings);
  35. const lldb_private::StringList *operator->() const;
  36. const lldb_private::StringList &operator*() const;
  37. private:
  38. std::unique_ptr<lldb_private::StringList> m_opaque_up;
  39. };
  40. } // namespace lldb
  41. #endif // LLDB_API_SBSTRINGLIST_H