Rune Caster 1.0.0
Modern C++ Text Processing Framework
|
A powerful chaining pipeline for applying spells to data. More...
#include <caster.hpp>
Public Types | |
using | value_type = T |
Public Member Functions | |
template<typename U> | |
constexpr | caster (U &&data) noexcept(std::is_nothrow_constructible_v< T, U >) |
Construct caster with data (C++20 perfect forwarding) | |
template<spell_for< T > Spell> | |
constexpr auto | cast (Spell &&spell) const &-> caster< typename Spell::output_type > |
Apply a spell and return a new caster with the result (C++20 concepts) | |
template<spell_for< T > Spell> | |
constexpr auto | cast (Spell &&spell) &&-> caster< typename Spell::output_type > |
Apply a spell and return a new caster (rvalue reference optimization) | |
constexpr const T & | result () const &noexcept |
Get the final result (const lvalue reference) | |
constexpr T && | result () &&noexcept |
Get the final result (rvalue reference - move semantics) | |
constexpr T | result () const && |
Get the final result (const rvalue reference) | |
constexpr const T & | operator* () const &noexcept |
Access the underlying data directly. | |
constexpr T && | operator* () &&noexcept |
constexpr | operator bool () const noexcept |
Check if the caster contains valid data (C++20 concepts) |
Static Public Member Functions | |
static constexpr const char * | type_name () noexcept |
Get type information at compile time. |
A powerful chaining pipeline for applying spells to data.
This class enables fluent interface for applying multiple spells in sequence: auto result = make_caster(data).cast(spell1).cast(spell2).result();
Uses C++20 features for perfect forwarding and type deduction.
T | The type of data being processed |
Definition at line 22 of file caster.hpp.
using rune_caster::caster< T >::value_type = T |
Definition at line 27 of file caster.hpp.
|
inlineexplicitconstexprnoexcept |
Construct caster with data (C++20 perfect forwarding)
Definition at line 33 of file caster.hpp.
|
inlineconstexpr |
Apply a spell and return a new caster (rvalue reference optimization)
Definition at line 56 of file caster.hpp.
|
inlineconstexpr |
Apply a spell and return a new caster with the result (C++20 concepts)
Uses C++20 concepts for compile-time validation and auto return type deduction. The return type is automatically deduced from the spell's output type.
Spell | The spell type to apply |
spell | The spell instance to apply |
Definition at line 48 of file caster.hpp.
|
inlineexplicitconstexprnoexcept |
Check if the caster contains valid data (C++20 concepts)
Definition at line 95 of file caster.hpp.
|
inlineconstexprnoexcept |
Definition at line 88 of file caster.hpp.
|
inlineconstexprnoexcept |
Access the underlying data directly.
Definition at line 84 of file caster.hpp.
|
inlineconstexprnoexcept |
Get the final result (rvalue reference - move semantics)
Definition at line 70 of file caster.hpp.
|
inlineconstexpr |
Get the final result (const rvalue reference)
Definition at line 77 of file caster.hpp.
|
inlineconstexprnoexcept |
Get the final result (const lvalue reference)
Definition at line 63 of file caster.hpp.
|
inlinestaticconstexprnoexcept |
Get type information at compile time.
Definition at line 108 of file caster.hpp.