Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
MutexedMap< Key, Value > Class Template Reference

#include <container.h>

+ Collaboration diagram for MutexedMap< Key, Value >:

Public Member Functions

 MutexedMap ()=default
 
void set (const Key &name, const Value &value)
 
bool get (const Key &name, Value *result) const
 
std::vector< Value > getValues () const
 
void clear ()
 

Private Attributes

std::map< Key, Value > m_values
 
std::mutex m_mutex
 

Constructor & Destructor Documentation

◆ MutexedMap()

template<typename Key , typename Value >
MutexedMap< Key, Value >::MutexedMap ( )
default

Member Function Documentation

◆ clear()

template<typename Key , typename Value >
void MutexedMap< Key, Value >::clear ( )
inline

References MutexedMap< Key, Value >::m_values.

Referenced by clearTextureNameCache().

+ Here is the caller graph for this function:

◆ get()

template<typename Key , typename Value >
bool MutexedMap< Key, Value >::get ( const Key & name,
Value * result ) const
inline

References MutexedMap< Key, Value >::m_mutex, and MutexedMap< Key, Value >::m_values.

Referenced by TextureSource::isKnownSourceImage().

+ Here is the caller graph for this function:

◆ getValues()

template<typename Key , typename Value >
std::vector< Value > MutexedMap< Key, Value >::getValues ( ) const
inline

◆ set()

template<typename Key , typename Value >
void MutexedMap< Key, Value >::set ( const Key & name,
const Value & value )
inline

References MutexedMap< Key, Value >::m_mutex, and MutexedMap< Key, Value >::m_values.

Referenced by TextureSource::insertSourceImage(), and TextureSource::isKnownSourceImage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_mutex

template<typename Key , typename Value >
std::mutex MutexedMap< Key, Value >::m_mutex
mutableprivate

◆ m_values

template<typename Key , typename Value >
std::map<Key, Value> MutexedMap< Key, Value >::m_values
private

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