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

◆ register_operation() [2/2]

template<typename OpClass >
void MayaFlux::Yantra::OperationRegistry::register_operation ( OperationType  category)
inline

Register with explicit category (for operations without traits)

Template Parameters
OpClassOperation class to register
Parameters
categoryExplicit operation category

Definition at line 64 of file ComputeRegistry.hpp.

65 {
66 TypeKey key {
67 .category = category,
68 .operation_type = std::type_index(typeid(OpClass))
69 };
70
71 m_factories[key] = []() -> std::any {
72 return static_pointer_cast<void>(std::make_shared<OpClass>());
73 };
74
75 m_type_info[key] = {
76 std::type_index(typeid(typename OpClass::input_type)),
77 std::type_index(typeid(typename OpClass::output_type))
78 };
79 }
std::unordered_map< TypeKey, Factory, TypeKeyHash > m_factories
std::unordered_map< TypeKey, std::pair< std::type_index, std::type_index >, TypeKeyHash > m_type_info

References MayaFlux::Yantra::OperationRegistry::TypeKey::category, m_factories, and m_type_info.