9#ifndef LLDB_DATAFORMATTERS_TYPECATEGORY_H
10#define LLDB_DATAFORMATTERS_TYPECATEGORY_H
13#include <initializer_list>
45 sc = std::make_shared<Subcontainer>(change_listener);
57 std::shared_ptr<FormatterImpl> format_sp) {
73 success = sc->Delete(name) || success;
81 result += sc->GetCount();
90 return sc->GetAtIndex(index);
91 index -= sc->GetCount();
100 std::shared_ptr<FormatterImpl> &entry) {
102 if (sc->Get(candidates, entry))
109 std::shared_ptr<FormatterImpl> entry;
129 if (type_specifier_sp) {
131 ConstString(type_specifier_sp->GetName()), retval);
141 return sc->GetTypeNameSpecifierAtIndex(index);
142 index -= sc->GetCount();
150 const std::shared_ptr<FormatterImpl> &)>
153 sc->ForEach(callback);
159 sc->AutoComplete(request);
188 std::function<bool(
const TypeMatcher &,
const std::shared_ptr<T> &)>
230 std::make_shared<lldb_private::TypeNameSpecifierImpl>(name, match_type),
242 std::make_shared<lldb_private::TypeNameSpecifierImpl>(name, match_type),
254 std::make_shared<lldb_private::TypeNameSpecifierImpl>(name, match_type),
267 std::make_shared<lldb_private::TypeNameSpecifierImpl>(name, match_type),
351 bool only_enabled =
true,
352 const char **matching_category =
nullptr,
377 void Enable(
bool value, uint32_t position);
"lldb/Utility/ArgCompletionRequest.h"
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
void AddTypeFormat(lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeFormatImplSP format_sp)
uint32_t GetCount(FormatCategoryItems items=ALL_ITEM_TYPES)
uint32_t GetLastEnabledPosition()
bool DeleteTypeFormat(lldb::TypeNameSpecifierImplSP type_sp)
SummaryContainer::MapValueType GetSummaryAtIndex(size_t index)
uint16_t FormatCategoryItems
TieredFormatterContainer< TypeFilterImpl > FilterContainer
void AddTypeSummary(lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeSummaryImplSP summary_sp)
static const uint16_t ALL_ITEM_TYPES
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForSyntheticAtIndex(size_t index)
void AddTypeSynthetic(llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::SyntheticChildrenSP synth_sp)
FormatContainer m_format_cont
SummaryContainer::MapValueType GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
FilterContainer::MapValueType GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
TieredFormatterContainer< TypeFormatImpl > FormatContainer
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForSummaryAtIndex(size_t index)
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForFormatAtIndex(size_t index)
bool Get(lldb::LanguageType lang, const FormattersMatchVector &candidates, lldb::TypeFormatImplSP &entry)
void AddTypeSummary(llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeSummaryImplSP summary_sp)
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForFilterAtIndex(size_t index)
void ForEach(ForEachCallback< TypeSummaryImpl > callback)
void AddTypeFormat(llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeFormatImplSP format_sp)
void ForEach(ForEachCallback< TypeFilterImpl > callback)
SynthContainer m_synth_cont
uint32_t GetEnabledPosition()
FormatContainer::MapValueType GetFormatAtIndex(size_t index)
void AddTypeFilter(lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeFilterImplSP filter_sp)
IFormatChangeListener * m_change_listener
uint32_t m_enabled_position
std::recursive_mutex m_mutex
void AddLanguage(lldb::LanguageType lang)
lldb::LanguageType GetLanguageAtIndex(size_t idx)
void AddTypeFilter(llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeFilterImplSP filter_sp)
bool DeleteTypeSynthetic(lldb::TypeNameSpecifierImplSP type_sp)
bool DeleteTypeSummary(lldb::TypeNameSpecifierImplSP type_sp)
TieredFormatterContainer< TypeSummaryImpl > SummaryContainer
bool AnyMatches(const FormattersMatchCandidate &candidate_type, FormatCategoryItems items=ALL_ITEM_TYPES, bool only_enabled=true, const char **matching_category=nullptr, FormatCategoryItems *matching_type=nullptr)
void ForEach(ForEachCallback< TypeFormatImpl > callback)
uint32_t GetNumSummaries()
bool Delete(ConstString name, FormatCategoryItems items=ALL_ITEM_TYPES)
SummaryContainer m_summary_cont
void AutoComplete(CompletionRequest &request, FormatCategoryItems items)
void AddTypeSynthetic(lldb::TypeNameSpecifierImplSP type_sp, lldb::SyntheticChildrenSP synth_sp)
FilterContainer::MapValueType GetFilterAtIndex(size_t index)
uint32_t GetNumSynthetics()
SynthContainer::MapValueType GetSyntheticAtIndex(size_t index)
bool IsApplicable(lldb::LanguageType lang)
void SetEnabledPosition(uint32_t p)
bool DeleteTypeFilter(lldb::TypeNameSpecifierImplSP type_sp)
FilterContainer m_filter_cont
FormatContainer::MapValueType GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp)
std::vector< lldb::LanguageType > m_languages
std::shared_ptr< TypeCategoryImpl > SharedPointer
void Clear(FormatCategoryItems items=ALL_ITEM_TYPES)
std::string GetDescription()
SynthContainer::MapValueType GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
void ForEach(ForEachCallback< SyntheticChildren > callback)
void Enable(bool value, uint32_t position)
TieredFormatterContainer< SyntheticChildren > SynthContainer
Class for matching type names.
A class that represents a running process on the host machine.
std::vector< FormattersMatchCandidate > FormattersMatchVector
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
std::shared_ptr< lldb_private::TypeFormatImpl > TypeFormatImplSP
std::shared_ptr< lldb_private::TypeNameSpecifierImpl > TypeNameSpecifierImplSP
LanguageType
Programming language type.
FormatterMatchType
Type of match to be performed when looking for a formatter for a data type.
@ eLastFormatterMatchType
std::shared_ptr< lldb_private::SyntheticChildren > SyntheticChildrenSP
std::shared_ptr< lldb_private::TypeFilterImpl > TypeFilterImplSP
ForEachCallback(Callable c)
std::function< bool(const TypeMatcher &, const std::shared_ptr< T > &)> callback