LLDB mainline
DataVisualization.h
Go to the documentation of this file.
1//===-- DataVisualization.h -------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_DATAFORMATTERS_DATAVISUALIZATION_H
10#define LLDB_DATAFORMATTERS_DATAVISUALIZATION_H
11
15
16namespace lldb_private {
17
18// this class is the high-level front-end of LLDB Data Visualization code in
19// FormatManager.h/cpp is the low-level implementation of this feature clients
20// should refer to this class as the entry-point into the data formatters
21// unless they have a good reason to bypass this and go to the backend
23public:
24 // use this call to force the FM to consider itself updated even when there
25 // is no apparent reason for that
26 static void ForceUpdate();
27
28 static uint32_t GetCurrentRevision();
29
30 static bool ShouldPrintAsOneLiner(ValueObject &valobj);
31
33 lldb::DynamicValueType use_dynamic);
34
37
40
43
46
49
52
53 static bool
54 AnyMatches(const FormattersMatchCandidate &candidate_type,
57 bool only_enabled = true, const char **matching_category = nullptr,
58 TypeCategoryImpl::FormatCategoryItems *matching_type = nullptr);
59
61 public:
62 static bool GetSummaryFormat(ConstString type,
64
65 static void Add(ConstString type,
66 const lldb::TypeSummaryImplSP &entry);
67
68 static bool Delete(ConstString type);
69
70 static void Clear();
71
72 static void ForEach(std::function<bool(const TypeMatcher &,
74 callback);
75
76 static uint32_t GetCount();
77 };
78
79 class Categories {
80 public:
81 static bool GetCategory(ConstString category,
83 bool allow_create = true);
84
85 static bool GetCategory(lldb::LanguageType language,
87
88 static void Add(ConstString category);
89
90 static bool Delete(ConstString category);
91
92 static void Clear();
93
94 static void Clear(ConstString category);
95
96 static void Enable(ConstString category,
98
99 static void Enable(lldb::LanguageType lang_type);
100
101 static void Disable(ConstString category);
102
103 static void Disable(lldb::LanguageType lang_type);
104
105 static void Enable(const lldb::TypeCategoryImplSP &category,
107
108 static void Disable(const lldb::TypeCategoryImplSP &category);
109
110 static void EnableStar();
111
112 static void DisableStar();
113
114 static void ForEach(TypeCategoryMap::ForEachCallback callback);
115
116 static uint32_t GetCount();
117
119 };
120};
121
122} // namespace lldb_private
123
124#endif // LLDB_DATAFORMATTERS_DATAVISUALIZATION_H
A uniqued constant string class.
Definition: ConstString.h:40
static bool Delete(ConstString category)
static void Add(ConstString category)
static void Disable(ConstString category)
static lldb::TypeCategoryImplSP GetCategoryAtIndex(size_t)
static void ForEach(TypeCategoryMap::ForEachCallback callback)
static void Enable(ConstString category, TypeCategoryMap::Position=TypeCategoryMap::Default)
static bool GetCategory(ConstString category, lldb::TypeCategoryImplSP &entry, bool allow_create=true)
static void Add(ConstString type, const lldb::TypeSummaryImplSP &entry)
static bool GetSummaryFormat(ConstString type, lldb::TypeSummaryImplSP &entry)
static void ForEach(std::function< bool(const TypeMatcher &, const lldb::TypeSummaryImplSP &)> callback)
static lldb::ScriptedSyntheticChildrenSP GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
static lldb::TypeFilterImplSP GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
static bool ShouldPrintAsOneLiner(ValueObject &valobj)
static lldb::TypeSummaryImplSP GetSummaryFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static lldb::TypeFormatImplSP GetFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static lldb::TypeFormatImplSP GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp)
static lldb::SyntheticChildrenSP GetSyntheticChildren(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static bool AnyMatches(const FormattersMatchCandidate &candidate_type, TypeCategoryImpl::FormatCategoryItems items=TypeCategoryImpl::ALL_ITEM_TYPES, bool only_enabled=true, const char **matching_category=nullptr, TypeCategoryImpl::FormatCategoryItems *matching_type=nullptr)
static lldb::TypeSummaryImplSP GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
static const uint16_t ALL_ITEM_TYPES
Definition: TypeCategory.h:176
std::function< bool(const lldb::TypeCategoryImplSP &)> ForEachCallback
static const Position Default
Class for matching type names.
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
Definition: lldb-forward.h:463
std::shared_ptr< lldb_private::TypeFormatImpl > TypeFormatImplSP
Definition: lldb-forward.h:460
std::shared_ptr< lldb_private::TypeNameSpecifierImpl > TypeNameSpecifierImplSP
Definition: lldb-forward.h:462
LanguageType
Programming language type.
std::shared_ptr< lldb_private::SyntheticChildren > SyntheticChildrenSP
Definition: lldb-forward.h:433
std::shared_ptr< lldb_private::TypeCategoryImpl > TypeCategoryImplSP
Definition: lldb-forward.h:451
std::shared_ptr< lldb_private::ScriptedSyntheticChildren > ScriptedSyntheticChildrenSP
Definition: lldb-forward.h:466
std::shared_ptr< lldb_private::TypeFilterImpl > TypeFilterImplSP
Definition: lldb-forward.h:456