LLDB  mainline
CommandObjectRegexCommand.h
Go to the documentation of this file.
1 //===-- CommandObjectRegexCommand.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 liblldb_CommandObjectRegexCommand_h_
10 #define liblldb_CommandObjectRegexCommand_h_
11 
12 #include <list>
13 
17 
18 namespace lldb_private {
19 
20 // CommandObjectRegexCommand
21 
23 public:
24  CommandObjectRegexCommand(CommandInterpreter &interpreter, llvm::StringRef name,
25  llvm::StringRef help, llvm::StringRef syntax,
26  uint32_t max_matches, uint32_t completion_type_mask,
27  bool is_removable);
28 
29  ~CommandObjectRegexCommand() override;
30 
31  bool IsRemovable() const override { return m_is_removable; }
32 
33  bool AddRegexCommand(const char *re_cstr, const char *command_cstr);
34 
35  bool HasRegexEntries() const { return !m_entries.empty(); }
36 
37  int HandleCompletion(CompletionRequest &request) override;
38 
39 protected:
40  bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
41 
42  struct Entry {
44  std::string command;
45  };
46 
47  typedef std::list<Entry> EntryCollection;
50  EntryCollection m_entries;
52 
53 private:
54  DISALLOW_COPY_AND_ASSIGN(CommandObjectRegexCommand);
55 };
56 
57 } // namespace lldb_private
58 
59 #endif // liblldb_CommandObjectRegexCommand_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
int HandleCompletion(CompletionRequest &request) override
This default version handles calling option argument completions and then calls HandleArgumentComplet...
bool AddRegexCommand(const char *re_cstr, const char *command_cstr)
"lldb/Utility/RegularExpression.h" A C++ wrapper class for regex.
CommandObjectRegexCommand(CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help, llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask, bool is_removable)
"lldb/Utility/ArgCompletionRequest.h"
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override