MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ has_type()

template<typename OpClass >
bool MayaFlux::Yantra::OperationPool::has_type ( ) const
inline

Check if any operations of a type exist.

Template Parameters
OpClassOperation class type to check
Returns
true if at least one exists

Definition at line 321 of file OperationPool.hpp.

322 {
323 std::shared_lock lock(m_mutex);
324
325 std::type_index target_type(typeid(OpClass));
326
327 return std::any_of(m_info.begin(), m_info.end(),
328 [target_type](const auto& pair) {
329 return pair.second.type == target_type;
330 });
331 }
std::unordered_map< std::string, PooledOperationInfo > m_info

References m_info, and m_mutex.