Rune Caster 1.0.0
Modern C++ Text Processing Framework
|
Case conversion spell using C++20 concepts. More...
#include <spell_core.hpp>
Public Types | |
enum class | CaseType { Lower , Upper , Title } |
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 | |
CaseConverter (CaseType case_type) | |
Construct a CaseConverter. | |
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. | |
CaseType | case_type () const noexcept |
Get the case type of this converter. | |
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) |
Case conversion spell using C++20 concepts.
Converts text case according to the specified transformation. Supports lowercase, uppercase, and titlecase transformations.
Definition at line 68 of file spell_core.hpp.
Definition at line 80 of file spell_core.hpp.
Definition at line 81 of file spell_core.hpp.
|
strong |
Enumerator | |
---|---|
Lower | Convert to lowercase. |
Upper | Convert to uppercase. |
Title | Convert to titlecase (first letter of each word) |
Definition at line 70 of file spell_core.hpp.
|
explicit |
Construct a CaseConverter.
case_type | The type of case conversion to perform |
Definition at line 17 of file case_converter.cpp.
|
inlinenoexcept |
Get the case type of this converter.
Definition at line 97 of file spell_core.hpp.
|
overridevirtual |
Get the spell's description.
Implements rune_caster::spell_base< RuneSequence >.
Definition at line 105 of file case_converter.cpp.
|
inlineoverridevirtual |
Get the spell's name.
Implements rune_caster::spell_base< RuneSequence >.
Definition at line 91 of file spell_core.hpp.
|
overridevirtual |
Apply the spell transformation.
input | The input data to transform |
Implements rune_caster::spell_base< RuneSequence >.
Definition at line 20 of file case_converter.cpp.