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_
15 // Other libraries and framework includes
17 #include "lldb/Utility/UUID.h"
18 #include "lldb/Interpreter/OptionValue.h"
20 namespace lldb_private {
22 class OptionValueUUID : public OptionValue {
24 OptionValueUUID() : OptionValue(), m_uuid() {}
26 OptionValueUUID(const UUID &uuid) : OptionValue(), m_uuid(uuid) {}
28 ~OptionValueUUID() override {}
30 //---------------------------------------------------------------------
31 // Virtual subclass pure virtual overrides
32 //---------------------------------------------------------------------
34 OptionValue::Type GetType() const override { return eTypeUUID; }
36 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
37 uint32_t dump_mask) override;
40 SetValueFromString(llvm::StringRef value,
41 VarSetOperationType op = eVarSetOperationAssign) override;
43 SetValueFromString(const char *,
44 VarSetOperationType = eVarSetOperationAssign) = delete;
46 bool Clear() override {
48 m_value_was_set = false;
52 lldb::OptionValueSP DeepCopy() const override;
54 //---------------------------------------------------------------------
55 // Subclass specific functions
56 //---------------------------------------------------------------------
58 UUID &GetCurrentValue() { return m_uuid; }
60 const UUID &GetCurrentValue() const { return m_uuid; }
62 void SetCurrentValue(const UUID &value) { m_uuid = value; }
64 size_t AutoComplete(CommandInterpreter &interpreter,
65 CompletionRequest &request) override;
71 } // namespace lldb_private
73 #endif // liblldb_OptionValueUUID_h_