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

◆ add()

template<typename Op>
requires requires { typename Op::supports; }
OperationRegistry & MayaFlux::Yantra::OperationRegistry::add ( int priority = 50)
inline

Catalog an implementation for every config it supports.

Each config of Op::supports is registered under the enum its selector field takes. Implementations built from their config are constructed by it.

Definition at line 80 of file OperationRegistry.hpp.

81 {
82 Op::supports::each([&]<typename Config>() {
83 using Selection = selection_t<Config>;
84 static_assert(!std::is_void_v<Selection>, "The config has no method, operation or algorithm selector");
85 catalog_impl<Selection, Op, Config>(std::nullopt, {}, priority);
86 });
87 return *this;
88 }
OperationRegistry & catalog_impl(std::optional< E > only, std::function< std::shared_ptr< Op >(Config)> factory, int priority)
typename detail::UnwrapEnum< typename decltype(detail::selector_field< Config >())::type >::type selection_t
The enum a config selects its method from, or void when it has no selector.

References catalog_impl().

Referenced by MayaFlux::Yantra::make_default_registry().

Here is the call graph for this function:
Here is the caller graph for this function: