LLDB mainline
lldb_private::TypeCategoryImpl Class Reference

#include <TypeCategory.h>

Classes

struct  ForEachCallback

Public Types

typedef uint16_t FormatCategoryItems
typedef std::shared_ptr< TypeCategoryImplSharedPointer

Public Member Functions

 TypeCategoryImpl (IFormatChangeListener *clist, ConstString name)
void ForEach (ForEachCallback< TypeFormatImpl > callback)
void ForEach (ForEachCallback< TypeSummaryImpl > callback)
void ForEach (ForEachCallback< TypeFilterImpl > callback)
void ForEach (ForEachCallback< SyntheticChildren > callback)
FormatContainer::MapValueType GetFormatForType (lldb::TypeNameSpecifierImplSP type_sp)
SummaryContainer::MapValueType GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp)
FilterContainer::MapValueType GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp)
SynthContainer::MapValueType GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
void AddTypeFormat (lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeFormatImplSP format_sp)
void AddTypeFormat (llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeFormatImplSP format_sp)
void AddTypeSummary (lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeSummaryImplSP summary_sp)
void AddTypeSummary (llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeSummaryImplSP summary_sp)
void AddTypeFilter (lldb::TypeNameSpecifierImplSP type_sp, lldb::TypeFilterImplSP filter_sp)
void AddTypeFilter (llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::TypeFilterImplSP filter_sp)
void AddTypeSynthetic (lldb::TypeNameSpecifierImplSP type_sp, lldb::SyntheticChildrenSP synth_sp)
void AddTypeSynthetic (llvm::StringRef name, lldb::FormatterMatchType match_type, lldb::SyntheticChildrenSP synth_sp)
bool DeleteTypeFormat (lldb::TypeNameSpecifierImplSP type_sp)
bool DeleteTypeSummary (lldb::TypeNameSpecifierImplSP type_sp)
bool DeleteTypeFilter (lldb::TypeNameSpecifierImplSP type_sp)
bool DeleteTypeSynthetic (lldb::TypeNameSpecifierImplSP type_sp)
uint32_t GetNumFormats ()
uint32_t GetNumSummaries ()
uint32_t GetNumFilters ()
uint32_t GetNumSynthetics ()
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForFormatAtIndex (size_t index)
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForSummaryAtIndex (size_t index)
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForFilterAtIndex (size_t index)
lldb::TypeNameSpecifierImplSP GetTypeNameSpecifierForSyntheticAtIndex (size_t index)
FormatContainer::MapValueType GetFormatAtIndex (size_t index)
SummaryContainer::MapValueType GetSummaryAtIndex (size_t index)
FilterContainer::MapValueType GetFilterAtIndex (size_t index)
SynthContainer::MapValueType GetSyntheticAtIndex (size_t index)
bool IsEnabled () const
uint32_t GetEnabledPosition ()
bool Get (lldb::LanguageType lang, const FormattersMatchVector &candidates, lldb::TypeFormatImplSP &entry)
bool Get (lldb::LanguageType lang, const FormattersMatchVector &candidates, lldb::TypeSummaryImplSP &entry)
bool Get (lldb::LanguageType lang, const FormattersMatchVector &candidates, lldb::SyntheticChildrenSP &entry)
void Clear (FormatCategoryItems items=ALL_ITEM_TYPES)
bool Delete (ConstString name, FormatCategoryItems items=ALL_ITEM_TYPES)
uint32_t GetCount (FormatCategoryItems items=ALL_ITEM_TYPES)
const char * GetName ()
size_t GetNumLanguages ()
lldb::LanguageType GetLanguageAtIndex (size_t idx)
void AddLanguage (lldb::LanguageType lang)
std::string GetDescription ()
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 AutoComplete (CompletionRequest &request, FormatCategoryItems items)

Static Public Attributes

static const uint16_t ALL_ITEM_TYPES = UINT16_MAX

Private Types

typedef TieredFormatterContainer< TypeFormatImplFormatContainer
typedef TieredFormatterContainer< TypeSummaryImplSummaryContainer
typedef TieredFormatterContainer< TypeFilterImplFilterContainer
typedef TieredFormatterContainer< SyntheticChildrenSynthContainer

Private Member Functions

void Enable (bool value, uint32_t position)
void Disable ()
bool IsApplicable (lldb::LanguageType lang)
uint32_t GetLastEnabledPosition ()
void SetEnabledPosition (uint32_t p)

Private Attributes

FormatContainer m_format_cont
SummaryContainer m_summary_cont
FilterContainer m_filter_cont
SynthContainer m_synth_cont
bool m_enabled
IFormatChangeListenerm_change_listener
std::recursive_mutex m_mutex
ConstString m_name
std::vector< lldb::LanguageTypem_languages
uint32_t m_enabled_position = 0

Friends

class FormatManager
class LanguageCategory
class TypeCategoryMap
class FormattersContainer< TypeFormatImpl >
class FormattersContainer< TypeSummaryImpl >
class FormattersContainer< TypeFilterImpl >
class FormattersContainer< ScriptedSyntheticChildren >

Detailed Description

Definition at line 167 of file TypeCategory.h.

Member Typedef Documentation

◆ FilterContainer

◆ FormatCategoryItems

Definition at line 175 of file TypeCategory.h.

◆ FormatContainer

◆ SharedPointer

Definition at line 357 of file TypeCategory.h.

◆ SummaryContainer

◆ SynthContainer

Constructor & Destructor Documentation

◆ TypeCategoryImpl()

TypeCategoryImpl::TypeCategoryImpl ( IFormatChangeListener * clist,
ConstString name )

Member Function Documentation

◆ AddLanguage()

void TypeCategoryImpl::AddLanguage ( lldb::LanguageType lang)

Definition at line 81 of file TypeCategory.cpp.

References m_languages.

◆ AddTypeFilter() [1/2]

void lldb_private::TypeCategoryImpl::AddTypeFilter ( lldb::TypeNameSpecifierImplSP type_sp,
lldb::TypeFilterImplSP filter_sp )
inline

Definition at line 246 of file TypeCategory.h.

References m_filter_cont.

Referenced by AddTypeFilter().

◆ AddTypeFilter() [2/2]

void lldb_private::TypeCategoryImpl::AddTypeFilter ( llvm::StringRef name,
lldb::FormatterMatchType match_type,
lldb::TypeFilterImplSP filter_sp )
inline

Definition at line 251 of file TypeCategory.h.

References AddTypeFilter().

◆ AddTypeFormat() [1/2]

void lldb_private::TypeCategoryImpl::AddTypeFormat ( lldb::TypeNameSpecifierImplSP type_sp,
lldb::TypeFormatImplSP format_sp )
inline

Definition at line 222 of file TypeCategory.h.

References m_format_cont.

Referenced by AddTypeFormat().

◆ AddTypeFormat() [2/2]

void lldb_private::TypeCategoryImpl::AddTypeFormat ( llvm::StringRef name,
lldb::FormatterMatchType match_type,
lldb::TypeFormatImplSP format_sp )
inline

Definition at line 227 of file TypeCategory.h.

References AddTypeFormat().

◆ AddTypeSummary() [1/2]

void lldb_private::TypeCategoryImpl::AddTypeSummary ( lldb::TypeNameSpecifierImplSP type_sp,
lldb::TypeSummaryImplSP summary_sp )
inline

Definition at line 234 of file TypeCategory.h.

References m_summary_cont.

Referenced by AddTypeSummary().

◆ AddTypeSummary() [2/2]

void lldb_private::TypeCategoryImpl::AddTypeSummary ( llvm::StringRef name,
lldb::FormatterMatchType match_type,
lldb::TypeSummaryImplSP summary_sp )
inline

Definition at line 239 of file TypeCategory.h.

References AddTypeSummary().

◆ AddTypeSynthetic() [1/2]

void lldb_private::TypeCategoryImpl::AddTypeSynthetic ( lldb::TypeNameSpecifierImplSP type_sp,
lldb::SyntheticChildrenSP synth_sp )
inline

Definition at line 258 of file TypeCategory.h.

References m_synth_cont.

Referenced by AddTypeSynthetic().

◆ AddTypeSynthetic() [2/2]

void lldb_private::TypeCategoryImpl::AddTypeSynthetic ( llvm::StringRef name,
lldb::FormatterMatchType match_type,
lldb::SyntheticChildrenSP synth_sp )
inline

Definition at line 263 of file TypeCategory.h.

References AddTypeSynthetic().

◆ AnyMatches()

bool TypeCategoryImpl::AnyMatches ( const FormattersMatchCandidate & candidate_type,
FormatCategoryItems items = ALL_ITEM_TYPES,
bool only_enabled = true,
const char ** matching_category = nullptr,
FormatCategoryItems * matching_type = nullptr )

◆ AutoComplete()

◆ Clear()

◆ Delete()

◆ DeleteTypeFilter()

bool lldb_private::TypeCategoryImpl::DeleteTypeFilter ( lldb::TypeNameSpecifierImplSP type_sp)
inline

Definition at line 279 of file TypeCategory.h.

References m_filter_cont.

◆ DeleteTypeFormat()

bool lldb_private::TypeCategoryImpl::DeleteTypeFormat ( lldb::TypeNameSpecifierImplSP type_sp)
inline

Definition at line 271 of file TypeCategory.h.

References m_format_cont.

◆ DeleteTypeSummary()

bool lldb_private::TypeCategoryImpl::DeleteTypeSummary ( lldb::TypeNameSpecifierImplSP type_sp)
inline

Definition at line 275 of file TypeCategory.h.

References m_summary_cont.

◆ DeleteTypeSynthetic()

bool lldb_private::TypeCategoryImpl::DeleteTypeSynthetic ( lldb::TypeNameSpecifierImplSP type_sp)
inline

Definition at line 283 of file TypeCategory.h.

References m_synth_cont.

◆ Disable()

void lldb_private::TypeCategoryImpl::Disable ( )
inlineprivate

Definition at line 379 of file TypeCategory.h.

References Enable(), and UINT32_MAX.

◆ Enable()

void TypeCategoryImpl::Enable ( bool value,
uint32_t position )
private

Definition at line 309 of file TypeCategory.cpp.

References m_change_listener, m_enabled, m_enabled_position, and m_mutex.

Referenced by Disable().

◆ ForEach() [1/4]

void lldb_private::TypeCategoryImpl::ForEach ( ForEachCallback< SyntheticChildren > callback)
inline

◆ ForEach() [2/4]

void lldb_private::TypeCategoryImpl::ForEach ( ForEachCallback< TypeFilterImpl > callback)
inline

◆ ForEach() [3/4]

void lldb_private::TypeCategoryImpl::ForEach ( ForEachCallback< TypeFormatImpl > callback)
inline

◆ ForEach() [4/4]

void lldb_private::TypeCategoryImpl::ForEach ( ForEachCallback< TypeSummaryImpl > callback)
inline

◆ Get() [1/3]

bool lldb_private::TypeCategoryImpl::Get ( lldb::LanguageType lang,
const FormattersMatchVector & candidates,
lldb::SyntheticChildrenSP & entry )

References ALL_ITEM_TYPES.

◆ Get() [2/3]

bool TypeCategoryImpl::Get ( lldb::LanguageType lang,
const FormattersMatchVector & candidates,
lldb::TypeFormatImplSP & entry )

Definition at line 85 of file TypeCategory.cpp.

References IsApplicable(), IsEnabled(), and m_format_cont.

◆ Get() [3/3]

bool lldb_private::TypeCategoryImpl::Get ( lldb::LanguageType lang,
const FormattersMatchVector & candidates,
lldb::TypeSummaryImplSP & entry )

◆ GetCount()

◆ GetDescription()

◆ GetEnabledPosition()

uint32_t lldb_private::TypeCategoryImpl::GetEnabledPosition ( )
inline

Definition at line 317 of file TypeCategory.h.

References m_enabled, m_enabled_position, and UINT32_MAX.

◆ GetFilterAtIndex()

TypeCategoryImpl::FilterContainer::MapValueType TypeCategoryImpl::GetFilterAtIndex ( size_t index)

Definition at line 280 of file TypeCategory.cpp.

References m_filter_cont.

◆ GetFilterForType()

Definition at line 260 of file TypeCategory.cpp.

References m_filter_cont.

◆ GetFormatAtIndex()

TypeCategoryImpl::FormatContainer::MapValueType TypeCategoryImpl::GetFormatAtIndex ( size_t index)

Definition at line 270 of file TypeCategory.cpp.

References m_format_cont.

◆ GetFormatForType()

Definition at line 250 of file TypeCategory.cpp.

References m_format_cont.

◆ GetLanguageAtIndex()

lldb::LanguageType TypeCategoryImpl::GetLanguageAtIndex ( size_t idx)

Definition at line 75 of file TypeCategory.cpp.

References lldb::eLanguageTypeUnknown, and m_languages.

Referenced by GetDescription(), and IsApplicable().

◆ GetLastEnabledPosition()

uint32_t lldb_private::TypeCategoryImpl::GetLastEnabledPosition ( )
inlineprivate

Definition at line 383 of file TypeCategory.h.

References m_enabled_position.

◆ GetName()

const char * lldb_private::TypeCategoryImpl::GetName ( )
inline

Definition at line 339 of file TypeCategory.h.

References m_name.

Referenced by GetDescription().

◆ GetNumFilters()

uint32_t lldb_private::TypeCategoryImpl::GetNumFilters ( )
inline

Definition at line 291 of file TypeCategory.h.

References m_filter_cont.

◆ GetNumFormats()

uint32_t lldb_private::TypeCategoryImpl::GetNumFormats ( )
inline

Definition at line 287 of file TypeCategory.h.

References m_format_cont.

◆ GetNumLanguages()

size_t TypeCategoryImpl::GetNumLanguages ( )

Definition at line 69 of file TypeCategory.cpp.

References m_languages.

Referenced by GetDescription(), and IsApplicable().

◆ GetNumSummaries()

uint32_t lldb_private::TypeCategoryImpl::GetNumSummaries ( )
inline

Definition at line 289 of file TypeCategory.h.

References m_summary_cont.

◆ GetNumSynthetics()

uint32_t lldb_private::TypeCategoryImpl::GetNumSynthetics ( )
inline

Definition at line 293 of file TypeCategory.h.

References m_synth_cont.

◆ GetSummaryAtIndex()

TypeCategoryImpl::SummaryContainer::MapValueType TypeCategoryImpl::GetSummaryAtIndex ( size_t index)

Definition at line 275 of file TypeCategory.cpp.

References m_summary_cont.

◆ GetSummaryForType()

Definition at line 255 of file TypeCategory.cpp.

References m_summary_cont.

◆ GetSyntheticAtIndex()

TypeCategoryImpl::SynthContainer::MapValueType TypeCategoryImpl::GetSyntheticAtIndex ( size_t index)

Definition at line 285 of file TypeCategory.cpp.

References m_synth_cont.

◆ GetSyntheticForType()

TypeCategoryImpl::SynthContainer::MapValueType TypeCategoryImpl::GetSyntheticForType ( lldb::TypeNameSpecifierImplSP type_sp)

Definition at line 265 of file TypeCategory.cpp.

References m_synth_cont.

◆ GetTypeNameSpecifierForFilterAtIndex()

lldb::TypeNameSpecifierImplSP TypeCategoryImpl::GetTypeNameSpecifierForFilterAtIndex ( size_t index)

Definition at line 300 of file TypeCategory.cpp.

References m_filter_cont.

◆ GetTypeNameSpecifierForFormatAtIndex()

lldb::TypeNameSpecifierImplSP TypeCategoryImpl::GetTypeNameSpecifierForFormatAtIndex ( size_t index)

Definition at line 290 of file TypeCategory.cpp.

References m_format_cont.

◆ GetTypeNameSpecifierForSummaryAtIndex()

lldb::TypeNameSpecifierImplSP TypeCategoryImpl::GetTypeNameSpecifierForSummaryAtIndex ( size_t index)

Definition at line 295 of file TypeCategory.cpp.

References m_summary_cont.

◆ GetTypeNameSpecifierForSyntheticAtIndex()

lldb::TypeNameSpecifierImplSP TypeCategoryImpl::GetTypeNameSpecifierForSyntheticAtIndex ( size_t index)

Definition at line 305 of file TypeCategory.cpp.

References m_synth_cont.

◆ IsApplicable()

bool TypeCategoryImpl::IsApplicable ( lldb::LanguageType lang)
private

Definition at line 60 of file TypeCategory.cpp.

References GetLanguageAtIndex(), GetNumLanguages(), and IsApplicable().

Referenced by Get(), and IsApplicable().

◆ IsEnabled()

bool lldb_private::TypeCategoryImpl::IsEnabled ( ) const
inline

Definition at line 315 of file TypeCategory.h.

References m_enabled.

Referenced by AnyMatches(), Get(), and GetDescription().

◆ SetEnabledPosition()

void lldb_private::TypeCategoryImpl::SetEnabledPosition ( uint32_t p)
inlineprivate

Definition at line 385 of file TypeCategory.h.

References m_enabled_position.

◆ FormatManager

friend class FormatManager
friend

Definition at line 387 of file TypeCategory.h.

References FormatManager.

Referenced by FormatManager.

◆ FormattersContainer< ScriptedSyntheticChildren >

Definition at line 389 of file TypeCategory.h.

References TypeCategoryMap.

◆ FormattersContainer< TypeFilterImpl >

friend class FormattersContainer< TypeFilterImpl >
friend

Definition at line 389 of file TypeCategory.h.

◆ FormattersContainer< TypeFormatImpl >

friend class FormattersContainer< TypeFormatImpl >
friend

Definition at line 389 of file TypeCategory.h.

◆ FormattersContainer< TypeSummaryImpl >

friend class FormattersContainer< TypeSummaryImpl >
friend

Definition at line 389 of file TypeCategory.h.

◆ LanguageCategory

friend class LanguageCategory
friend

Definition at line 388 of file TypeCategory.h.

References LanguageCategory.

Referenced by LanguageCategory.

◆ TypeCategoryMap

friend class TypeCategoryMap
friend

Definition at line 389 of file TypeCategory.h.

Referenced by FormattersContainer< ScriptedSyntheticChildren >.

Member Data Documentation

◆ ALL_ITEM_TYPES

const uint16_t lldb_private::TypeCategoryImpl::ALL_ITEM_TYPES = UINT16_MAX
static

Definition at line 176 of file TypeCategory.h.

Referenced by lldb_private::FormatManager::AnyMatches(), and Get().

◆ m_change_listener

IFormatChangeListener* lldb_private::TypeCategoryImpl::m_change_listener
private

Definition at line 367 of file TypeCategory.h.

Referenced by Enable(), and TypeCategoryImpl().

◆ m_enabled

bool lldb_private::TypeCategoryImpl::m_enabled
private

Definition at line 365 of file TypeCategory.h.

Referenced by Enable(), GetEnabledPosition(), IsEnabled(), and TypeCategoryImpl().

◆ m_enabled_position

uint32_t lldb_private::TypeCategoryImpl::m_enabled_position = 0
private

◆ m_filter_cont

◆ m_format_cont

◆ m_languages

std::vector<lldb::LanguageType> lldb_private::TypeCategoryImpl::m_languages
private

Definition at line 373 of file TypeCategory.h.

Referenced by AddLanguage(), GetLanguageAtIndex(), GetNumLanguages(), and TypeCategoryImpl().

◆ m_mutex

std::recursive_mutex lldb_private::TypeCategoryImpl::m_mutex
private

Definition at line 369 of file TypeCategory.h.

Referenced by Enable(), and TypeCategoryImpl().

◆ m_name

ConstString lldb_private::TypeCategoryImpl::m_name
private

Definition at line 371 of file TypeCategory.h.

Referenced by AnyMatches(), GetName(), and TypeCategoryImpl().

◆ m_summary_cont

◆ m_synth_cont


The documentation for this class was generated from the following files: