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.
|
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.
|
inline |
Definition at line 108 of file TypeCategory.h.
|
inline |
Definition at line 157 of file TypeCategory.h.
|
inline |
Clears all subcontainers.
Definition at line 49 of file TypeCategory.h.
|
inline |
Deletes all formatters registered with the string name, in all subcontainers.
Definition at line 70 of file TypeCategory.h.
|
inline |
Deletes the formatter specified by type_sp.
Definition at line 63 of file TypeCategory.h.
|
inline |
Iterates through tiers in order, running callback on each element of each tier.
Definition at line 149 of file TypeCategory.h.
|
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.
|
inline |
Returns the formatter at index, simulating a flattened view of all subcontainers in priority order.
Definition at line 87 of file TypeCategory.h.
|
inline |
Returns the total count of elements across all subcontainers.
Definition at line 78 of file TypeCategory.h.
Referenced by lldb_private::TieredFormatterContainer< TypeFormatImpl >::GetAtIndex(), and lldb_private::TieredFormatterContainer< TypeFormatImpl >::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.
|
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.
|
private |
Definition at line 164 of file TypeCategory.h.