LLDB  mainline
OptionValueUUID.h
Go to the documentation of this file.
1 //===-- OptionValueUUID.h --------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_INTERPRETER_OPTIONVALUEUUID_H
10 #define LLDB_INTERPRETER_OPTIONVALUEUUID_H
11 
12 #include "lldb/Utility/UUID.h"
14 
15 namespace lldb_private {
16 
17 class OptionValueUUID : public OptionValue {
18 public:
20 
21  OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
22 
23  ~OptionValueUUID() override {}
24 
25  // Virtual subclass pure virtual overrides
26 
27  OptionValue::Type GetType() const override { return eTypeUUID; }
28 
29  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
30  uint32_t dump_mask) override;
31 
32  Status
33  SetValueFromString(llvm::StringRef value,
35  Status
36  SetValueFromString(const char *,
38 
39  bool Clear() override {
40  m_uuid.Clear();
41  m_value_was_set = false;
42  return true;
43  }
44 
45  lldb::OptionValueSP DeepCopy() const override;
46 
47  // Subclass specific functions
48 
49  UUID &GetCurrentValue() { return m_uuid; }
50 
51  const UUID &GetCurrentValue() const { return m_uuid; }
52 
53  void SetCurrentValue(const UUID &value) { m_uuid = value; }
54 
55  void AutoComplete(CommandInterpreter &interpreter,
56  CompletionRequest &request) override;
57 
58 protected:
60 };
61 
62 } // namespace lldb_private
63 
64 #endif // LLDB_INTERPRETER_OPTIONVALUEUUID_H
lldb::OptionValueSP DeepCopy() const override
A class that represents a running process on the host machine.
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
"lldb/Utility/ArgCompletionRequest.h"
const UUID & GetCurrentValue() const
VarSetOperationType
Settable state variable types.
void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) override
OptionValueUUID(const UUID &uuid)
void Clear()
Definition: UUID.h:55
OptionValue::Type GetType() const override
An error handling class.
Definition: Status.h:44
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
void SetCurrentValue(const UUID &value)