Rune Caster 1.0.0
Modern C++ Text Processing Framework
Loading...
Searching...
No Matches
rune_caster::spell::core::WhitespaceTokenizer Class Reference

Simple whitespace tokenizer Splits input RuneSequence into tokens separated by Unicode whitespace. More...

#include <spell_token.hpp>

Inheritance diagram for rune_caster::spell::core::WhitespaceTokenizer:
Collaboration diagram for rune_caster::spell::core::WhitespaceTokenizer:

Public Types

using input_type = RuneSequence
using output_type = std::vector<RuneSequence>
Public Types inherited from rune_caster::spell_base< RuneSequence, std::vector< RuneSequence > >
using input_type
using output_type

Public Member Functions

output_type operator() (const input_type &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.
Public Member Functions inherited from rune_caster::spell_base< RuneSequence, std::vector< RuneSequence > >
virtual ~spell_base ()=default

Additional Inherited Members

Static Public Member Functions inherited from rune_caster::spell_base< RuneSequence, std::vector< 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)

Detailed Description

Simple whitespace tokenizer Splits input RuneSequence into tokens separated by Unicode whitespace.

Definition at line 15 of file spell_token.hpp.

Member Typedef Documentation

◆ input_type

◆ output_type

Member Function Documentation

◆ description()

std::string rune_caster::spell::core::WhitespaceTokenizer::description ( ) const
inlineoverridevirtual

Get the spell's description.

Returns
A human-readable description of what the spell does

Implements rune_caster::spell_base< RuneSequence, std::vector< RuneSequence > >.

Definition at line 22 of file spell_token.hpp.

◆ name()

std::string rune_caster::spell::core::WhitespaceTokenizer::name ( ) const
inlineoverridevirtual

Get the spell's name.

Returns
A string identifying the spell

Implements rune_caster::spell_base< RuneSequence, std::vector< RuneSequence > >.

Definition at line 23 of file spell_token.hpp.

◆ operator()()

WhitespaceTokenizer::output_type rune_caster::spell::core::WhitespaceTokenizer::operator() ( const input_type & input) const
overridevirtual

Apply the spell transformation.

Parameters
inputThe input data to transform
Returns
The transformed output

Implements rune_caster::spell_base< RuneSequence, std::vector< RuneSequence > >.

Definition at line 7 of file whitespace_tokenizer.cpp.


The documentation for this class was generated from the following files: