blob: 4820b20a12baea9e24113df00ab3e8a89b59db65 [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- 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 Ingham84cdc152010-06-15 19:49:27 +000017#include "lldb/Interpreter/Options.h"
Chris Lattner24943d22010-06-08 16:52:24 +000018#include "lldb/Core/ArchSpec.h"
19#include "lldb/Interpreter/CommandObject.h"
20
21namespace lldb_private {
22
23//-------------------------------------------------------------------------
24// CommandObjectFile
25//-------------------------------------------------------------------------
26
27class CommandObjectFile : public CommandObject
28{
29public:
30
Greg Clayton238c0a12010-09-18 01:14:36 +000031 CommandObjectFile (CommandInterpreter &interpreter);
Chris Lattner24943d22010-06-08 16:52:24 +000032
33 virtual
34 ~CommandObjectFile ();
35
36 virtual bool
Greg Clayton238c0a12010-09-18 01:14:36 +000037 Execute (Args& command,
Chris Lattner24943d22010-06-08 16:52:24 +000038 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 Ingham802f8b02010-06-30 05:02:46 +000069
70 virtual int
Greg Clayton238c0a12010-09-18 01:14:36 +000071 HandleArgumentCompletion (Args &input,
Jim Ingham802f8b02010-06-30 05:02:46 +000072 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 Lattner24943d22010-06-08 16:52:24 +000080
81private:
82 CommandOptions m_options;
83
84};
85
86} // namespace lldb_private
87
88#endif // liblldb_CommandObjectFile_h_