]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupOutputFile.h
MFV r331708:
[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/OptionValueBoolean.h"
18 #include "lldb/Interpreter/OptionValueFileSpec.h"
19 #include "lldb/Interpreter/Options.h"
20
21 namespace lldb_private {
22 //-------------------------------------------------------------------------
23 // OptionGroupOutputFile
24 //-------------------------------------------------------------------------
25
26 class OptionGroupOutputFile : public OptionGroup {
27 public:
28   OptionGroupOutputFile();
29
30   ~OptionGroupOutputFile() override;
31
32   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
33
34   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
35                         ExecutionContext *execution_context) override;
36   Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
37
38   void OptionParsingStarting(ExecutionContext *execution_context) override;
39
40   const OptionValueFileSpec &GetFile() { return m_file; }
41
42   const OptionValueBoolean &GetAppend() { return m_append; }
43
44   bool AnyOptionWasSet() const {
45     return m_file.OptionWasSet() || m_append.OptionWasSet();
46   }
47
48 protected:
49   OptionValueFileSpec m_file;
50   OptionValueBoolean m_append;
51 };
52
53 } // namespace lldb_private
54
55 #endif // liblldb_OptionGroupOutputFile_h_