1//===-- OptionGroupString.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_OptionGroupString_h_ 11#define liblldb_OptionGroupString_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/OptionValueString.h" 19 20namespace lldb_private { 21 //------------------------------------------------------------------------- 22 // OptionGroupString 23 //------------------------------------------------------------------------- 24 25 class OptionGroupString : public OptionGroup 26 { 27 public: 28 29 OptionGroupString (uint32_t usage_mask, 30 bool required, 31 const char *long_option, 32 int short_option, 33 uint32_t completion_type, 34 lldb::CommandArgumentType argument_type, 35 const char *usage_text, 36 const char *default_value); 37 38 virtual 39 ~OptionGroupString (); 40 41 42 virtual uint32_t 43 GetNumDefinitions () 44 { 45 return 1; 46 } 47 48 virtual const OptionDefinition* 49 GetDefinitions () 50 { 51 return &m_option_definition; 52 } 53 54 virtual Error 55 SetOptionValue (CommandInterpreter &interpreter, 56 uint32_t option_idx, 57 const char *option_value); 58 59 virtual void 60 OptionParsingStarting (CommandInterpreter &interpreter); 61 62 OptionValueString & 63 GetOptionValue () 64 { 65 return m_value; 66 } 67 68 const OptionValueString & 69 GetOptionValue () const 70 { 71 return m_value; 72 } 73 74 protected: 75 OptionValueString m_value; 76 OptionDefinition m_option_definition; 77 78 }; 79 80} // namespace lldb_private 81 82#endif // liblldb_OptionGroupString_h_ 83