1 //===-- OptionGroupUInt64.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_OptionGroupUInt64_h_ 11 #define liblldb_OptionGroupUInt64_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/OptionValueUInt64.h" 19 20 namespace lldb_private { 21 //------------------------------------------------------------------------- 22 // OptionGroupUInt64 23 //------------------------------------------------------------------------- 24 25 class OptionGroupUInt64 : public OptionGroup 26 { 27 public: 28 29 OptionGroupUInt64 (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 uint64_t default_value); 37 38 virtual 39 ~OptionGroupUInt64 (); 40 41 42 virtual uint32_t GetNumDefinitions()43 GetNumDefinitions () 44 { 45 return 1; 46 } 47 48 virtual const OptionDefinition* GetDefinitions()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 OptionValueUInt64 & GetOptionValue()63 GetOptionValue () 64 { 65 return m_value; 66 } 67 68 const OptionValueUInt64 & GetOptionValue()69 GetOptionValue () const 70 { 71 return m_value; 72 } 73 74 protected: 75 OptionValueUInt64 m_value; 76 OptionDefinition m_option_definition; 77 78 }; 79 80 } // namespace lldb_private 81 82 #endif // liblldb_OptionGroupUInt64_h_ 83