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

Definition at line 27 of file TypeCategoryMap.h.

◆ ForEachCallback

Definition at line 34 of file TypeCategoryMap.h.

◆ KeyType

Definition at line 31 of file TypeCategoryMap.h.

◆ MapIterator

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

Definition at line 33 of file TypeCategoryMap.h.

◆ MapType

Definition at line 32 of file TypeCategoryMap.h.

◆ 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, and listener.

Member Function Documentation

◆ Add()

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

◆ 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 160 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 ( lldb::TypeCategoryImplSP  category)

Definition at line 96 of file TypeCategoryMap.cpp.

References m_active_categories, and m_map_mutex.

◆ DisableAllCategories()

void TypeCategoryMap::DisableAllCategories ( )

◆ Enable() [1/2]

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

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

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

◆ ForEach()

void TypeCategoryMap::ForEach ( ForEachCallback  callback)

◆ Get() [1/2]

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

◆ Get() [2/2]

bool TypeCategoryMap::Get ( KeyType  name,
lldb::TypeCategoryImplSP entry 
)

◆ GetAtIndex()

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

◆ GetCount()

uint32_t lldb_private::TypeCategoryMap::GetCount ( )
inline

Member Data Documentation

◆ Default

const Position lldb_private::TypeCategoryMap::Default = 1
static

Definition at line 39 of file TypeCategoryMap.h.

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

◆ 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

Definition at line 96 of file TypeCategoryMap.h.

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

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