LLDB mainline
Classes | Public Member Functions | Private Attributes | List of all members
lldb_private::FormatCache Class Reference

#include <FormatCache.h>

Classes

struct  Entry
 

Public Member Functions

 FormatCache ()=default
 
template<typename ImplSP >
bool Get (ConstString type, ImplSP &format_impl_sp)
 
void Set (ConstString type, lldb::TypeFormatImplSP &format_sp)
 
void Set (ConstString type, lldb::TypeSummaryImplSP &summary_sp)
 
void Set (ConstString type, lldb::SyntheticChildrenSP &synthetic_sp)
 
void Clear ()
 
uint64_t GetCacheHits ()
 
uint64_t GetCacheMisses ()
 

Private Attributes

std::map< ConstString, Entrym_entries
 
std::recursive_mutex m_mutex
 
uint64_t m_cache_hits = 0
 
uint64_t m_cache_misses = 0
 

Detailed Description

Definition at line 20 of file FormatCache.h.

Constructor & Destructor Documentation

◆ FormatCache()

lldb_private::FormatCache::FormatCache ( )
default

Member Function Documentation

◆ Clear()

void FormatCache::Clear ( )

Definition at line 110 of file FormatCache.cpp.

References m_entries, and m_mutex.

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

◆ Get()

template<typename ImplSP >
bool FormatCache::Get ( ConstString  type,
ImplSP &  format_impl_sp 
)

◆ GetCacheHits()

uint64_t lldb_private::FormatCache::GetCacheHits ( )
inline

Definition at line 64 of file FormatCache.h.

References m_cache_hits.

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

◆ GetCacheMisses()

uint64_t lldb_private::FormatCache::GetCacheMisses ( )
inline

Definition at line 66 of file FormatCache.h.

References m_cache_misses.

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

◆ Set() [1/3]

void FormatCache::Set ( ConstString  type,
lldb::SyntheticChildrenSP synthetic_sp 
)

Definition at line 104 of file FormatCache.cpp.

References m_entries, and m_mutex.

◆ Set() [2/3]

void FormatCache::Set ( ConstString  type,
lldb::TypeFormatImplSP format_sp 
)

◆ Set() [3/3]

void FormatCache::Set ( ConstString  type,
lldb::TypeSummaryImplSP summary_sp 
)

Definition at line 99 of file FormatCache.cpp.

References m_entries, and m_mutex.

Member Data Documentation

◆ m_cache_hits

uint64_t lldb_private::FormatCache::m_cache_hits = 0
private

Definition at line 51 of file FormatCache.h.

Referenced by Get(), and GetCacheHits().

◆ m_cache_misses

uint64_t lldb_private::FormatCache::m_cache_misses = 0
private

Definition at line 52 of file FormatCache.h.

Referenced by Get(), and GetCacheMisses().

◆ m_entries

std::map<ConstString, Entry> lldb_private::FormatCache::m_entries
private

Definition at line 48 of file FormatCache.h.

Referenced by Clear(), Get(), and Set().

◆ m_mutex

std::recursive_mutex lldb_private::FormatCache::m_mutex
private

Definition at line 49 of file FormatCache.h.

Referenced by Clear(), Get(), and Set().


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