LLDB mainline
|
#include <TypeCategoryMap.h>
Classes | |
class | delete_matching_categories |
Public Types | |
typedef ConstString | KeyType |
typedef TypeCategoryImpl | ValueType |
typedef ValueType::SharedPointer | ValueSP |
typedef std::map< KeyType, ValueSP > | MapType |
typedef MapType::iterator | MapIterator |
typedef std::function< bool(const ValueSP &)> | ForEachCallback |
typedef uint32_t | Position |
Public Member Functions | |
TypeCategoryMap (IFormatChangeListener *lst) | |
void | Add (KeyType name, const ValueSP &entry) |
bool | Delete (KeyType name) |
bool | Enable (KeyType category_name, Position pos=Default) |
bool | Disable (KeyType category_name) |
bool | Enable (ValueSP category, Position pos=Default) |
bool | Disable (ValueSP category) |
void | EnableAllCategories () |
void | DisableAllCategories () |
void | Clear () |
bool | Get (KeyType name, ValueSP &entry) |
bool | Get (uint32_t pos, ValueSP &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 Member Functions | |
MapType & | map () |
ActiveCategoriesList & | active_list () |
std::recursive_mutex & | mutex () |
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 ValueSP &)> lldb_private::TypeCategoryMap::ForEachCallback |
Definition at line 36 of file TypeCategoryMap.h.
Definition at line 31 of file TypeCategoryMap.h.
typedef MapType::iterator lldb_private::TypeCategoryMap::MapIterator |
Definition at line 35 of file TypeCategoryMap.h.
typedef std::map<KeyType, ValueSP> lldb_private::TypeCategoryMap::MapType |
Definition at line 34 of file TypeCategoryMap.h.
Definition at line 38 of file TypeCategoryMap.h.
Definition at line 33 of file TypeCategoryMap.h.
Definition at line 32 of file TypeCategoryMap.h.
TypeCategoryMap::TypeCategoryMap | ( | IFormatChangeListener * | lst | ) |
|
inlineprivate |
Definition at line 104 of file TypeCategoryMap.h.
References m_active_categories.
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 156 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::AnyMatches().
void TypeCategoryMap::Clear | ( | ) |
Definition at line 125 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 34 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 54 of file TypeCategoryMap.cpp.
References Disable(), Get(), and m_map_mutex.
Referenced by Delete(), Disable(), DisableAllCategories(), and lldb_private::FormatManager::DisableCategory().
bool TypeCategoryMap::Disable | ( | ValueSP | category | ) |
Definition at line 84 of file TypeCategoryMap.cpp.
References m_active_categories, and m_map_mutex.
void TypeCategoryMap::DisableAllCategories | ( | ) |
Definition at line 117 of file TypeCategoryMap.cpp.
References Disable(), First, m_active_categories, and m_map_mutex.
Referenced by lldb_private::FormatManager::DisableAllCategories().
Definition at line 46 of file TypeCategoryMap.cpp.
References Enable(), Get(), and m_map_mutex.
Referenced by Enable(), EnableAllCategories(), lldb_private::FormatManager::EnableCategory(), and TypeCategoryMap().
Definition at line 62 of file TypeCategoryMap.cpp.
References First, Last, m_active_categories, and m_map_mutex.
void TypeCategoryMap::EnableAllCategories | ( | ) |
Definition at line 94 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 221 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 173 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.
Definition at line 133 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().
Definition at line 142 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
TypeCategoryImplSP TypeCategoryMap::GetAtIndex | ( | uint32_t | index | ) |
Definition at line 248 of file TypeCategoryMap.cpp.
References m_map, and m_map_mutex.
Referenced by lldb_private::FormatManager::GetCategoryAtIndex().
|
inline |
Definition at line 79 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().
|
inlineprivate |
Definition at line 102 of file TypeCategoryMap.h.
References m_map.
|
inlineprivate |
Definition at line 106 of file TypeCategoryMap.h.
References m_map_mutex.
|
static |
Definition at line 41 of file TypeCategoryMap.h.
Referenced by CommandObjectTypeCategoryEnable::CommandObjectTypeCategoryEnable(), and lldb_private::LanguageCategory::Enable().
|
static |
Definition at line 40 of file TypeCategoryMap.h.
Referenced by DisableAllCategories(), Enable(), and TypeCategoryMap().
|
static |
Definition at line 42 of file TypeCategoryMap.h.
Referenced by Enable(), EnableAllCategories(), and lldb_private::FormatManager::FormatManager().
|
private |
Definition at line 97 of file TypeCategoryMap.h.
Referenced by Add(), Clear(), Delete(), and TypeCategoryMap().
|
private |
Definition at line 100 of file TypeCategoryMap.h.
Referenced by active_list(), Clear(), Disable(), DisableAllCategories(), Enable(), ForEach(), and Get().
|
private |
Definition at line 99 of file TypeCategoryMap.h.
Referenced by Add(), AnyMatches(), Clear(), Delete(), EnableAllCategories(), ForEach(), Get(), GetAtIndex(), GetCount(), and map().
|
private |
Definition at line 96 of file TypeCategoryMap.h.
Referenced by Add(), AnyMatches(), Clear(), Delete(), Disable(), DisableAllCategories(), Enable(), EnableAllCategories(), ForEach(), Get(), GetAtIndex(), and mutex().