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 Cloneable<OptionValueUUID, OptionValue> {
18 public:
19  OptionValueUUID() = default;
20 
21  OptionValueUUID(const UUID &uuid) : m_uuid(uuid) {}
22 
23  ~OptionValueUUID() override = default;
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 
36  void Clear() override {
37  m_uuid.Clear();
38  m_value_was_set = false;
39  }
40 
41  // Subclass specific functions
42 
43  UUID &GetCurrentValue() { return m_uuid; }
44 
45  const UUID &GetCurrentValue() const { return m_uuid; }
46 
47  void SetCurrentValue(const UUID &value) { m_uuid = value; }
48 
49  void AutoComplete(CommandInterpreter &interpreter,
50  CompletionRequest &request) override;
51 
52 protected:
54 };
55 
56 } // namespace lldb_private
57 
58 #endif // LLDB_INTERPRETER_OPTIONVALUEUUID_H
lldb_private::OptionValueUUID::GetCurrentValue
UUID & GetCurrentValue()
Definition: OptionValueUUID.h:43
lldb_private::UUID
Definition: UUID.h:23
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::OptionValueUUID::SetValueFromString
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Definition: OptionValueUUID.cpp:30
UUID.h
lldb_private::OptionValueUUID::m_uuid
UUID m_uuid
Definition: OptionValueUUID.h:53
lldb_private::OptionValueUUID::OptionValueUUID
OptionValueUUID(const UUID &uuid)
Definition: OptionValueUUID.h:21
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Cloneable
Definition: Cloneable.h:40
OptionValue.h
lldb_private::VarSetOperationType
VarSetOperationType
Settable state variable types.
Definition: lldb-private-enumerations.h:83
lldb_private::OptionValueUUID::SetCurrentValue
void SetCurrentValue(const UUID &value)
Definition: OptionValueUUID.h:47
lldb_private::OptionValue::eTypeUUID
@ eTypeUUID
Definition: OptionValue.h:46
lldb_private::OptionValueUUID
Definition: OptionValueUUID.h:17
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb_private::OptionValueUUID::GetType
OptionValue::Type GetType() const override
Definition: OptionValueUUID.h:27
lldb_private::OptionValueUUID::GetCurrentValue
const UUID & GetCurrentValue() const
Definition: OptionValueUUID.h:45
lldb_private::UUID::Clear
void Clear()
Definition: UUID.h:72
lldb_private::Status
Definition: Status.h:44
lldb_private::OptionValue::Type
Type
Definition: OptionValue.h:26
lldb_private::OptionValueUUID::~OptionValueUUID
~OptionValueUUID() override=default
uint32_t
lldb_private::OptionValue::m_value_was_set
bool m_value_was_set
Definition: OptionValue.h:332
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::OptionValueUUID::AutoComplete
void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) override
Definition: OptionValueUUID.cpp:61
lldb_private::OptionValueUUID::DumpValue
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
Definition: OptionValueUUID.cpp:19
lldb_private::OptionValueUUID::Clear
void Clear() override
Definition: OptionValueUUID.h:36
lldb_private::OptionValueUUID::OptionValueUUID
OptionValueUUID()=default
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::eVarSetOperationAssign
@ eVarSetOperationAssign
Definition: lldb-private-enumerations.h:90