Orthography.h header
#include <ew/core/Orthography.h>
Namespace ew::core
GraphemeMapping struct
struct ew::core::GraphemeMapping
One phoneme's spelling within a romanization scheme: the IPA symbol that identifies the sound and the grapheme this scheme writes it with. A word is rendered in the scheme by replacing each of its sounds with the mapped grapheme; a sound the scheme does not remap keeps the inventory's default grapheme.
Members
QString ew::core::GraphemeMapping::phoneme
The IPA symbol of the sound this rule spells (the stable identity of the phoneme).
QString ew::core::GraphemeMapping::grapheme
How this scheme writes that sound (e.g. "sh" for /ʃ/, or "š" in a scholarly scheme).
bool ew::core::GraphemeMapping::operator==(const GraphemeMapping &other) const =default
Value equality over all fields.
Orthography struct
struct ew::core::Orthography
The orthography of a constructed language: the named romanization schemes it can be written in, layered over the sound inventory (whose per-phoneme grapheme is the implicit default spelling). This is the grapheme <-> phoneme layer that lets any generated or coined word be shown in IPA and in each scheme. Empty for a language that has only its default inventory spelling.
Members
std::vector<RomanizationScheme> ew::core::Orthography::schemes
The named romanization schemes, in display order.
QString ew::core::Orthography::defaultScheme
The name of the scheme to prefer when writing the language; empty means "use the inventory's own default graphemes".
bool ew::core::Orthography::isEmpty() const
Whether the orthography carries no schemes and no default (so the inventory spelling stands).
const RomanizationScheme * ew::core::Orthography::scheme(const QString &name) const
The scheme named name, or nullptr when no such scheme exists.
bool ew::core::Orthography::operator==(const Orthography &other) const =default
Value equality over all fields.
RomanizationScheme struct
struct ew::core::RomanizationScheme
A named way to write a constructed language in the Latin alphabet (or any target script): a set of per-phoneme GraphemeMapping rules. A language can carry several schemes – e.g. a reader-facing romanization and a strict scholarly transliteration – and any word can be shown in each.
Members
QString ew::core::RomanizationScheme::name
The scheme's display name (e.g. "Reader", "Scholarly", "ASCII").
std::vector<GraphemeMapping> ew::core::RomanizationScheme::mappings
The per-phoneme spelling rules, keyed by IPA symbol.
QString ew::core::RomanizationScheme::graphemeFor(const QString &phonemeIpa) const
The grapheme this scheme spells the phoneme phonemeIpa with, or an empty string when the scheme has no rule for it (so the caller falls back to the phoneme's default grapheme).
bool ew::core::RomanizationScheme::operator==(const RomanizationScheme &other) const =default
Value equality over all fields.