LLDB mainline
|
#include <TypeCategoryMap.h>
Classes | |
class | delete_matching_categories |
Public Types | |
typedef ConstString | KeyType |
typedef std::map< KeyType, lldb::TypeCategoryImplSP > | MapType |
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::TypeCategoryImplSP > | ActiveCategoriesList |
typedef ActiveCategoriesList::iterator | ActiveCategoriesIterator |
Private Attributes | |
std::recursive_mutex | m_map_mutex |
IFormatChangeListener * | listener |
MapType | m_map |
ActiveCategoriesList | m_active_categories |
Definition at line 25 of file TypeCategoryMap.h.
|
private |
Definition at line 28 of file TypeCategoryMap.h.
|
private |
Definition at line 27 of file TypeCategoryMap.h.
typedef std::function<bool(const lldb::TypeCategoryImplSP &)> lldb_private::TypeCategoryMap::ForEachCallback |
Definition at line 34 of file TypeCategoryMap.h.
Definition at line 31 of file TypeCategoryMap.h.
typedef MapType::iterator lldb_private::TypeCategoryMap::MapIterator |
Definition at line 33 of file TypeCategoryMap.h.
typedef std::map<KeyType, lldb::TypeCategoryImplSP> lldb_private::TypeCategoryMap::MapType |
Definition at line 32 of file TypeCategoryMap.h.
typedef uint32_t lldb_private::TypeCategoryMap::Position |
Definition at line 36 of file TypeCategoryMap.h.
TypeCategoryMap::TypeCategoryMap | ( | IFormatChangeListener * | lst | ) |
void TypeCategoryMap::Add | ( | KeyType | name, |
const lldb::TypeCategoryImplSP & | entry | ||
) |
Definition at line 27 of file TypeCategoryMap.cpp.
References lldb_private::IFormatChangeListener::Changed(), listener, m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::GetCategory(), and TypeCategoryMap().
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 160 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::AnyMatches().
void TypeCategoryMap::Clear | ( | ) |
Definition at line 137 of file TypeCategoryMap.cpp.
References lldb_private::IFormatChangeListener::Changed(), listener, m_active_categories, m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::ClearCategories().
bool TypeCategoryMap::Delete | ( | KeyType | name | ) |
Definition at line 40 of file TypeCategoryMap.cpp.
References lldb_private::IFormatChangeListener::Changed(), Disable(), listener, m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::DeleteCategory().
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(), DisableAllCategories(), and lldb_private::FormatManager::DisableCategory().
bool TypeCategoryMap::Disable | ( | lldb::TypeCategoryImplSP | category | ) |
Definition at line 96 of file TypeCategoryMap.cpp.
References m_active_categories, and m_map_mutex.
void TypeCategoryMap::DisableAllCategories | ( | ) |
Definition at line 129 of file TypeCategoryMap.cpp.
References Disable(), First, m_active_categories, and m_map_mutex.
Referenced by lldb_private::FormatManager::DisableAllCategories().
Definition at line 58 of file TypeCategoryMap.cpp.
References Enable(), Get(), and m_map_mutex.
Referenced by Enable(), EnableAllCategories(), lldb_private::FormatManager::EnableCategory(), and TypeCategoryMap().
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.
void TypeCategoryMap::EnableAllCategories | ( | ) |
Definition at line 106 of file TypeCategoryMap.cpp.
References Enable(), Last, m_map, m_map_mutex, and sp.
Referenced by lldb_private::FormatManager::EnableAllCategories().
void TypeCategoryMap::ForEach | ( | ForEachCallback | callback | ) |
Definition at line 225 of file TypeCategoryMap.cpp.
References m_active_categories, m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::ForEachCategory().
void TypeCategoryMap::Get | ( | FormattersMatchData & | match_data, |
ImplSP & | retval | ||
) |
Definition at line 177 of file TypeCategoryMap.cpp.
References lldb_private::DataFormatters, lldb_private::GetLog(), lldb_private::FormattersMatchData::GetMatchesVector(), lldb_private::ValueObject::GetObjectRuntimeLanguage(), lldb_private::FormattersMatchData::GetValueObject(), LLDB_LOGF, m_active_categories, and m_map_mutex.
bool TypeCategoryMap::Get | ( | KeyType | name, |
lldb::TypeCategoryImplSP & | entry | ||
) |
Definition at line 151 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
Referenced by Disable(), Enable(), lldb_private::FormatManager::EnableCategory(), lldb_private::FormatManager::GetCached(), and lldb_private::FormatManager::GetCategory().
TypeCategoryImplSP TypeCategoryMap::GetAtIndex | ( | uint32_t | index | ) |
Definition at line 252 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::GetCategoryAtIndex().
|
inline |
Definition at line 75 of file TypeCategoryMap.h.
References m_map.
Referenced by lldb_private::FormatManager::GetCategoriesCount(), lldb_private::FormatManager::GetFilterForType(), lldb_private::FormatManager::GetFormatForType(), lldb_private::FormatManager::GetSummaryForType(), and lldb_private::FormatManager::GetSyntheticForType().
|
static |
Definition at line 39 of file TypeCategoryMap.h.
Referenced by lldb_private::LanguageCategory::Enable().
|
static |
Definition at line 38 of file TypeCategoryMap.h.
Referenced by DisableAllCategories(), Enable(), and TypeCategoryMap().
|
static |
Definition at line 40 of file TypeCategoryMap.h.
Referenced by Enable(), EnableAllCategories(), and lldb_private::FormatManager::FormatManager().
|
private |
Definition at line 93 of file TypeCategoryMap.h.
Referenced by Add(), Clear(), Delete(), and TypeCategoryMap().
|
private |
Definition at line 96 of file TypeCategoryMap.h.
Referenced by Clear(), Disable(), DisableAllCategories(), Enable(), ForEach(), and Get().
|
private |
Definition at line 95 of file TypeCategoryMap.h.
Referenced by Add(), AnyMatches(), Clear(), Delete(), EnableAllCategories(), ForEach(), Get(), GetAtIndex(), and GetCount().
|
private |
Definition at line 92 of file TypeCategoryMap.h.
Referenced by Add(), AnyMatches(), Clear(), Delete(), Disable(), DisableAllCategories(), Enable(), EnableAllCategories(), ForEach(), Get(), and GetAtIndex().