]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Interpreter/OptionValueUUID.h
Vendor import of stripped lldb trunk r256633:
[FreeBSD/FreeBSD.git] / include / lldb / Interpreter / OptionValueUUID.h
1 //===-- OptionValueUUID.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_OptionValueUUID_h_
11 #define liblldb_OptionValueUUID_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Core/UUID.h"
18 #include "lldb/Interpreter/OptionValue.h"
19
20 namespace lldb_private {
21
22 class OptionValueUUID : public OptionValue
23 {
24 public:
25     OptionValueUUID () :
26         OptionValue(),
27         m_uuid ()
28     {
29     }
30     
31     OptionValueUUID (const UUID &uuid) :
32         OptionValue(),
33         m_uuid (uuid)
34     {
35     }
36     
37     ~OptionValueUUID() override
38     {
39     }
40     
41     //---------------------------------------------------------------------
42     // Virtual subclass pure virtual overrides
43     //---------------------------------------------------------------------
44     
45     OptionValue::Type
46     GetType() const override
47     {
48         return eTypeUUID;
49     }
50     
51     void
52     DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override;
53     
54     Error
55     SetValueFromString(llvm::StringRef value,
56                        VarSetOperationType op = eVarSetOperationAssign) override;
57     
58     bool
59     Clear() override
60     {
61         m_uuid.Clear();
62         m_value_was_set = false;
63         return true;
64     }
65     
66     lldb::OptionValueSP
67     DeepCopy() const override;
68     
69     //---------------------------------------------------------------------
70     // Subclass specific functions
71     //---------------------------------------------------------------------
72     
73     UUID &
74     GetCurrentValue()
75     {
76         return m_uuid;
77     }
78     
79     const UUID &
80     GetCurrentValue() const
81     {
82         return m_uuid;
83     }
84     
85     void
86     SetCurrentValue (const UUID &value)
87     {
88         m_uuid = value;
89     }
90     
91     size_t
92     AutoComplete(CommandInterpreter &interpreter,
93                  const char *s,
94                  int match_start_point,
95                  int max_return_elements,
96                  bool &word_complete,
97                  StringList &matches) override;
98
99 protected:
100     UUID m_uuid;
101 };
102
103 } // namespace lldb_private
104
105 #endif // liblldb_OptionValueUUID_h_