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 LLDB_INTERPRETER_COMMANDOBJECTREGEXCOMMAND_H
10 #define LLDB_INTERPRETER_COMMANDOBJECTREGEXCOMMAND_H
11 
12 #include <list>
13 
17 
18 namespace lldb_private {
19 
20 // CommandObjectRegexCommand
21 
23 public:
25  llvm::StringRef name, llvm::StringRef help,
26  llvm::StringRef syntax, uint32_t max_matches,
27  uint32_t completion_type_mask, bool is_removable);
28 
29  ~CommandObjectRegexCommand() override;
30 
31  bool IsRemovable() const override { return m_is_removable; }
32 
33  bool AddRegexCommand(llvm::StringRef re_cstr, llvm::StringRef command_cstr);
34 
35  bool HasRegexEntries() const { return !m_entries.empty(); }
36 
37  void HandleCompletion(CompletionRequest &request) override;
38 
39 protected:
40  bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
41 
42  struct Entry {
45  };
46 
47  typedef std::list<Entry> EntryCollection;
52 
53 private:
56  operator=(const CommandObjectRegexCommand &) = delete;
57 };
58 
59 } // namespace lldb_private
60 
61 #endif // LLDB_INTERPRETER_COMMANDOBJECTREGEXCOMMAND_H
RegularExpression.h
lldb_private::CommandObjectRegexCommand::operator=
const CommandObjectRegexCommand & operator=(const CommandObjectRegexCommand &)=delete
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb_private::CommandObjectRegexCommand::IsRemovable
bool IsRemovable() const override
Definition: CommandObjectRegexCommand.h:31
lldb_private::CommandObjectRegexCommand::HandleCompletion
void HandleCompletion(CompletionRequest &request) override
This default version handles calling option argument completions and then calls HandleArgumentComplet...
Definition: CommandObjectRegexCommand.cpp:85
lldb_private::CommandObjectRegexCommand::CommandObjectRegexCommand
CommandObjectRegexCommand(CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help, llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask, bool is_removable)
Definition: CommandObjectRegexCommand.cpp:17
lldb_private::CommandObjectRegexCommand::EntryCollection
std::list< Entry > EntryCollection
Definition: CommandObjectRegexCommand.h:47
lldb_private::CommandObjectRegexCommand::m_entries
EntryCollection m_entries
Definition: CommandObjectRegexCommand.h:50
CompletionRequest.h
lldb_private::CommandObjectRegexCommand::m_max_matches
const uint32_t m_max_matches
Definition: CommandObjectRegexCommand.h:48
lldb_private::CommandObjectRegexCommand::DoExecute
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override
Definition: CommandObjectRegexCommand.cpp:28
lldb_private::CommandObjectRegexCommand::m_completion_type_mask
const uint32_t m_completion_type_mask
Definition: CommandObjectRegexCommand.h:49
lldb_private::CommandObjectRegexCommand::Entry::regex
RegularExpression regex
Definition: CommandObjectRegexCommand.h:43
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::CommandObjectRegexCommand::Entry::command
std::string command
Definition: CommandObjectRegexCommand.h:44
lldb_private::CommandObjectRegexCommand::~CommandObjectRegexCommand
~CommandObjectRegexCommand() override
lldb_private::CommandObjectRaw
Definition: CommandObject.h:411
lldb_private::CommandObjectRegexCommand::Entry
Definition: CommandObjectRegexCommand.h:42
lldb_private::CommandObjectRegexCommand
Definition: CommandObjectRegexCommand.h:22
lldb_private::CommandReturnObject
Definition: CommandReturnObject.h:25
uint32_t
lldb_private::CommandObjectRegexCommand::HasRegexEntries
bool HasRegexEntries() const
Definition: CommandObjectRegexCommand.h:35
CommandObject.h
lldb_private::CommandObjectRegexCommand::m_is_removable
bool m_is_removable
Definition: CommandObjectRegexCommand.h:51
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::CommandObjectRegexCommand::AddRegexCommand
bool AddRegexCommand(llvm::StringRef re_cstr, llvm::StringRef command_cstr)
Definition: CommandObjectRegexCommand.cpp:71
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100