• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- ScriptedInterfaceUsages.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_INTERPRETER_SCRIPTEDINTERFACEUSAGES_H
10 #define LLDB_INTERPRETER_SCRIPTEDINTERFACEUSAGES_H
11 
12 #include "lldb/lldb-types.h"
13 
14 #include "lldb/Utility/Stream.h"
15 #include "llvm/ADT/StringRef.h"
16 
17 namespace lldb_private {
18 class ScriptedInterfaceUsages {
19 public:
20   ScriptedInterfaceUsages() = default;
ScriptedInterfaceUsages(const std::vector<llvm::StringRef> ci_usages,const std::vector<llvm::StringRef> sbapi_usages)21   ScriptedInterfaceUsages(const std::vector<llvm::StringRef> ci_usages,
22                           const std::vector<llvm::StringRef> sbapi_usages)
23       : m_command_interpreter_usages(ci_usages), m_sbapi_usages(sbapi_usages) {}
24 
GetCommandInterpreterUsages()25   const std::vector<llvm::StringRef> &GetCommandInterpreterUsages() const {
26     return m_command_interpreter_usages;
27   }
28 
GetSBAPIUsages()29   const std::vector<llvm::StringRef> &GetSBAPIUsages() const {
30     return m_sbapi_usages;
31   }
32 
33   enum class UsageKind { CommandInterpreter, API };
34 
35   void Dump(Stream &s, UsageKind kind) const;
36 
37 private:
38   std::vector<llvm::StringRef> m_command_interpreter_usages;
39   std::vector<llvm::StringRef> m_sbapi_usages;
40 };
41 } // namespace lldb_private
42 
43 #endif // LLDB_INTERPRETER_SCRIPTEDINTERFACEUSAGES_H
44