1 //===-- DataVisualization.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 lldb_DataVisualization_h_
11 #define lldb_DataVisualization_h_
16 // Other libraries and framework includes
18 #include "lldb/Core/ConstString.h"
19 #include "lldb/DataFormatters/FormatClasses.h"
20 #include "lldb/DataFormatters/FormatManager.h"
22 namespace lldb_private {
24 // this class is the high-level front-end of LLDB Data Visualization
25 // code in FormatManager.h/cpp is the low-level implementation of this feature
26 // clients should refer to this class as the entry-point into the data formatters
27 // unless they have a good reason to bypass this and go to the backend
28 class DataVisualization
32 // use this call to force the FM to consider itself updated even when there is no apparent reason for that
37 GetCurrentRevision ();
42 static lldb::TypeFormatImplSP
43 GetFormat (ValueObject& valobj, lldb::DynamicValueType use_dynamic);
45 static lldb::TypeFormatImplSP
46 GetFormat (const ConstString &type);
49 Add (const ConstString &type, const lldb::TypeFormatImplSP &entry);
52 Delete (const ConstString &type);
58 LoopThrough (TypeFormatImpl::ValueCallback callback, void* callback_baton);
63 static lldb::TypeNameSpecifierImplSP
64 GetTypeNameSpecifierForFormatAtIndex (size_t);
66 static lldb::TypeFormatImplSP
67 GetFormatAtIndex (size_t);
70 static lldb::TypeSummaryImplSP
71 GetSummaryFormat(ValueObject& valobj,
72 lldb::DynamicValueType use_dynamic);
74 static lldb::TypeSummaryImplSP
75 GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp);
77 #ifndef LLDB_DISABLE_PYTHON
78 static lldb::SyntheticChildrenSP
79 GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
82 static lldb::TypeFilterImplSP
83 GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
85 #ifndef LLDB_DISABLE_PYTHON
86 static lldb::ScriptedSyntheticChildrenSP
87 GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
90 #ifndef LLDB_DISABLE_PYTHON
91 static lldb::SyntheticChildrenSP
92 GetSyntheticChildren(ValueObject& valobj,
93 lldb::DynamicValueType use_dynamic);
97 AnyMatches(ConstString type_name,
98 TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
99 bool only_enabled = true,
100 const char** matching_category = NULL,
101 TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
103 class NamedSummaryFormats
107 GetSummaryFormat (const ConstString &type, lldb::TypeSummaryImplSP &entry);
110 Add (const ConstString &type, const lldb::TypeSummaryImplSP &entry);
113 Delete (const ConstString &type);
119 LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton);
130 GetCategory (const ConstString &category,
131 lldb::TypeCategoryImplSP &entry,
132 bool allow_create = true);
135 Add (const ConstString &category);
138 Delete (const ConstString &category);
144 Clear (const ConstString &category);
147 Enable (const ConstString& category,
148 TypeCategoryMap::Position = TypeCategoryMap::Default);
151 Disable (const ConstString& category);
154 Enable (const lldb::TypeCategoryImplSP& category,
155 TypeCategoryMap::Position = TypeCategoryMap::Default);
158 Disable (const lldb::TypeCategoryImplSP& category);
161 LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton);
166 static lldb::TypeCategoryImplSP
167 GetCategoryAtIndex (size_t);
172 } // namespace lldb_private
174 #endif // lldb_DataVisualization_h_