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 30 OptionGroupOutputFile (); 31 32 virtual 33 ~OptionGroupOutputFile (); 34 35 36 virtual uint32_t 37 GetNumDefinitions (); 38 39 virtual const OptionDefinition* 40 GetDefinitions (); 41 42 virtual Error 43 SetOptionValue (CommandInterpreter &interpreter, 44 uint32_t option_idx, 45 const char *option_value); 46 47 virtual void 48 OptionParsingStarting (CommandInterpreter &interpreter); 49 50 const OptionValueFileSpec & GetFile()51 GetFile () 52 { 53 return m_file; 54 } 55 56 const OptionValueBoolean & GetAppend()57 GetAppend () 58 { 59 return m_append; 60 } 61 62 bool AnyOptionWasSet()63 AnyOptionWasSet () const 64 { 65 return m_file.OptionWasSet() || m_append.OptionWasSet(); 66 } 67 68 protected: 69 OptionValueFileSpec m_file; 70 OptionValueBoolean m_append; 71 72 }; 73 74 } // namespace lldb_private 75 76 #endif // liblldb_OptionGroupOutputFile_h_ 77