1 //===-- CommandObjectHelp.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_CommandObjectHelp_h_
11 #define liblldb_CommandObjectHelp_h_
15 // Other libraries and framework includes
17 #include "lldb/Interpreter/CommandObject.h"
18 #include "lldb/Interpreter/Options.h"
20 namespace lldb_private {
22 //-------------------------------------------------------------------------
24 //-------------------------------------------------------------------------
26 class CommandObjectHelp : public CommandObjectParsed
30 CommandObjectHelp (CommandInterpreter &interpreter);
33 ~CommandObjectHelp ();
36 HandleCompletion (Args &input,
38 int &cursor_char_position,
39 int match_start_point,
40 int max_return_elements,
44 class CommandOptions : public Options
48 CommandOptions (CommandInterpreter &interpreter) :
57 SetOptionValue (uint32_t option_idx, const char *option_arg)
60 const int short_option = m_getopt_table[option_idx].val;
65 m_show_aliases = true;
68 m_show_user_defined = false;
71 error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
79 OptionParsingStarting ()
81 m_show_aliases = false;
82 m_show_user_defined = true;
85 const OptionDefinition*
88 return g_option_table;
91 // Options table: Required for subclasses of Options.
93 static OptionDefinition g_option_table[];
95 // Instance variables to hold the values for command options.
98 bool m_show_user_defined;
109 DoExecute (Args& command,
110 CommandReturnObject &result);
113 CommandOptions m_options;
117 } // namespace lldb_private
119 #endif // liblldb_CommandObjectHelp_h_