Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- CommandObjectFile.h -------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef liblldb_CommandObjectFile_h_ |
| 11 | #define liblldb_CommandObjectFile_h_ |
| 12 | |
| 13 | // C Includes |
| 14 | // C++ Includes |
| 15 | // Other libraries and framework includes |
| 16 | // Project includes |
Jim Ingham | 84cdc15 | 2010-06-15 19:49:27 +0000 | [diff] [blame] | 17 | #include "lldb/Interpreter/Options.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 18 | #include "lldb/Core/ArchSpec.h" |
| 19 | #include "lldb/Interpreter/CommandObject.h" |
| 20 | |
| 21 | namespace lldb_private { |
| 22 | |
| 23 | //------------------------------------------------------------------------- |
| 24 | // CommandObjectFile |
| 25 | //------------------------------------------------------------------------- |
| 26 | |
| 27 | class CommandObjectFile : public CommandObject |
| 28 | { |
| 29 | public: |
| 30 | |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 31 | CommandObjectFile (CommandInterpreter &interpreter); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 32 | |
| 33 | virtual |
| 34 | ~CommandObjectFile (); |
| 35 | |
| 36 | virtual bool |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 37 | Execute (Args& command, |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 38 | CommandReturnObject &result); |
| 39 | |
| 40 | virtual Options * |
| 41 | GetOptions (); |
| 42 | |
| 43 | class CommandOptions : public Options |
| 44 | { |
| 45 | public: |
| 46 | |
| 47 | CommandOptions (); |
| 48 | |
| 49 | virtual |
| 50 | ~CommandOptions (); |
| 51 | |
| 52 | virtual Error |
| 53 | SetOptionValue (int option_idx, const char *option_arg); |
| 54 | |
| 55 | void |
| 56 | ResetOptionValues (); |
| 57 | |
| 58 | const lldb::OptionDefinition* |
| 59 | GetDefinitions (); |
| 60 | |
| 61 | // Options table: Required for subclasses of Options. |
| 62 | |
| 63 | static lldb::OptionDefinition g_option_table[]; |
| 64 | |
| 65 | // Instance variables to hold the values for command options. |
| 66 | |
| 67 | ArchSpec m_arch; |
| 68 | }; |
Jim Ingham | 802f8b0 | 2010-06-30 05:02:46 +0000 | [diff] [blame] | 69 | |
| 70 | virtual int |
Greg Clayton | 238c0a1 | 2010-09-18 01:14:36 +0000 | [diff] [blame] | 71 | HandleArgumentCompletion (Args &input, |
Jim Ingham | 802f8b0 | 2010-06-30 05:02:46 +0000 | [diff] [blame] | 72 | int &cursor_index, |
| 73 | int &cursor_char_position, |
| 74 | OptionElementVector &opt_element_vector, |
| 75 | int match_start_point, |
| 76 | int max_return_elements, |
| 77 | bool &word_complete, |
| 78 | StringList &matches); |
| 79 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 80 | |
| 81 | private: |
| 82 | CommandOptions m_options; |
| 83 | |
| 84 | }; |
| 85 | |
| 86 | } // namespace lldb_private |
| 87 | |
| 88 | #endif // liblldb_CommandObjectFile_h_ |