Rune Caster 1.0.0
Modern C++ Text Processing Framework
|
Remove or keep only specific scripts using C++20 concepts. More...
#include <spell_filter.hpp>
Public Types | |
using | input_type = RuneSequence |
using | output_type = RuneSequence |
Public Types inherited from rune_caster::spell_base< RuneSequence > | |
using | input_type |
using | output_type |
Public Member Functions | |
ScriptFilter (std::vector< unicode::Script > scripts, bool remove=true) | |
Construct a ScriptFilter. | |
RuneSequence | operator() (const RuneSequence &input) const override |
Apply the spell transformation. | |
std::string | description () const override |
Get the spell's description. | |
std::string | name () const override |
Get the spell's name. | |
const std::vector< unicode::Script > & | filtered_scripts () const noexcept |
Get the filtered scripts. | |
bool | is_remove_mode () const noexcept |
Check if this filter is in remove mode. | |
Public Member Functions inherited from rune_caster::spell_base< RuneSequence > | |
virtual | ~spell_base ()=default |
Additional Inherited Members | |
Static Public Member Functions inherited from rune_caster::spell_base< RuneSequence > | |
static constexpr bool | can_process () noexcept |
Check if this spell can be applied to the given input type (C++20 concepts) | |
static constexpr bool | produces () noexcept |
Check if this spell produces the expected output type (C++20 concepts) | |
static constexpr const char * | input_type_name () noexcept |
Get input type name as compile-time string (C++20) | |
static constexpr const char * | output_type_name () noexcept |
Get output type name as compile-time string (C++20) |
Remove or keep only specific scripts using C++20 concepts.
This spell can either remove characters of specific Unicode scripts or keep only characters of specific scripts, depending on the mode.
Definition at line 60 of file spell_filter.hpp.
Definition at line 66 of file spell_filter.hpp.
Definition at line 67 of file spell_filter.hpp.
|
explicit |
Construct a ScriptFilter.
scripts | List of Unicode scripts to filter |
remove | If true, remove these scripts; if false, keep only these scripts |
|
overridevirtual |
Get the spell's description.
Implements rune_caster::spell_base< RuneSequence >.
|
inlinenoexcept |
Get the filtered scripts.
Definition at line 84 of file spell_filter.hpp.
|
inlinenoexcept |
Check if this filter is in remove mode.
Definition at line 92 of file spell_filter.hpp.
|
inlineoverridevirtual |
Get the spell's name.
Implements rune_caster::spell_base< RuneSequence >.
Definition at line 78 of file spell_filter.hpp.
|
overridevirtual |
Apply the spell transformation.
input | The input data to transform |
Implements rune_caster::spell_base< RuneSequence >.