1 //===-- OptionGroupFile.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_OptionGroupFile_h_
11 #define liblldb_OptionGroupFile_h_
12 
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Interpreter/Options.h"
18 #include "lldb/Interpreter/NamedOptionValue.h"
19 
20 namespace lldb_private {
21 //-------------------------------------------------------------------------
22 // OptionGroupFile
23 //-------------------------------------------------------------------------
24 
25 class OptionGroupFile : public OptionGroup
26 {
27 public:
28 
29     OptionGroupFile (uint32_t usage_mask,
30                      bool required,
31                      const char *long_option,
32                      char short_option,
33                      uint32_t completion_type,
34                      lldb::CommandArgumentType argument_type,
35                      const char *usage_text);
36 
37     virtual
38     ~OptionGroupFile ();
39 
40 
41     virtual uint32_t
42     GetNumDefinitions ()
43     {
44         return 1;
45     }
46 
47     virtual const OptionDefinition*
48     GetDefinitions ()
49     {
50         return &m_option_definition;
51     }
52 
53     virtual Error
54     SetOptionValue (CommandInterpreter &interpreter,
55                     uint32_t option_idx,
56                     const char *option_value);
57 
58     virtual void
59     OptionParsingStarting (CommandInterpreter &interpreter);
60 
61     OptionValueFileSpec &
62     GetOptionValue ()
63     {
64         return m_file;
65     }
66 
67     const OptionValueFileSpec &
68     GetOptionValue () const
69     {
70         return m_file;
71     }
72 
73 protected:
74     OptionValueFileSpec m_file;
75     OptionDefinition m_option_definition;
76 
77 };
78 
79 } // namespace lldb_private
80 
81 #endif  // liblldb_OptionGroupFile_h_
82