• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • WordSource
  • libname::WordSource Class

    class libname::WordSource

    Interface for providing words to name generators. More...

    Header: #include <WordSource>
    Since: 1.0
    Inherited By:

    libname::CustomWordSource and libname::ResourceWordSource

    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, and libname::NameGenerator.