Rune Caster 1.0.0
Modern C++ Text Processing Framework
Loading...
Searching...
No Matches
rune_caster::spell_factory Namespace Reference

Functions

template<typename Lambda>
auto make_spell (Lambda &&lambda, std::string name="CustomSpell", std::string description="Custom transformation")
 Create a spell from a lambda.
template<typename RuneTransform>
auto per_rune_spell (RuneTransform &&rune_transform, std::string name="PerRuneSpell", std::string description="Per-rune transformation")
 Create a spell that applies a transformation to each rune.
template<typename Predicate>
auto filter_spell (Predicate &&predicate, std::string name="FilterSpell", std::string description="Rune filtering")
 Create a spell that filters runes based on a predicate.

Function Documentation

◆ filter_spell()

template<typename Predicate>
auto rune_caster::spell_factory::filter_spell ( Predicate && predicate,
std::string name = "FilterSpell",
std::string description = "Rune filtering" )

Create a spell that filters runes based on a predicate.

Parameters
predicateFunction that returns true for runes to keep
nameOptional name
descriptionOptional description
Returns
The spell object

Definition at line 246 of file spell_unified.hpp.

◆ make_spell()

template<typename Lambda>
auto rune_caster::spell_factory::make_spell ( Lambda && lambda,
std::string name = "CustomSpell",
std::string description = "Custom transformation" )

Create a spell from a lambda.

Parameters
lambdaThe lambda function
nameOptional name
descriptionOptional description
Returns
The spell object
Examples
Basic.

Definition at line 211 of file spell_unified.hpp.

◆ per_rune_spell()

template<typename RuneTransform>
auto rune_caster::spell_factory::per_rune_spell ( RuneTransform && rune_transform,
std::string name = "PerRuneSpell",
std::string description = "Per-rune transformation" )

Create a spell that applies a transformation to each rune.

Parameters
rune_transformFunction that transforms individual runes
nameOptional name
descriptionOptional description
Returns
The spell object

Definition at line 225 of file spell_unified.hpp.