1 //===-- OptionValueUUID.h --------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_OptionValueUUID_h_
10 #define liblldb_OptionValueUUID_h_
12 #include "lldb/Utility/UUID.h"
13 #include "lldb/Interpreter/OptionValue.h"
15 namespace lldb_private {
17 class OptionValueUUID : public OptionValue {
19 OptionValueUUID() : OptionValue(), m_uuid() {}
21 OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
23 ~OptionValueUUID() override {}
25 // Virtual subclass pure virtual overrides
27 OptionValue::Type GetType() const override { return eTypeUUID; }
29 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
30 uint32_t dump_mask) override;
33 SetValueFromString(llvm::StringRef value,
34 VarSetOperationType op = eVarSetOperationAssign) override;
36 SetValueFromString(const char *,
37 VarSetOperationType = eVarSetOperationAssign) = delete;
39 bool Clear() override {
41 m_value_was_set = false;
45 lldb::OptionValueSP DeepCopy() const override;
47 // Subclass specific functions
49 UUID &GetCurrentValue() { return m_uuid; }
51 const UUID &GetCurrentValue() const { return m_uuid; }
53 void SetCurrentValue(const UUID &value) { m_uuid = value; }
55 size_t AutoComplete(CommandInterpreter &interpreter,
56 CompletionRequest &request) override;
62 } // namespace lldb_private
64 #endif // liblldb_OptionValueUUID_h_