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