]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupUInt64.h
Import libxo-1.0.2
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionGroupUInt64.h
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 #include "lldb/Interpreter/OptionValueUInt64.h"
14 #include "lldb/Interpreter/Options.h"
15
16 namespace lldb_private {
17
18 //-------------------------------------------------------------------------
19 // OptionGroupUInt64
20 //-------------------------------------------------------------------------
21
22 class OptionGroupUInt64 : public OptionGroup {
23 public:
24   OptionGroupUInt64(uint32_t usage_mask, bool required, const char *long_option,
25                     int short_option, uint32_t completion_type,
26                     lldb::CommandArgumentType argument_type,
27                     const char *usage_text, uint64_t default_value);
28
29   ~OptionGroupUInt64() override;
30
31   llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
32     return llvm::ArrayRef<OptionDefinition>(&m_option_definition, 1);
33   }
34
35   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
36                         ExecutionContext *execution_context) override;
37   Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
38
39   void OptionParsingStarting(ExecutionContext *execution_context) override;
40
41   OptionValueUInt64 &GetOptionValue() { return m_value; }
42
43   const OptionValueUInt64 &GetOptionValue() const { return m_value; }
44
45 protected:
46   OptionValueUInt64 m_value;
47   OptionDefinition m_option_definition;
48 };
49
50 } // namespace lldb_private
51
52 #endif // liblldb_OptionGroupUInt64_h_