diff options
Diffstat (limited to 'include/lldb/Interpreter/CommandObjectRegexCommand.h')
-rw-r--r-- | include/lldb/Interpreter/CommandObjectRegexCommand.h | 74 |
1 files changed, 29 insertions, 45 deletions
diff --git a/include/lldb/Interpreter/CommandObjectRegexCommand.h b/include/lldb/Interpreter/CommandObjectRegexCommand.h index 9f8974a32bb2..44dc4f2bfd58 100644 --- a/include/lldb/Interpreter/CommandObjectRegexCommand.h +++ b/include/lldb/Interpreter/CommandObjectRegexCommand.h @@ -25,58 +25,42 @@ namespace lldb_private { // CommandObjectRegexCommand //------------------------------------------------------------------------- -class CommandObjectRegexCommand : public CommandObjectRaw -{ +class CommandObjectRegexCommand : public CommandObjectRaw { public: - CommandObjectRegexCommand (CommandInterpreter &interpreter, - const char *name, - const char *help, - const char *syntax, - uint32_t max_matches, - uint32_t completion_type_mask, - bool is_removable); - - ~CommandObjectRegexCommand() override; - - bool - IsRemovable () const override { return m_is_removable; } - - bool - AddRegexCommand (const char *re_cstr, const char *command_cstr); - - bool - HasRegexEntries () const - { - return !m_entries.empty(); - } - - int - HandleCompletion (Args &input, - int &cursor_index, - int &cursor_char_position, - int match_start_point, - int max_return_elements, - bool &word_complete, - StringList &matches) override; + CommandObjectRegexCommand(CommandInterpreter &interpreter, llvm::StringRef name, + llvm::StringRef help, llvm::StringRef syntax, + uint32_t max_matches, uint32_t completion_type_mask, + bool is_removable); + + ~CommandObjectRegexCommand() override; + + bool IsRemovable() const override { return m_is_removable; } + + bool AddRegexCommand(const char *re_cstr, const char *command_cstr); + + bool HasRegexEntries() const { return !m_entries.empty(); } + + int HandleCompletion(Args &input, int &cursor_index, + int &cursor_char_position, int match_start_point, + int max_return_elements, bool &word_complete, + StringList &matches) override; protected: - bool - DoExecute (const char *command, CommandReturnObject &result) override; + bool DoExecute(const char *command, CommandReturnObject &result) override; - struct Entry - { - RegularExpression regex; - std::string command; - }; + struct Entry { + RegularExpression regex; + std::string command; + }; - typedef std::list<Entry> EntryCollection; - const uint32_t m_max_matches; - const uint32_t m_completion_type_mask; - EntryCollection m_entries; - bool m_is_removable; + typedef std::list<Entry> EntryCollection; + const uint32_t m_max_matches; + const uint32_t m_completion_type_mask; + EntryCollection m_entries; + bool m_is_removable; private: - DISALLOW_COPY_AND_ASSIGN (CommandObjectRegexCommand); + DISALLOW_COPY_AND_ASSIGN(CommandObjectRegexCommand); }; } // namespace lldb_private |