1 //===-- OptionValueFormat.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_OptionValueFormat_h_
11 #define liblldb_OptionValueFormat_h_
15 // Other libraries and framework includes
17 #include "lldb/Interpreter/OptionValue.h"
19 namespace lldb_private {
21 class OptionValueFormat : public OptionValue
24 OptionValueFormat (lldb::Format value) :
26 m_current_value (value),
27 m_default_value (value)
31 OptionValueFormat (lldb::Format current_value,
32 lldb::Format default_value) :
34 m_current_value (current_value),
35 m_default_value (default_value)
44 //---------------------------------------------------------------------
45 // Virtual subclass pure virtual overrides
46 //---------------------------------------------------------------------
48 virtual OptionValue::Type
55 DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask);
58 SetValueFromCString (const char *value,
59 VarSetOperationType op = eVarSetOperationAssign);
64 m_current_value = m_default_value;
65 m_value_was_set = false;
69 virtual lldb::OptionValueSP
72 //---------------------------------------------------------------------
73 // Subclass specific functions
74 //---------------------------------------------------------------------
77 GetCurrentValue() const
79 return m_current_value;
83 GetDefaultValue() const
85 return m_default_value;
89 SetCurrentValue (lldb::Format value)
91 m_current_value = value;
95 SetDefaultValue (lldb::Format value)
97 m_default_value = value;
101 lldb::Format m_current_value;
102 lldb::Format m_default_value;
105 } // namespace lldb_private
107 #endif // liblldb_OptionValueFormat_h_