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::TypeCategoryMap Class Reference

#include <TypeCategoryMap.h>

Collaboration diagram for lldb_private::TypeCategoryMap:
Collaboration graph


class  delete_matching_categories

Public Types

typedef std::map< KeyType, ValueSPMapType
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 (ConstString type_name, 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 ConstString KeyType
typedef TypeCategoryImpl ValueType
typedef ValueType::SharedPointer ValueSP
typedef std::list< lldb::TypeCategoryImplSP > ActiveCategoriesList
typedef ActiveCategoriesList::iterator ActiveCategoriesIterator

Private Member Functions

MapTypemap ()
ActiveCategoriesListactive_list ()
std::recursive_mutex & mutex ()

Private Attributes

std::recursive_mutex m_map_mutex
MapType m_map
ActiveCategoriesList m_active_categories


class FormattersContainer< ValueType >
class FormatManager

Detailed Description

Definition at line 24 of file TypeCategoryMap.h.

Member Typedef Documentation

◆ ActiveCategoriesIterator

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

Definition at line 30 of file TypeCategoryMap.h.

◆ ActiveCategoriesList

typedef std::list<lldb::TypeCategoryImplSP> lldb_private::TypeCategoryMap::ActiveCategoriesList

Definition at line 29 of file TypeCategoryMap.h.

◆ ForEachCallback

typedef std::function<bool(const ValueSP &)> lldb_private::TypeCategoryMap::ForEachCallback

Definition at line 35 of file TypeCategoryMap.h.

◆ KeyType

Definition at line 26 of file TypeCategoryMap.h.

◆ MapIterator

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

Definition at line 34 of file TypeCategoryMap.h.

◆ MapType

Definition at line 33 of file TypeCategoryMap.h.

◆ Position

Definition at line 37 of file TypeCategoryMap.h.

◆ ValueSP

Definition at line 28 of file TypeCategoryMap.h.

◆ ValueType

Definition at line 27 of file TypeCategoryMap.h.

Constructor & Destructor Documentation

◆ TypeCategoryMap()

TypeCategoryMap::TypeCategoryMap ( IFormatChangeListener lst)

Definition at line 18 of file TypeCategoryMap.cpp.

References Add(), Enable(), First, and listener.

Member Function Documentation

◆ active_list()

ActiveCategoriesList& lldb_private::TypeCategoryMap::active_list ( )

Definition at line 103 of file TypeCategoryMap.h.

References m_active_categories.

◆ Add()

void TypeCategoryMap::Add ( KeyType  name,
const ValueSP entry 

◆ AnyMatches()

bool TypeCategoryMap::AnyMatches ( ConstString  type_name,
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().

◆ Clear()

void TypeCategoryMap::Clear ( )

◆ Delete()

bool TypeCategoryMap::Delete ( KeyType  name)

◆ Disable() [1/2]

bool TypeCategoryMap::Disable ( KeyType  category_name)

◆ Disable() [2/2]

bool TypeCategoryMap::Disable ( ValueSP  category)

Definition at line 84 of file TypeCategoryMap.cpp.

References m_active_categories, and m_map_mutex.

◆ DisableAllCategories()

void TypeCategoryMap::DisableAllCategories ( )

Definition at line 117 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 

◆ Enable() [2/2]

bool TypeCategoryMap::Enable ( ValueSP  category,
Position  pos = Default 

Definition at line 62 of file TypeCategoryMap.cpp.

References First, Last, m_active_categories, and m_map_mutex.

◆ EnableAllCategories()

void TypeCategoryMap::EnableAllCategories ( )

Definition at line 94 of file TypeCategoryMap.cpp.

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

◆ ForEach()

void TypeCategoryMap::ForEach ( ForEachCallback  callback)

Definition at line 220 of file TypeCategoryMap.cpp.

References m_active_categories, m_map, and m_map_mutex.

◆ Get() [1/3]

template<typename ImplSP >
void TypeCategoryMap::Get ( FormattersMatchData match_data,
ImplSP &  retval 

◆ Get() [2/3]

bool TypeCategoryMap::Get ( KeyType  name,
ValueSP entry 

Definition at line 133 of file TypeCategoryMap.cpp.

References m_map, and m_map_mutex.

Referenced by Disable(), Enable(), and lldb_private::FormatManager::EnableCategory().

◆ Get() [3/3]

bool TypeCategoryMap::Get ( uint32_t  pos,
ValueSP entry 

Definition at line 142 of file TypeCategoryMap.cpp.

References m_map, and m_map_mutex.

◆ GetAtIndex()

TypeCategoryImplSP TypeCategoryMap::GetAtIndex ( uint32_t  index)

Definition at line 247 of file TypeCategoryMap.cpp.

References m_map, and m_map_mutex.

Referenced by lldb_private::FormatManager::GetCategoryAtIndex().

◆ GetCount()

uint32_t lldb_private::TypeCategoryMap::GetCount ( )

Definition at line 78 of file TypeCategoryMap.h.

References m_map.

Referenced by lldb_private::FormatManager::GetCategoriesCount().

◆ map()

MapType& lldb_private::TypeCategoryMap::map ( )

Definition at line 101 of file TypeCategoryMap.h.

References m_map.

◆ mutex()

std::recursive_mutex& lldb_private::TypeCategoryMap::mutex ( )

Definition at line 105 of file TypeCategoryMap.h.

References m_map_mutex.

Friends And Related Function Documentation

◆ FormatManager

friend class FormatManager

Definition at line 108 of file TypeCategoryMap.h.

◆ FormattersContainer< ValueType >

friend class FormattersContainer< ValueType >

Definition at line 107 of file TypeCategoryMap.h.

Member Data Documentation

◆ Default

const Position lldb_private::TypeCategoryMap::Default = 1

Definition at line 40 of file TypeCategoryMap.h.

Referenced by lldb_private::LanguageCategory::Enable().

◆ First

const Position lldb_private::TypeCategoryMap::First = 0

Definition at line 39 of file TypeCategoryMap.h.

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

◆ Last

const Position lldb_private::TypeCategoryMap::Last = UINT32_MAX

◆ listener

IFormatChangeListener* lldb_private::TypeCategoryMap::listener

Definition at line 96 of file TypeCategoryMap.h.

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

◆ m_active_categories

ActiveCategoriesList lldb_private::TypeCategoryMap::m_active_categories

Definition at line 99 of file TypeCategoryMap.h.

Referenced by active_list(), Clear(), Disable(), DisableAllCategories(), Enable(), ForEach(), and Get().

◆ m_map

MapType lldb_private::TypeCategoryMap::m_map

◆ m_map_mutex

std::recursive_mutex lldb_private::TypeCategoryMap::m_map_mutex

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