]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h
Merge ^/head r306412 through r306905.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionGroupOutputFile.h
1 //===-- OptionGroupOutputFile.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_OptionGroupOutputFile_h_
11 #define liblldb_OptionGroupOutputFile_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/OptionValueBoolean.h"
19 #include "lldb/Interpreter/OptionValueFileSpec.h"
20
21 namespace lldb_private {
22 //-------------------------------------------------------------------------
23 // OptionGroupOutputFile
24 //-------------------------------------------------------------------------
25
26 class OptionGroupOutputFile : public OptionGroup
27 {
28 public:
29     OptionGroupOutputFile ();
30     
31     ~OptionGroupOutputFile() override;
32
33     uint32_t
34     GetNumDefinitions() override;
35     
36     const OptionDefinition*
37     GetDefinitions() override;
38     
39     Error
40     SetOptionValue(CommandInterpreter &interpreter,
41                    uint32_t option_idx,
42                    const char *option_value) override;
43     
44     void
45     OptionParsingStarting(CommandInterpreter &interpreter) override;
46     
47     const OptionValueFileSpec &
48     GetFile ()
49     {
50         return m_file;
51     }
52
53     const OptionValueBoolean &
54     GetAppend ()
55     {
56         return m_append;
57     }
58     
59     bool
60     AnyOptionWasSet () const
61     {
62         return m_file.OptionWasSet() || m_append.OptionWasSet();
63     }
64
65 protected:
66     OptionValueFileSpec m_file;
67     OptionValueBoolean m_append;
68 };
69
70 } // namespace lldb_private
71
72 #endif // liblldb_OptionGroupOutputFile_h_