1 //===-- Property.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_Property_h_
11 #define liblldb_Property_h_
17 // Other libraries and framework includes
19 #include "lldb/lldb-defines.h"
20 #include "lldb/Core/ConstString.h"
21 #include "lldb/Core/Flags.h"
22 #include "lldb/Interpreter/OptionValue.h"
24 namespace lldb_private {
26 // A structure that can be used to create a global table for all properties.
27 // Property class instances can be constructed using one of these.
28 struct PropertyDefinition
31 OptionValue::Type type;
32 bool global; // false == this setting is a global setting by default
33 uintptr_t default_uint_value;
34 const char *default_cstr_value;
35 OptionEnumValueElement *enum_values;
36 const char *description;
42 Property (const PropertyDefinition &definition);
44 Property (const ConstString &name,
45 const ConstString &desc,
47 const lldb::OptionValueSP &value_sp);
56 GetDescription () const
58 return m_description.GetCString();
61 const lldb::OptionValueSP &
68 SetOptionValue (const lldb::OptionValueSP &value_sp)
70 m_value_sp = value_sp;
77 return (bool)m_value_sp;
87 Dump (const ExecutionContext *exe_ctx,
89 uint32_t dump_mask) const;
92 DumpQualifiedName(Stream &strm) const;
95 DumpDescription (CommandInterpreter &interpreter,
97 uint32_t output_width,
98 bool display_qualified_name) const;
101 SetValueChangedCallback (OptionValueChangedCallback callback, void *baton);
105 ConstString m_description;
106 lldb::OptionValueSP m_value_sp;
110 } // namespace lldb_private
112 #endif // liblldb_Property_h_