LLDB mainline
|
#include <TypeCategory.h>
Public Types | |
using | Subcontainer = FormattersContainer< FormatterImpl > |
using | SubcontainerSP = std::shared_ptr< Subcontainer > |
using | ForEachCallback = typename Subcontainer::ForEachCallback |
using | MapValueType = typename Subcontainer::ValueSP |
Public Member Functions | |
TieredFormatterContainer (IFormatChangeListener *change_listener) | |
void | Clear () |
Clears all subcontainers. | |
void | Add (lldb::TypeNameSpecifierImplSP type_sp, std::shared_ptr< FormatterImpl > format_sp) |
Adds a formatter to the right subcontainer depending on the matching type specified by type_sp . | |
bool | Delete (lldb::TypeNameSpecifierImplSP type_sp) |
Deletes the formatter specified by type_sp . | |
bool | Delete (ConstString name) |
Deletes all formatters registered with the string name , in all subcontainers. | |
uint32_t | GetCount () |
Returns the total count of elements across all subcontainers. | |
MapValueType | GetAtIndex (size_t index) |
Returns the formatter at index , simulating a flattened view of all subcontainers in priority order. | |
bool | Get (const FormattersMatchVector &candidates, std::shared_ptr< FormatterImpl > &entry) |
Looks for a matching candidate across all priority tiers, in priority order. | |
bool | AnyMatches (const FormattersMatchCandidate &candidate) |
MapValueType | GetForTypeNameSpecifier (lldb::TypeNameSpecifierImplSP type_specifier_sp) |
Returns a formatter that is an exact match for type_specifier_sp . | |
lldb::TypeNameSpecifierImplSP | GetTypeNameSpecifierAtIndex (size_t index) |
Returns the type name specifier at index , simulating a flattened view of all subcontainers in priority order. | |
void | ForEach (std::function< bool(const TypeMatcher &, const std::shared_ptr< FormatterImpl > &)> callback) |
Iterates through tiers in order, running callback on each element of each tier. | |
void | AutoComplete (CompletionRequest &request) |
Private Attributes | |
std::array< std::shared_ptr< Subcontainer >, lldb::eLastFormatterMatchType+1 > | m_subcontainers |
Definition at line 36 of file TypeCategory.h.
using lldb_private::TieredFormatterContainer< FormatterImpl >::ForEachCallback = typename Subcontainer::ForEachCallback |
Definition at line 40 of file TypeCategory.h.
using lldb_private::TieredFormatterContainer< FormatterImpl >::MapValueType = typename Subcontainer::ValueSP |
Definition at line 41 of file TypeCategory.h.
using lldb_private::TieredFormatterContainer< FormatterImpl >::Subcontainer = FormattersContainer<FormatterImpl> |
Definition at line 38 of file TypeCategory.h.
using lldb_private::TieredFormatterContainer< FormatterImpl >::SubcontainerSP = std::shared_ptr<Subcontainer> |
Definition at line 39 of file TypeCategory.h.
|
inline |
Definition at line 43 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
|
inline |
Adds a formatter to the right subcontainer depending on the matching type specified by type_sp
.
Definition at line 56 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::AddTypeFilter(), lldb_private::TypeCategoryImpl::AddTypeFormat(), lldb_private::TypeCategoryImpl::AddTypeSummary(), and lldb_private::TypeCategoryImpl::AddTypeSynthetic().
|
inline |
Definition at line 108 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::AnyMatches().
|
inline |
Definition at line 157 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::AutoComplete().
|
inline |
Clears all subcontainers.
Definition at line 49 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::Clear().
|
inline |
Deletes all formatters registered with the string name
, in all subcontainers.
Definition at line 70 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
|
inline |
Deletes the formatter specified by type_sp
.
Definition at line 63 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::Delete(), lldb_private::TypeCategoryImpl::DeleteTypeFilter(), lldb_private::TypeCategoryImpl::DeleteTypeFormat(), lldb_private::TypeCategoryImpl::DeleteTypeSummary(), and lldb_private::TypeCategoryImpl::DeleteTypeSynthetic().
|
inline |
Iterates through tiers in order, running callback
on each element of each tier.
Definition at line 149 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::ForEach().
|
inline |
Looks for a matching candidate across all priority tiers, in priority order.
If a match is found, returns true
and puts the matching entry in entry
.
Definition at line 99 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::Get().
|
inline |
Returns the formatter at index
, simulating a flattened view of all subcontainers in priority order.
Definition at line 87 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::GetCount(), and lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::GetFilterAtIndex(), lldb_private::TypeCategoryImpl::GetFormatAtIndex(), lldb_private::TypeCategoryImpl::GetSummaryAtIndex(), and lldb_private::TypeCategoryImpl::GetSyntheticAtIndex().
|
inline |
Returns the total count of elements across all subcontainers.
Definition at line 78 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TieredFormatterContainer< FormatterImpl >::GetAtIndex(), lldb_private::TypeCategoryImpl::GetCount(), lldb_private::TypeCategoryImpl::GetNumFilters(), lldb_private::TypeCategoryImpl::GetNumFormats(), lldb_private::TypeCategoryImpl::GetNumSummaries(), lldb_private::TypeCategoryImpl::GetNumSynthetics(), and lldb_private::TieredFormatterContainer< FormatterImpl >::GetTypeNameSpecifierAtIndex().
|
inline |
Returns a formatter that is an exact match for type_specifier_sp
.
It looks for a formatter with the same matching type that was created from the same string. This is useful so we can refer to a formatter using the same string used to register it.
For example, type_specifier_sp
can be something like {"std::vector<.*>", eFormatterMatchRegex}, and we'd look for a regex matcher with that exact regex string, NOT try to match that string using regex.
Definition at line 127 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::GetFilterForType(), lldb_private::TypeCategoryImpl::GetFormatForType(), lldb_private::TypeCategoryImpl::GetSummaryForType(), and lldb_private::TypeCategoryImpl::GetSyntheticForType().
|
inline |
Returns the type name specifier at index
, simulating a flattened view of all subcontainers in priority order.
Definition at line 138 of file TypeCategory.h.
References lldb_private::TieredFormatterContainer< FormatterImpl >::GetCount(), and lldb_private::TieredFormatterContainer< FormatterImpl >::m_subcontainers.
Referenced by lldb_private::TypeCategoryImpl::GetTypeNameSpecifierForFilterAtIndex(), lldb_private::TypeCategoryImpl::GetTypeNameSpecifierForFormatAtIndex(), lldb_private::TypeCategoryImpl::GetTypeNameSpecifierForSummaryAtIndex(), and lldb_private::TypeCategoryImpl::GetTypeNameSpecifierForSyntheticAtIndex().
|
private |
Definition at line 164 of file TypeCategory.h.
Referenced by lldb_private::TieredFormatterContainer< FormatterImpl >::Add(), lldb_private::TieredFormatterContainer< FormatterImpl >::AnyMatches(), lldb_private::TieredFormatterContainer< FormatterImpl >::AutoComplete(), lldb_private::TieredFormatterContainer< FormatterImpl >::Clear(), lldb_private::TieredFormatterContainer< FormatterImpl >::Delete(), lldb_private::TieredFormatterContainer< FormatterImpl >::ForEach(), lldb_private::TieredFormatterContainer< FormatterImpl >::Get(), lldb_private::TieredFormatterContainer< FormatterImpl >::GetAtIndex(), lldb_private::TieredFormatterContainer< FormatterImpl >::GetCount(), lldb_private::TieredFormatterContainer< FormatterImpl >::GetForTypeNameSpecifier(), lldb_private::TieredFormatterContainer< FormatterImpl >::GetTypeNameSpecifierAtIndex(), and lldb_private::TieredFormatterContainer< FormatterImpl >::TieredFormatterContainer().