LLDB  mainline
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::FormatManager Class Reference

#include <FormatManager.h>

Inheritance diagram for lldb_private::FormatManager:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::FormatManager:
Collaboration graph
[legend]

Public Types

typedef std::map< lldb::LanguageType, LanguageCategory::UniquePointerLanguageCategories
 

Public Member Functions

 FormatManager ()
 
 ~FormatManager () override=default
 
NamedSummariesMapGetNamedSummaryContainer ()
 
void EnableCategory (ConstString category_name, TypeCategoryMap::Position pos=TypeCategoryMap::Default)
 
void EnableCategory (ConstString category_name, TypeCategoryMap::Position pos, lldb::LanguageType lang)
 
void DisableCategory (ConstString category_name)
 
void EnableCategory (const lldb::TypeCategoryImplSP &category, TypeCategoryMap::Position pos=TypeCategoryMap::Default)
 
void DisableCategory (const lldb::TypeCategoryImplSP &category)
 
void EnableAllCategories ()
 
void DisableAllCategories ()
 
bool DeleteCategory (ConstString category_name)
 
void ClearCategories ()
 
uint32_t GetCategoriesCount ()
 
lldb::TypeCategoryImplSP GetCategoryAtIndex (size_t index)
 
void ForEachCategory (TypeCategoryMap::ForEachCallback callback)
 
lldb::TypeCategoryImplSP GetCategory (const char *category_name=nullptr, bool can_create=true)
 
lldb::TypeCategoryImplSP GetCategory (ConstString category_name, bool can_create=true)
 
lldb::TypeFormatImplSP GetFormatForType (lldb::TypeNameSpecifierImplSP type_sp)
 
lldb::TypeSummaryImplSP GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp)
 
lldb::TypeFilterImplSP GetFilterForType (lldb::TypeNameSpecifierImplSP type_sp)
 
lldb::ScriptedSyntheticChildrenSP GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
 
lldb::TypeFormatImplSP GetFormat (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
lldb::TypeSummaryImplSP GetSummaryFormat (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
lldb::SyntheticChildrenSP GetSyntheticChildren (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
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)
 
bool ShouldPrintAsOneLiner (ValueObject &valobj)
 
void Changed () override
 
uint32_t GetCurrentRevision () override
 
LanguageCategoryGetCategoryForLanguage (lldb::LanguageType lang_type)
 
- Public Member Functions inherited from lldb_private::IFormatChangeListener
virtual ~IFormatChangeListener ()=default
 

Static Public Member Functions

static bool GetFormatFromCString (const char *format_cstr, bool partial_match_ok, lldb::Format &format)
 
static char GetFormatAsFormatChar (lldb::Format format)
 
static const char * GetFormatAsCString (lldb::Format format)
 
static lldb::Format GetSingleItemFormat (lldb::Format vector_format)
 
static FormattersMatchVector GetPossibleMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
static ConstString GetTypeForCache (ValueObject &, lldb::DynamicValueType)
 
static std::vector< lldb::LanguageTypeGetCandidateLanguages (lldb::LanguageType lang_type)
 

Private Types

typedef FormattersContainer< TypeSummaryImplNamedSummariesMap
 
typedef TypeCategoryMap::MapType::iterator CategoryMapIterator
 

Private Member Functions

template<typename ImplSP >
ImplSP Get (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
template<typename ImplSP >
ImplSP GetCached (FormattersMatchData &match_data)
 
template<typename ImplSP >
ImplSP GetHardcoded (FormattersMatchData &)
 
TypeCategoryMapGetCategories ()
 
void LoadSystemFormatters ()
 
void LoadVectorFormatters ()
 

Static Private Member Functions

static void GetPossibleMatches (ValueObject &valobj, CompilerType compiler_type, lldb::DynamicValueType use_dynamic, FormattersMatchVector &entries, bool did_strip_ptr, bool did_strip_ref, bool did_strip_typedef, bool root_level=false)
 

Private Attributes

std::atomic< uint32_tm_last_revision
 
FormatCache m_format_cache
 
std::recursive_mutex m_language_categories_mutex
 
LanguageCategories m_language_categories_map
 
NamedSummariesMap m_named_summaries_map
 
TypeCategoryMap m_categories_map
 
ConstString m_default_category_name
 
ConstString m_system_category_name
 
ConstString m_vectortypes_category_name
 

Friends

class FormattersMatchData
 

Detailed Description

Definition at line 36 of file FormatManager.h.

Member Typedef Documentation

◆ CategoryMapIterator

typedef TypeCategoryMap::MapType::iterator lldb_private::FormatManager::CategoryMapIterator
private

Definition at line 38 of file FormatManager.h.

◆ LanguageCategories

Definition at line 42 of file FormatManager.h.

◆ NamedSummariesMap

Definition at line 37 of file FormatManager.h.

Constructor & Destructor Documentation

◆ FormatManager()

FormatManager::FormatManager ( )

◆ ~FormatManager()

lldb_private::FormatManager::~FormatManager ( )
overridedefault

Member Function Documentation

◆ AnyMatches()

bool lldb_private::FormatManager::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 
)
inline

◆ Changed()

void FormatManager::Changed ( )
overridevirtual

◆ ClearCategories()

void lldb_private::FormatManager::ClearCategories ( )
inline

◆ DeleteCategory()

bool lldb_private::FormatManager::DeleteCategory ( ConstString  category_name)
inline

◆ DisableAllCategories()

void FormatManager::DisableAllCategories ( )

◆ DisableCategory() [1/2]

void lldb_private::FormatManager::DisableCategory ( const lldb::TypeCategoryImplSP &  category)
inline

Definition at line 77 of file FormatManager.h.

References lldb_private::TypeCategoryMap::Disable(), and m_categories_map.

◆ DisableCategory() [2/2]

void lldb_private::FormatManager::DisableCategory ( ConstString  category_name)
inline

◆ EnableAllCategories()

void FormatManager::EnableAllCategories ( )

◆ EnableCategory() [1/3]

void lldb_private::FormatManager::EnableCategory ( const lldb::TypeCategoryImplSP &  category,
TypeCategoryMap::Position  pos = TypeCategoryMap::Default 
)
inline

Definition at line 72 of file FormatManager.h.

References lldb_private::TypeCategoryMap::Enable(), and m_categories_map.

◆ EnableCategory() [2/3]

void lldb_private::FormatManager::EnableCategory ( ConstString  category_name,
TypeCategoryMap::Position  pos,
lldb::LanguageType  lang 
)
inline

◆ EnableCategory() [3/3]

void lldb_private::FormatManager::EnableCategory ( ConstString  category_name,
TypeCategoryMap::Position  pos = TypeCategoryMap::Default 
)
inline

◆ ForEachCategory()

void FormatManager::ForEachCategory ( TypeCategoryMap::ForEachCallback  callback)

◆ Get()

template<typename ImplSP >
ImplSP FormatManager::Get ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)
private

◆ GetCached()

template<typename ImplSP >
ImplSP FormatManager::GetCached ( FormattersMatchData match_data)
private

◆ GetCandidateLanguages()

std::vector< lldb::LanguageType > FormatManager::GetCandidateLanguages ( lldb::LanguageType  lang_type)
static

◆ GetCategories()

TypeCategoryMap& lldb_private::FormatManager::GetCategories ( )
inlineprivate

Definition at line 202 of file FormatManager.h.

References m_categories_map.

◆ GetCategoriesCount()

uint32_t lldb_private::FormatManager::GetCategoriesCount ( )
inline

◆ GetCategory() [1/2]

lldb::TypeCategoryImplSP lldb_private::FormatManager::GetCategory ( const char *  category_name = nullptr,
bool  can_create = true 
)
inline

◆ GetCategory() [2/2]

lldb::TypeCategoryImplSP FormatManager::GetCategory ( ConstString  category_name,
bool  can_create = true 
)

Definition at line 414 of file FormatManager.cpp.

◆ GetCategoryAtIndex()

lldb::TypeCategoryImplSP lldb_private::FormatManager::GetCategoryAtIndex ( size_t  index)
inline

◆ GetCategoryForLanguage()

LanguageCategory * FormatManager::GetCategoryForLanguage ( lldb::LanguageType  lang_type)

Definition at line 586 of file FormatManager.cpp.

◆ GetCurrentRevision()

uint32_t lldb_private::FormatManager::GetCurrentRevision ( )
inlineoverridevirtual

◆ GetFilterForType()

lldb::TypeFilterImplSP FormatManager::GetFilterForType ( lldb::TypeNameSpecifierImplSP  type_sp)

Definition at line 354 of file FormatManager.cpp.

References UINT32_MAX.

Referenced by lldb_private::DataVisualization::GetFilterForType().

◆ GetFormat()

lldb::TypeFormatImplSP FormatManager::GetFormat ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)

Definition at line 670 of file FormatManager.cpp.

Referenced by lldb_private::DataVisualization::GetFormat().

◆ GetFormatAsCString()

const char * FormatManager::GetFormatAsCString ( lldb::Format  format)
static

◆ GetFormatAsFormatChar()

char FormatManager::GetFormatAsFormatChar ( lldb::Format  format)
static

◆ GetFormatForType()

lldb::TypeFormatImplSP FormatManager::GetFormatForType ( lldb::TypeNameSpecifierImplSP  type_sp)

Definition at line 306 of file FormatManager.cpp.

References UINT32_MAX.

Referenced by lldb_private::DataVisualization::GetFormatForType().

◆ GetFormatFromCString()

bool FormatManager::GetFormatFromCString ( const char *  format_cstr,
bool  partial_match_ok,
lldb::Format format 
)
static

◆ GetHardcoded()

template<typename ImplSP >
ImplSP FormatManager::GetHardcoded ( FormattersMatchData match_data)
private

◆ GetNamedSummaryContainer()

NamedSummariesMap& lldb_private::FormatManager::GetNamedSummaryContainer ( )
inline

◆ GetPossibleMatches() [1/2]

void FormatManager::GetPossibleMatches ( ValueObject valobj,
CompilerType  compiler_type,
lldb::DynamicValueType  use_dynamic,
FormattersMatchVector entries,
bool  did_strip_ptr,
bool  did_strip_ref,
bool  did_strip_typedef,
bool  root_level = false 
)
staticprivate

◆ GetPossibleMatches() [2/2]

static FormattersMatchVector lldb_private::FormatManager::GetPossibleMatches ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)
inlinestatic

◆ GetSingleItemFormat()

lldb::Format FormatManager::GetSingleItemFormat ( lldb::Format  vector_format)
static

◆ GetSummaryFormat()

lldb::TypeSummaryImplSP FormatManager::GetSummaryFormat ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)

◆ GetSummaryForType()

lldb::TypeSummaryImplSP FormatManager::GetSummaryForType ( lldb::TypeNameSpecifierImplSP  type_sp)

Definition at line 330 of file FormatManager.cpp.

References UINT32_MAX.

Referenced by lldb_private::DataVisualization::GetSummaryForType().

◆ GetSyntheticChildren()

lldb::SyntheticChildrenSP FormatManager::GetSyntheticChildren ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)

◆ GetSyntheticForType()

lldb::ScriptedSyntheticChildrenSP FormatManager::GetSyntheticForType ( lldb::TypeNameSpecifierImplSP  type_sp)

Definition at line 378 of file FormatManager.cpp.

References UINT32_MAX.

Referenced by lldb_private::DataVisualization::GetSyntheticForType().

◆ GetTypeForCache()

ConstString FormatManager::GetTypeForCache ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)
static

◆ LoadSystemFormatters()

void FormatManager::LoadSystemFormatters ( )
private

◆ LoadVectorFormatters()

void lldb_private::FormatManager::LoadVectorFormatters ( )
private

Referenced by FormatManager().

◆ ShouldPrintAsOneLiner()

bool FormatManager::ShouldPrintAsOneLiner ( ValueObject valobj)

Friends And Related Function Documentation

◆ FormattersMatchData

friend class FormattersMatchData
friend

Definition at line 214 of file FormatManager.h.

Member Data Documentation

◆ m_categories_map

TypeCategoryMap lldb_private::FormatManager::m_categories_map
private

◆ m_default_category_name

ConstString lldb_private::FormatManager::m_default_category_name
private

Definition at line 193 of file FormatManager.h.

Referenced by GetCategory().

◆ m_format_cache

FormatCache lldb_private::FormatManager::m_format_cache
private

Definition at line 187 of file FormatManager.h.

◆ m_language_categories_map

LanguageCategories lldb_private::FormatManager::m_language_categories_map
private

Definition at line 189 of file FormatManager.h.

◆ m_language_categories_mutex

std::recursive_mutex lldb_private::FormatManager::m_language_categories_mutex
private

Definition at line 188 of file FormatManager.h.

◆ m_last_revision

std::atomic<uint32_t> lldb_private::FormatManager::m_last_revision
private

Definition at line 186 of file FormatManager.h.

Referenced by GetCurrentRevision().

◆ m_named_summaries_map

NamedSummariesMap lldb_private::FormatManager::m_named_summaries_map
private

Definition at line 190 of file FormatManager.h.

Referenced by GetNamedSummaryContainer().

◆ m_system_category_name

ConstString lldb_private::FormatManager::m_system_category_name
private

Definition at line 194 of file FormatManager.h.

Referenced by FormatManager(), and LoadSystemFormatters().

◆ m_vectortypes_category_name

ConstString lldb_private::FormatManager::m_vectortypes_category_name
private

Definition at line 195 of file FormatManager.h.

Referenced by FormatManager().


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