LLDB mainline
lldb_private::TypeCategoryMap Class Reference

#include <TypeCategoryMap.h>

Classes

class  delete_matching_categories

Public Types

typedef ConstString KeyType
typedef std::map< KeyType, lldb::TypeCategoryImplSPMapType
typedef MapType::iterator MapIterator
typedef std::function< bool(const lldb::TypeCategoryImplSP &)> ForEachCallback
typedef uint32_t Position

Public Member Functions

 TypeCategoryMap (IFormatChangeListener *lst)
void Add (KeyType name, const lldb::TypeCategoryImplSP &entry)
bool Delete (KeyType name)
bool Enable (KeyType category_name, Position pos=Default)
bool Disable (KeyType category_name)
bool Enable (lldb::TypeCategoryImplSP category, Position pos=Default)
bool Disable (lldb::TypeCategoryImplSP category)
void EnableAllCategories ()
void DisableAllCategories ()
void Clear ()
bool Get (KeyType name, lldb::TypeCategoryImplSP &entry)
void ForEach (ForEachCallback callback)
lldb::TypeCategoryImplSP GetAtIndex (uint32_t)
bool AnyMatches (const FormattersMatchCandidate &candidate_type, TypeCategoryImpl::FormatCategoryItems items=TypeCategoryImpl::ALL_ITEM_TYPES, bool only_enabled=true, const char **matching_category=nullptr, TypeCategoryImpl::FormatCategoryItems *matching_type=nullptr)
uint32_t GetCount ()
template<typename ImplSP>
void Get (FormattersMatchData &, ImplSP &)

Static Public Attributes

static const Position First = 0
static const Position Default = 1
static const Position Last = UINT32_MAX

Private Types

typedef std::list< lldb::TypeCategoryImplSPActiveCategoriesList
typedef ActiveCategoriesList::iterator ActiveCategoriesIterator

Private Attributes

std::recursive_mutex m_map_mutex
IFormatChangeListenerlistener
MapType m_map
ActiveCategoriesList m_active_categories

Detailed Description

Definition at line 25 of file TypeCategoryMap.h.

Member Typedef Documentation

◆ ActiveCategoriesIterator

typedef ActiveCategoriesList::iterator lldb_private::TypeCategoryMap::ActiveCategoriesIterator
private

Definition at line 28 of file TypeCategoryMap.h.

◆ ActiveCategoriesList

◆ ForEachCallback

Definition at line 34 of file TypeCategoryMap.h.

◆ KeyType

◆ MapIterator

typedef MapType::iterator lldb_private::TypeCategoryMap::MapIterator

Definition at line 33 of file TypeCategoryMap.h.

◆ MapType

◆ Position

Definition at line 36 of file TypeCategoryMap.h.

Constructor & Destructor Documentation

◆ TypeCategoryMap()

TypeCategoryMap::TypeCategoryMap ( IFormatChangeListener * lst)

Definition at line 18 of file TypeCategoryMap.cpp.

References Add(), Enable(), First, listener, m_active_categories, m_map, and m_map_mutex.

Member Function Documentation

◆ Add()

void TypeCategoryMap::Add ( KeyType name,
const lldb::TypeCategoryImplSP & entry )

Definition at line 27 of file TypeCategoryMap.cpp.

References listener, m_map, and m_map_mutex.

Referenced by TypeCategoryMap().

◆ AnyMatches()

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

Definition at line 161 of file TypeCategoryMap.cpp.

References m_map, and m_map_mutex.

◆ Clear()

void TypeCategoryMap::Clear ( )

Definition at line 138 of file TypeCategoryMap.cpp.

References listener, m_active_categories, m_map, and m_map_mutex.

◆ Delete()

bool TypeCategoryMap::Delete ( KeyType name)

Definition at line 40 of file TypeCategoryMap.cpp.

References Disable(), listener, m_map, and m_map_mutex.

◆ Disable() [1/2]

bool TypeCategoryMap::Disable ( KeyType category_name)

Definition at line 66 of file TypeCategoryMap.cpp.

References Disable(), Get(), and m_map_mutex.

Referenced by Delete(), Disable(), and DisableAllCategories().

◆ Disable() [2/2]

bool TypeCategoryMap::Disable ( lldb::TypeCategoryImplSP category)

Definition at line 96 of file TypeCategoryMap.cpp.

References m_active_categories, and m_map_mutex.

◆ DisableAllCategories()

void TypeCategoryMap::DisableAllCategories ( )

Definition at line 130 of file TypeCategoryMap.cpp.

References Disable(), First, m_active_categories, and m_map_mutex.

◆ Enable() [1/2]

bool TypeCategoryMap::Enable ( KeyType category_name,
Position pos = Default )

Definition at line 58 of file TypeCategoryMap.cpp.

References Enable(), Get(), and m_map_mutex.

Referenced by Enable(), EnableAllCategories(), and TypeCategoryMap().

◆ Enable() [2/2]

bool TypeCategoryMap::Enable ( lldb::TypeCategoryImplSP category,
Position pos = Default )

Definition at line 74 of file TypeCategoryMap.cpp.

References First, Last, m_active_categories, and m_map_mutex.

◆ EnableAllCategories()

void TypeCategoryMap::EnableAllCategories ( )

Definition at line 106 of file TypeCategoryMap.cpp.

References Enable(), Last, m_map, m_map_mutex, and sp.

◆ ForEach()

void TypeCategoryMap::ForEach ( ForEachCallback callback)

Definition at line 225 of file TypeCategoryMap.cpp.

References m_active_categories, m_map, and m_map_mutex.

◆ Get() [1/2]

◆ Get() [2/2]

◆ GetAtIndex()

TypeCategoryImplSP TypeCategoryMap::GetAtIndex ( uint32_t index)

Definition at line 252 of file TypeCategoryMap.cpp.

References m_map, and m_map_mutex.

◆ GetCount()

uint32_t lldb_private::TypeCategoryMap::GetCount ( )
inline

Definition at line 75 of file TypeCategoryMap.h.

References m_map.

Member Data Documentation

◆ Default

◆ First

const Position lldb_private::TypeCategoryMap::First = 0
static

Definition at line 38 of file TypeCategoryMap.h.

Referenced by DisableAllCategories(), Enable(), and TypeCategoryMap().

◆ Last

const Position lldb_private::TypeCategoryMap::Last = UINT32_MAX
static

◆ listener

IFormatChangeListener* lldb_private::TypeCategoryMap::listener
private

Definition at line 93 of file TypeCategoryMap.h.

Referenced by Add(), Clear(), Delete(), and TypeCategoryMap().

◆ m_active_categories

ActiveCategoriesList lldb_private::TypeCategoryMap::m_active_categories
private

◆ m_map

MapType lldb_private::TypeCategoryMap::m_map
private

◆ m_map_mutex

std::recursive_mutex lldb_private::TypeCategoryMap::m_map_mutex
private

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