1 //===-- OptionValueUUID.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_OptionValueUUID_h_
11 #define liblldb_OptionValueUUID_h_
13 #include "lldb/Utility/UUID.h"
14 #include "lldb/Interpreter/OptionValue.h"
16 namespace lldb_private {
18 class OptionValueUUID : public OptionValue {
20 OptionValueUUID() : OptionValue(), m_uuid() {}
22 OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
24 ~OptionValueUUID() override {}
26 //---------------------------------------------------------------------
27 // Virtual subclass pure virtual overrides
28 //---------------------------------------------------------------------
30 OptionValue::Type GetType() const override { return eTypeUUID; }
32 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
33 uint32_t dump_mask) override;
36 SetValueFromString(llvm::StringRef value,
37 VarSetOperationType op = eVarSetOperationAssign) override;
39 SetValueFromString(const char *,
40 VarSetOperationType = eVarSetOperationAssign) = delete;
42 bool Clear() override {
44 m_value_was_set = false;
48 lldb::OptionValueSP DeepCopy() const override;
50 //---------------------------------------------------------------------
51 // Subclass specific functions
52 //---------------------------------------------------------------------
54 UUID &GetCurrentValue() { return m_uuid; }
56 const UUID &GetCurrentValue() const { return m_uuid; }
58 void SetCurrentValue(const UUID &value) { m_uuid = value; }
60 size_t AutoComplete(CommandInterpreter &interpreter,
61 CompletionRequest &request) override;
67 } // namespace lldb_private
69 #endif // liblldb_OptionValueUUID_h_