diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectSettings.h')
-rw-r--r-- | lldb/source/Commands/CommandObjectSettings.h | 308 |
1 files changed, 304 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.h b/lldb/source/Commands/CommandObjectSettings.h index 4159b8b03b6..0bfb3caff3c 100644 --- a/lldb/source/Commands/CommandObjectSettings.h +++ b/lldb/source/Commands/CommandObjectSettings.h @@ -15,27 +15,327 @@ // Other libraries and framework includes // Project includes #include "lldb/Interpreter/CommandObject.h" +#include "lldb/Interpreter/CommandObjectMultiword.h" +#include "lldb/Interpreter/Options.h" + namespace lldb_private { //------------------------------------------------------------------------- -// CommandObjectSettings +// CommandObjectMultiwordSettings +//------------------------------------------------------------------------- + +class CommandObjectMultiwordSettings : public CommandObjectMultiword +{ +public: + + CommandObjectMultiwordSettings (CommandInterpreter &interpreter); + + virtual + ~CommandObjectMultiwordSettings (); + +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsSet +//------------------------------------------------------------------------- + +class CommandObjectSettingsSet : public CommandObject +{ +public: + CommandObjectSettingsSet (); + + virtual + ~CommandObjectSettingsSet (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual Options * + GetOptions (); + + class CommandOptions : public Options + { + public: + + CommandOptions (); + + virtual + ~CommandOptions (); + + virtual Error + SetOptionValue (int option_idx, const char *option_arg); + + void + ResetOptionValues (); + + const lldb::OptionDefinition* + GetDefinitions (); + + // Options table: Required for subclasses of Options. + + static lldb::OptionDefinition g_option_table[]; + + // Instance variables to hold the values for command options. + + bool m_override; + bool m_reset; + + }; + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: + CommandOptions m_options; +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsShow -- Show current values //------------------------------------------------------------------------- -class CommandObjectSettings : public CommandObject +class CommandObjectSettingsShow : public CommandObject { public: + CommandObjectSettingsShow (); + + virtual + ~CommandObjectSettingsShow (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsList -- List settable variables +//------------------------------------------------------------------------- + +class CommandObjectSettingsList : public CommandObject +{ +public: + CommandObjectSettingsList (); + + virtual + ~CommandObjectSettingsList (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + +private: +}; - CommandObjectSettings (); +//------------------------------------------------------------------------- +// CommandObjectSettingsRemove +//------------------------------------------------------------------------- + +class CommandObjectSettingsRemove : public CommandObject +{ +public: + CommandObjectSettingsRemove (); virtual - ~CommandObjectSettings (); + ~CommandObjectSettingsRemove (); virtual bool Execute (CommandInterpreter &interpreter, Args& command, CommandReturnObject &result); + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsReplace +//------------------------------------------------------------------------- + +class CommandObjectSettingsReplace : public CommandObject +{ +public: + CommandObjectSettingsReplace (); + + virtual + ~CommandObjectSettingsReplace (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsInsertBefore +//------------------------------------------------------------------------- + +class CommandObjectSettingsInsertBefore : public CommandObject +{ +public: + CommandObjectSettingsInsertBefore (); + + virtual + ~CommandObjectSettingsInsertBefore (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingInsertAfter +//------------------------------------------------------------------------- + +class CommandObjectSettingsInsertAfter : public CommandObject +{ +public: + CommandObjectSettingsInsertAfter (); + + virtual + ~CommandObjectSettingsInsertAfter (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsAppend +//------------------------------------------------------------------------- + +class CommandObjectSettingsAppend : public CommandObject +{ +public: + CommandObjectSettingsAppend (); + + virtual + ~CommandObjectSettingsAppend (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: +}; + +//------------------------------------------------------------------------- +// CommandObjectSettingsClear +//------------------------------------------------------------------------- + +class CommandObjectSettingsClear : public CommandObject +{ +public: + CommandObjectSettingsClear (); + + virtual + ~CommandObjectSettingsClear (); + + virtual bool + Execute (CommandInterpreter &interpreter, + Args& command, + CommandReturnObject &result); + + virtual int + HandleArgumentCompletion (CommandInterpreter &interpreter, + Args &input, + int &cursor_index, + int &cursor_char_position, + OptionElementVector &opt_element_vector, + int match_start_point, + int max_return_elements, + bool &word_complete, + StringList &matches); + +private: }; } // namespace lldb_private |