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 ();
40 ShouldPrintAsOneLiner (ValueObject& valobj);
42 static lldb::TypeFormatImplSP
43 GetFormat (ValueObject& valobj,
44 lldb::DynamicValueType use_dynamic);
46 static lldb::TypeFormatImplSP
47 GetFormatForType (lldb::TypeNameSpecifierImplSP type_sp);
49 static lldb::TypeSummaryImplSP
50 GetSummaryFormat (ValueObject& valobj,
51 lldb::DynamicValueType use_dynamic);
53 static lldb::TypeSummaryImplSP
54 GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp);
56 #ifndef LLDB_DISABLE_PYTHON
57 static lldb::SyntheticChildrenSP
58 GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp);
61 static lldb::TypeFilterImplSP
62 GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp);
64 #ifndef LLDB_DISABLE_PYTHON
65 static lldb::ScriptedSyntheticChildrenSP
66 GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
69 #ifndef LLDB_DISABLE_PYTHON
70 static lldb::SyntheticChildrenSP
71 GetSyntheticChildren(ValueObject& valobj,
72 lldb::DynamicValueType use_dynamic);
75 static lldb::TypeValidatorImplSP
76 GetValidator (ValueObject& valobj,
77 lldb::DynamicValueType use_dynamic);
79 static lldb::TypeValidatorImplSP
80 GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp);
83 AnyMatches(ConstString type_name,
84 TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
85 bool only_enabled = true,
86 const char** matching_category = NULL,
87 TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
89 class NamedSummaryFormats
93 GetSummaryFormat (const ConstString &type, lldb::TypeSummaryImplSP &entry);
96 Add (const ConstString &type, const lldb::TypeSummaryImplSP &entry);
99 Delete (const ConstString &type);
105 LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton);
116 GetCategory (const ConstString &category,
117 lldb::TypeCategoryImplSP &entry,
118 bool allow_create = true);
121 Add (const ConstString &category);
124 Delete (const ConstString &category);
130 Clear (const ConstString &category);
133 Enable (const ConstString& category,
134 TypeCategoryMap::Position = TypeCategoryMap::Default);
137 Disable (const ConstString& category);
140 Enable (const lldb::TypeCategoryImplSP& category,
141 TypeCategoryMap::Position = TypeCategoryMap::Default);
144 Disable (const lldb::TypeCategoryImplSP& category);
153 LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton);
158 static lldb::TypeCategoryImplSP
159 GetCategoryAtIndex (size_t);
164 } // namespace lldb_private
166 #endif // lldb_DataVisualization_h_