LLDB
mainline
|
Class for matching type names. More...
#include <FormattersContainer.h>
Public Member Functions | |
TypeMatcher ()=delete | |
TypeMatcher (ConstString type_name) | |
Creates a matcher that accepts any type with exactly the given type name. More... | |
TypeMatcher (RegularExpression regex) | |
Creates a matcher that accepts any type matching the given regex. More... | |
bool | Matches (ConstString type_name) const |
True iff this matches the given type name. More... | |
ConstString | GetMatchString () const |
Returns the underlying match string for this TypeMatcher. More... | |
bool | CreatedBySameMatchString (TypeMatcher other) const |
Returns true if this TypeMatcher and the given one were most created by the same match string. More... | |
Static Private Member Functions | |
static ConstString | StripTypeName (ConstString type) |
Private Attributes | |
RegularExpression | m_type_name_regex |
ConstString | m_type_name |
bool | m_is_regex |
False if m_type_name_regex should be used for matching. More... | |
Class for matching type names.
Definition at line 41 of file FormattersContainer.h.
|
delete |
|
inline |
Creates a matcher that accepts any type with exactly the given type name.
Definition at line 73 of file FormattersContainer.h.
|
inline |
Creates a matcher that accepts any type matching the given regex.
Definition at line 76 of file FormattersContainer.h.
|
inline |
Returns true if this TypeMatcher and the given one were most created by the same match string.
The main purpose of this function is to find existing TypeMatcher instances by the user input that created them. This is necessary as LLDB allows referencing existing TypeMatchers in commands by the user input that originally created them: (lldb) type summary add –summary-string "A" -x TypeName (lldb) type summary delete TypeName
Definition at line 102 of file FormattersContainer.h.
References GetMatchString().
Referenced by CommandObjectTypeFormatterList< TypeFormatImpl >::DoExecute().
|
inline |
Returns the underlying match string for this TypeMatcher.
Definition at line 88 of file FormattersContainer.h.
References lldb_private::RegularExpression::GetText(), m_is_regex, m_type_name, m_type_name_regex, and StripTypeName().
Referenced by lldb_private::FormattersContainer< TypeSummaryImpl >::AutoComplete(), CreatedBySameMatchString(), CommandObjectTypeFormatterList< TypeFormatImpl >::DoExecute(), and lldb_private::FormattersContainer< TypeSummaryImpl >::GetTypeNameSpecifierAtIndex().
|
inline |
True iff this matches the given type name.
Definition at line 80 of file FormattersContainer.h.
References lldb_private::RegularExpression::Execute(), lldb_private::ConstString::GetStringRef(), m_is_regex, m_type_name, m_type_name_regex, and StripTypeName().
|
inlinestaticprivate |
Definition at line 52 of file FormattersContainer.h.
References lldb_private::StringLexer::AdvanceIf(), lldb_private::ConstString::AsCString(), lldb_private::StringLexer::GetUnlexed(), lldb_private::ConstString::IsEmpty(), lldb_private::StringLexer::NextIf(), and string().
Referenced by GetMatchString(), and Matches().
|
private |
False if m_type_name_regex should be used for matching.
False if this is just matching by comparing with m_type_name string.
Definition at line 46 of file FormattersContainer.h.
Referenced by GetMatchString(), and Matches().
|
private |
Definition at line 43 of file FormattersContainer.h.
Referenced by GetMatchString(), and Matches().
|
private |
Definition at line 42 of file FormattersContainer.h.
Referenced by GetMatchString(), and Matches().