blob: ba12f0f753cd1747219da6f2837e35374f580b8d [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- CommandObjectSourceFile.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_CommandObjectSourceFile_h_
11#define liblldb_CommandObjectSourceFile_h_
12
13// C Includes
14// C++ Includes
15// Other libraries and framework includes
16// Project includes
17#include "lldb/Interpreter/CommandObject.h"
18#include "lldb/Core/Options.h"
19#include "lldb/Core/FileSpec.h"
20
21namespace lldb_private {
22
23//-------------------------------------------------------------------------
24// CommandObjectSourceFile
25//-------------------------------------------------------------------------
26
27class CommandObjectSourceFile : public CommandObject
28{
29public:
30 class CommandOptions : public Options
31 {
32 public:
33
34 CommandOptions ();
35
36 virtual
37 ~CommandOptions ();
38
39 virtual Error
40 SetOptionValue (int option_idx, const char *option_arg);
41
42 void
43 ResetOptionValues ();
44
45 const lldb::OptionDefinition*
46 GetDefinitions ();
47
48 // Options table: Required for subclasses of Options.
49
50 static lldb::OptionDefinition g_option_table[];
51
52 // Instance variables to hold the values for command options.
53 FileSpec file_spec;
54 std::string file_name;
55 uint32_t start_line;
56 uint32_t num_lines;
57 };
58
59 CommandObjectSourceFile ();
60
61 virtual
62 ~CommandObjectSourceFile ();
63
64 virtual bool
65 Execute (Args& command,
66 CommandContext *context,
67 CommandInterpreter *interpreter,
68 CommandReturnObject &result);
69
70 virtual
71 Options *
72 GetOptions ();
73
74protected:
75 CommandOptions m_options;
76};
77
78} // namespace lldb_private
79
80#endif // liblldb_CommandObjectSourceFile_h_