LLDB mainline
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
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

Definition at line 171 of file TypeCategory.h.

◆ FormatCategoryItems

Definition at line 175 of file TypeCategory.h.

◆ FormatContainer

Definition at line 169 of file TypeCategory.h.

◆ SharedPointer

Definition at line 357 of file TypeCategory.h.

◆ SummaryContainer

Definition at line 170 of file TypeCategory.h.

◆ SynthContainer

Definition at line 172 of file TypeCategory.h.

Constructor & Destructor Documentation

◆ TypeCategoryImpl()

TypeCategoryImpl::TypeCategoryImpl ( IFormatChangeListener clist,
ConstString  name 
)

Definition at line 16 of file TypeCategory.cpp.

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

◆ 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

◆ 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

◆ 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

◆ 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()

void TypeCategoryImpl::AutoComplete ( CompletionRequest request,
FormatCategoryItems  items 
)

◆ Clear()

void TypeCategoryImpl::Clear ( FormatCategoryItems  items = ALL_ITEM_TYPES)

◆ Delete()

bool TypeCategoryImpl::Delete ( ConstString  name,
FormatCategoryItems  items = ALL_ITEM_TYPES 
)

◆ DeleteTypeFilter()

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

◆ DeleteTypeFormat()

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

◆ DeleteTypeSummary()

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

◆ DeleteTypeSynthetic()

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

◆ 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

◆ 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 TypeCategoryImpl::Get ( lldb::LanguageType  lang,
const FormattersMatchVector candidates,
lldb::SyntheticChildrenSP entry 
)

◆ Get() [2/3]

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

◆ Get() [3/3]

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

◆ GetCount()

uint32_t TypeCategoryImpl::GetCount ( FormatCategoryItems  items = ALL_ITEM_TYPES)

◆ GetDescription()

std::string TypeCategoryImpl::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)

◆ GetFilterForType()

TypeCategoryImpl::FilterContainer::MapValueType TypeCategoryImpl::GetFilterForType ( lldb::TypeNameSpecifierImplSP  type_sp)

◆ GetFormatAtIndex()

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

◆ GetFormatForType()

TypeCategoryImpl::FormatContainer::MapValueType TypeCategoryImpl::GetFormatForType ( lldb::TypeNameSpecifierImplSP  type_sp)

◆ 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 lldb_private::ConstString::GetCString(), and m_name.

Referenced by GetDescription().

◆ GetNumFilters()

uint32_t lldb_private::TypeCategoryImpl::GetNumFilters ( )
inline

◆ GetNumFormats()

uint32_t lldb_private::TypeCategoryImpl::GetNumFormats ( )
inline

◆ 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

◆ GetNumSynthetics()

uint32_t lldb_private::TypeCategoryImpl::GetNumSynthetics ( )
inline

◆ GetSummaryAtIndex()

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

◆ GetSummaryForType()

TypeCategoryImpl::SummaryContainer::MapValueType TypeCategoryImpl::GetSummaryForType ( lldb::TypeNameSpecifierImplSP  type_sp)

◆ GetSyntheticAtIndex()

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

◆ GetSyntheticForType()

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

◆ GetTypeNameSpecifierForFilterAtIndex()

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

◆ GetTypeNameSpecifierForFormatAtIndex()

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

◆ GetTypeNameSpecifierForSummaryAtIndex()

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

◆ GetTypeNameSpecifierForSyntheticAtIndex()

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

◆ 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.

Friends And Related Function Documentation

◆ FormatManager

friend class FormatManager
friend

Definition at line 387 of file TypeCategory.h.

◆ FormattersContainer< ScriptedSyntheticChildren >

Definition at line 389 of file TypeCategory.h.

◆ 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.

◆ TypeCategoryMap

friend class TypeCategoryMap
friend

Definition at line 389 of file TypeCategory.h.

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.

◆ m_change_listener

IFormatChangeListener* lldb_private::TypeCategoryImpl::m_change_listener
private

Definition at line 367 of file TypeCategory.h.

Referenced by Enable().

◆ m_enabled

bool lldb_private::TypeCategoryImpl::m_enabled
private

Definition at line 365 of file TypeCategory.h.

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

◆ m_enabled_position

uint32_t lldb_private::TypeCategoryImpl::m_enabled_position = 0
private

◆ m_filter_cont

FilterContainer lldb_private::TypeCategoryImpl::m_filter_cont
private

◆ m_format_cont

FormatContainer lldb_private::TypeCategoryImpl::m_format_cont
private

◆ m_languages

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

Definition at line 373 of file TypeCategory.h.

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

◆ m_mutex

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

Definition at line 369 of file TypeCategory.h.

Referenced by Enable().

◆ m_name

ConstString lldb_private::TypeCategoryImpl::m_name
private

Definition at line 371 of file TypeCategory.h.

Referenced by AnyMatches(), and GetName().

◆ m_summary_cont

SummaryContainer lldb_private::TypeCategoryImpl::m_summary_cont
private

◆ m_synth_cont

SynthContainer lldb_private::TypeCategoryImpl::m_synth_cont
private

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