MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Reflect::TextCodec< T > Struct Template Reference

A numeric control slot from text: one number, true or false, a vector of two to four numbers, or a box of six. More...

#include <ControlValueText.hpp>

Inheritance diagram for MayaFlux::Reflect::TextCodec< T >:
Collaboration diagram for MayaFlux::Reflect::TextCodec< T >:

Static Public Member Functions

static bool decode (std::string_view source, T &value, TextError &error)
static bool decode (std::string_view source, T &value, TextError &error)
static bool decode (std::string_view source, T &value, TextError &error)
static bool decode (std::string_view source, T &value, TextError &error)

Static Public Attributes

static constexpr size_t extent = 0

Detailed Description

template<NumericControlSlot T>
requires ((std::is_integral_v<T> || std::is_floating_point_v<T>) && !std::same_as<T, bool>)
struct MayaFlux::Reflect::TextCodec< T >

A numeric control slot from text: one number, true or false, a vector of two to four numbers, or a box of six.

A GLM vector as whitespace separated finite components, one per component.

The count of numbers picks the shape: 1 a number, 2 to 4 a float vector, 6 a box of min then max. Any other count is Invalid. The slot takes the value as a new pending one, so the next due() is true. A slot cannot know an enum's type from text, so enumerators are written as their number.

Definition at line 22 of file ControlValueText.hpp.


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