blob: 6691283ce099ff180d3cf714b419cc742d8df59d [file] [log] [blame]
Chris Lattner24943d22010-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 Ingham84cdc152010-06-15 19:49:27 +000018#include "lldb/Interpreter/Options.h"
Chris Lattner24943d22010-06-08 16:52:24 +000019#include "lldb/Core/Language.h"
20
21namespace lldb_private {
22
Jim Inghamda26bd22012-06-08 21:56:10 +000023 class CommandObjectArgs : public CommandObjectParsed
Chris Lattner24943d22010-06-08 16:52:24 +000024 {
25 public:
26
27 class CommandOptions : public Options
28 {
29 public:
30
Greg Claytonf15996e2011-04-07 22:46:35 +000031 CommandOptions (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000032
33 virtual
34 ~CommandOptions ();
35
36 virtual Error
Greg Clayton143fcc32011-04-13 00:18:08 +000037 SetOptionValue (uint32_t option_idx, const char *option_arg);
Chris Lattner24943d22010-06-08 16:52:24 +000038
39 void
Greg Clayton143fcc32011-04-13 00:18:08 +000040 OptionParsingStarting ();
Chris Lattner24943d22010-06-08 16:52:24 +000041
Greg Claytonb3448432011-03-24 21:19:54 +000042 const OptionDefinition*
Chris Lattner24943d22010-06-08 16:52:24 +000043 GetDefinitions ();
44
45 // Options table: Required for subclasses of Options.
46
Greg Claytonb3448432011-03-24 21:19:54 +000047 static OptionDefinition g_option_table[];
Chris Lattner24943d22010-06-08 16:52:24 +000048 };
49
Greg Clayton238c0a12010-09-18 01:14:36 +000050 CommandObjectArgs (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000051
52 virtual
53 ~CommandObjectArgs ();
54
55 virtual
56 Options *
57 GetOptions ();
58
59
Chris Lattner24943d22010-06-08 16:52:24 +000060 protected:
61
62 CommandOptions m_options;
Jim Inghamda26bd22012-06-08 21:56:10 +000063
64 virtual bool
65 DoExecute ( Args& command,
66 CommandReturnObject &result);
67
Chris Lattner24943d22010-06-08 16:52:24 +000068 };
69
70} // namespace lldb_private
71
72#endif // liblldb_CommandObjectArgs_h_