libname::WordSource

Interface for providing words to name generators.

Declared in src/libs/libid/name/WordSource.hpp
Inherited By libname::CustomWordSource and libname::ResourceWordSource
Group name

Detailed description

WordSource abstracts away where the per-language word lists come from: Qt resources, on-disk files, or programmatic word vectors all expose the same query surface. Generators consume a WordSourcePointer (= QSharedPointer<WordSource>) so the underlying source can be hot-swapped without touching the generator.

Implementations must be re-entrant — callers may pick random words from multiple threads simultaneously.

Header-only abstract class; this companion .qdoc keeps qdoc informed about the interface (the interface docstring used to live in the header, which the project's docstring placement policy reserves for in-source comments only).

See also libname::ResourceWordSource, libname::CustomWordSource, libname::NameGenerator.

In this section