1 //===-- OptionGroupOutputFile.h ---------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_OptionGroupOutputFile_h_
11 #define liblldb_OptionGroupOutputFile_h_
13 #include "lldb/Interpreter/OptionValueBoolean.h"
14 #include "lldb/Interpreter/OptionValueFileSpec.h"
15 #include "lldb/Interpreter/Options.h"
17 namespace lldb_private {
18 //-------------------------------------------------------------------------
19 // OptionGroupOutputFile
20 //-------------------------------------------------------------------------
22 class OptionGroupOutputFile : public OptionGroup {
24 OptionGroupOutputFile();
26 ~OptionGroupOutputFile() override;
28 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
30 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
31 ExecutionContext *execution_context) override;
32 Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
34 void OptionParsingStarting(ExecutionContext *execution_context) override;
36 const OptionValueFileSpec &GetFile() { return m_file; }
38 const OptionValueBoolean &GetAppend() { return m_append; }
40 bool AnyOptionWasSet() const {
41 return m_file.OptionWasSet() || m_append.OptionWasSet();
45 OptionValueFileSpec m_file;
46 OptionValueBoolean m_append;
49 } // namespace lldb_private
51 #endif // liblldb_OptionGroupOutputFile_h_