SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Has()

template<typename T >
bool Spices::ResourcePool< T >::Has ( const std::string & name)
inlinestatic

Determine if specific resource is exist.

Parameters
[in]nameResource Name.
Returns
Returns true if exist.

Definition at line 167 of file ResourcePool.h.

168 {
170
171 std::shared_lock<std::shared_mutex> lock(m_Mutex);
172
173 if (m_Resources.find(name) != m_Resources.end()) return true;
174 return false;
175 }
#define SPICES_PROFILE_ZONE
static std::unordered_map< std::string, std::unique_ptr< Resource > > m_Resources
Static variable stores all specific resources in a basic type Pool.
static std::shared_mutex m_Mutex
Mutex for this pool.

Referenced by Spices::ResourcePool< T >::Access().