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);
28 ~OptionValueFormatEntity()
32 //---------------------------------------------------------------------
33 // Virtual subclass pure virtual overrides
34 //---------------------------------------------------------------------
37 GetType () const override
39 return eTypeFormatEntity;
43 DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override;
46 SetValueFromString (llvm::StringRef value,
47 VarSetOperationType op = eVarSetOperationAssign) override;
53 DeepCopy () const override;
56 AutoComplete (CommandInterpreter &interpreter,
58 int match_start_point,
59 int max_return_elements,
61 StringList &matches) override;
63 //---------------------------------------------------------------------
64 // Subclass specific functions
65 //---------------------------------------------------------------------
70 return m_current_entry;
73 const FormatEntity::Entry &
74 GetCurrentValue() const
76 return m_current_entry;
80 SetCurrentValue (const FormatEntity::Entry &value)
82 m_current_entry = value;
88 return m_default_entry;
91 const FormatEntity::Entry &
92 GetDefaultValue() const
94 return m_default_entry;
99 std::string m_current_format;
100 std::string m_default_format;
101 FormatEntity::Entry m_current_entry;
102 FormatEntity::Entry m_default_entry;
105 } // namespace lldb_private
107 #endif // liblldb_OptionValueFormatEntity_h_