NameGenerator.h header

#include <ew/app/NameGenerator.h>

Namespace ew::app

Enumerations

enum class NameStyle { Fantasy, Harsh, Elvish }

The flavour of generated name, which selects the syllable pools used to build it.

Functions

QString ew::app::generateName(NameStyle style, quint64 seed)

Generates one plausible fantasy name in style, using seed so the same style and seed always produce the same name (reproducible and unit-testable, and suitable for a shareable seed). The name is built from two or three syllables drawn from the style's onset/nucleus/coda pools and is capitalised. Always returns a non-empty name.

std::vector< QString > ew::app::generateNames(NameStyle style, int count, quint64 seed)

Generates count distinct-seed names in style: the name for seed, seed + 1, ... so a caller gets a deterministic batch to choose from. Returns an empty list when count is not positive.