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);
76 AnyMatches(ConstString type_name,
77 TypeCategoryImpl::FormatCategoryItems items = TypeCategoryImpl::ALL_ITEM_TYPES,
78 bool only_enabled = true,
79 const char** matching_category = NULL,
80 TypeCategoryImpl::FormatCategoryItems* matching_type = NULL);
82 class NamedSummaryFormats
86 GetSummaryFormat (const ConstString &type, lldb::TypeSummaryImplSP &entry);
89 Add (const ConstString &type, const lldb::TypeSummaryImplSP &entry);
92 Delete (const ConstString &type);
98 LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton);
109 GetCategory (const ConstString &category,
110 lldb::TypeCategoryImplSP &entry,
111 bool allow_create = true);
114 Add (const ConstString &category);
117 Delete (const ConstString &category);
123 Clear (const ConstString &category);
126 Enable (const ConstString& category,
127 TypeCategoryMap::Position = TypeCategoryMap::Default);
130 Disable (const ConstString& category);
133 Enable (const lldb::TypeCategoryImplSP& category,
134 TypeCategoryMap::Position = TypeCategoryMap::Default);
137 Disable (const lldb::TypeCategoryImplSP& category);
140 LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton);
145 static lldb::TypeCategoryImplSP
146 GetCategoryAtIndex (size_t);
151 } // namespace lldb_private
153 #endif // lldb_DataVisualization_h_