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

◆ select_operation()

template<typename Config, typename E>
requires std::is_enum_v<E>
Config MayaFlux::Yantra::select_operation ( E selection,
Config config )

Set the config's method selector from its corresponding operation enum.

Definition at line 110 of file GrammarHelper.hpp.

111{
112 if constexpr (requires { config.method = selection; }) {
113 config.method = selection;
114 } else if constexpr (requires { config.operation = selection; }) {
115 config.operation = selection;
116 } else if constexpr (requires { config.algorithm = selection; }) {
117 config.algorithm = selection;
118 } else {
119 static_assert(always_false_v<Config>, "The config has no selector accepting this enum");
120 }
121 return config;
122}
std::optional< std::pair< size_t, size_t > > selection(const EditableText &s)
The selected byte range as (begin, end), begin first whichever end the cursor is, or nullopt when not...
Definition TextEdit.cpp:5

Referenced by MayaFlux::Yantra::OperationRegistry::catalog_impl().

Here is the caller graph for this function: