1 //===-- OptionValueFormatEntity.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_OptionValueFormatEntity_h_
11 #define liblldb_OptionValueFormatEntity_h_
15 // Other libraries and framework includes
17 #include "lldb/Core/FormatEntity.h"
18 #include "lldb/Interpreter/OptionValue.h"
20 namespace lldb_private {
22 class OptionValueFormatEntity : public OptionValue
25 OptionValueFormatEntity (const char *default_format);
27 ~OptionValueFormatEntity() override
31 //---------------------------------------------------------------------
32 // Virtual subclass pure virtual overrides
33 //---------------------------------------------------------------------
36 GetType () const override
38 return eTypeFormatEntity;
42 DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override;
45 SetValueFromString (llvm::StringRef value,
46 VarSetOperationType op = eVarSetOperationAssign) override;
52 DeepCopy () const override;
55 AutoComplete (CommandInterpreter &interpreter,
57 int match_start_point,
58 int max_return_elements,
60 StringList &matches) override;
62 //---------------------------------------------------------------------
63 // Subclass specific functions
64 //---------------------------------------------------------------------
69 return m_current_entry;
72 const FormatEntity::Entry &
73 GetCurrentValue() const
75 return m_current_entry;
79 SetCurrentValue (const FormatEntity::Entry &value)
81 m_current_entry = value;
87 return m_default_entry;
90 const FormatEntity::Entry &
91 GetDefaultValue() const
93 return m_default_entry;
97 std::string m_current_format;
98 std::string m_default_format;
99 FormatEntity::Entry m_current_entry;
100 FormatEntity::Entry m_default_entry;
103 } // namespace lldb_private
105 #endif // liblldb_OptionValueFormatEntity_h_