blob: 194563d831004a3248d4961a340af7c9b0d39ff9 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- CommandObjectArgs.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_CommandObjectArgs_h_
11#define liblldb_CommandObjectArgs_h_
12
13// C Includes
14// C++ Includes
15// Other libraries and framework includes
16// Project includes
17#include "lldb/Interpreter/CommandObject.h"
Jim Ingham40af72e2010-06-15 19:49:27 +000018#include "lldb/Interpreter/Options.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000019
20namespace lldb_private {
21
Jim Ingham5a988412012-06-08 21:56:10 +000022 class CommandObjectArgs : public CommandObjectParsed
Chris Lattner30fdc8d2010-06-08 16:52:24 +000023 {
24 public:
25
26 class CommandOptions : public Options
27 {
28 public:
29
Greg Claytoneb0103f2011-04-07 22:46:35 +000030 CommandOptions (CommandInterpreter &interpreter);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000031
32 virtual
33 ~CommandOptions ();
34
35 virtual Error
Greg Claytonf6b8b582011-04-13 00:18:08 +000036 SetOptionValue (uint32_t option_idx, const char *option_arg);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000037
38 void
Greg Claytonf6b8b582011-04-13 00:18:08 +000039 OptionParsingStarting ();
Chris Lattner30fdc8d2010-06-08 16:52:24 +000040
Greg Claytone0d378b2011-03-24 21:19:54 +000041 const OptionDefinition*
Chris Lattner30fdc8d2010-06-08 16:52:24 +000042 GetDefinitions ();
43
44 // Options table: Required for subclasses of Options.
45
Greg Claytone0d378b2011-03-24 21:19:54 +000046 static OptionDefinition g_option_table[];
Chris Lattner30fdc8d2010-06-08 16:52:24 +000047 };
48
Greg Claytona7015092010-09-18 01:14:36 +000049 CommandObjectArgs (CommandInterpreter &interpreter);
Chris Lattner30fdc8d2010-06-08 16:52:24 +000050
51 virtual
52 ~CommandObjectArgs ();
53
54 virtual
55 Options *
56 GetOptions ();
57
58
Chris Lattner30fdc8d2010-06-08 16:52:24 +000059 protected:
60
61 CommandOptions m_options;
Jim Ingham5a988412012-06-08 21:56:10 +000062
63 virtual bool
64 DoExecute ( Args& command,
65 CommandReturnObject &result);
66
Chris Lattner30fdc8d2010-06-08 16:52:24 +000067 };
68
69} // namespace lldb_private
70
71#endif // liblldb_CommandObjectArgs_h_