1 //===-- OptionValueDictionary.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_OptionValueDictionary_h_
11 #define liblldb_OptionValueDictionary_h_
17 // Other libraries and framework includes
19 #include "lldb/Interpreter/OptionValue.h"
21 namespace lldb_private {
23 class OptionValueDictionary : public OptionValue
26 OptionValueDictionary (uint32_t type_mask = UINT32_MAX, bool raw_value_dump = true) :
28 m_type_mask (type_mask),
30 m_raw_value_dump (raw_value_dump)
35 ~OptionValueDictionary()
39 //---------------------------------------------------------------------
40 // Virtual subclass pure virtual overrides
41 //---------------------------------------------------------------------
43 virtual OptionValue::Type
46 return eTypeDictionary;
50 DumpValue (const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask);
53 SetValueFromCString (const char *value,
54 VarSetOperationType op = eVarSetOperationAssign);
60 m_value_was_set = false;
64 virtual lldb::OptionValueSP
68 IsAggregateValue () const
76 return ConvertTypeMaskToType (m_type_mask) != eTypeInvalid;
79 //---------------------------------------------------------------------
80 // Subclass specific functions
81 //---------------------------------------------------------------------
86 return m_values.size();
90 GetValueForKey (const ConstString &key) const;
92 virtual lldb::OptionValueSP
93 GetSubValue (const ExecutionContext *exe_ctx,
99 SetSubValue (const ExecutionContext *exe_ctx,
100 VarSetOperationType op,
104 //---------------------------------------------------------------------
105 // String value getters and setters
106 //---------------------------------------------------------------------
108 GetStringValueForKey (const ConstString &key);
111 SetStringValueForKey (const ConstString &key,
113 bool can_replace = true);
117 SetValueForKey (const ConstString &key,
118 const lldb::OptionValueSP &value_sp,
119 bool can_replace = true);
122 DeleteValueForKey (const ConstString &key);
125 GetArgs (Args &args) const;
128 SetArgs (const Args &args, VarSetOperationType op);
131 typedef std::map<ConstString, lldb::OptionValueSP> collection;
132 uint32_t m_type_mask;
134 bool m_raw_value_dump;
137 } // namespace lldb_private
139 #endif // liblldb_OptionValueDictionary_h_