6#include "phosphortiles_export.h"
10#include <QLatin1String>
13#include <QMutexLocker>
17#include <QVariantList>
144 void registerBuiltInAlgorithms();
153 std::unique_ptr<Impl> m_impl;
Algorithm-layer constants for the autotile/tile primitives.
AlgorithmRegistrar(const QString &id, int priority=100)
Register an algorithm at static initialization time.
Definition AlgorithmRegistry.h:215
bool hasAlgorithm(const QString &id) const override
Whether an algorithm is registered under id.
static constexpr int PreviewCanvasSize
Canvas edge length used by every preview path that converts algorithm output into relative (0....
Definition AlgorithmRegistry.h:125
void cleanup()
Early cleanup of all registered algorithms.
void setPreviewParams(const AlgorithmPreviewParams ¶ms) override
Apply the user-configured tiling parameters.
QStringList availableAlgorithms() const override
All registered algorithm ids.
QString defaultAlgorithmId() const override
Get the library's recommended default algorithm ID.
Definition AlgorithmRegistry.h:106
TilingAlgorithm * defaultAlgorithm() const override
Convenience: the registry's recommended default algorithm.
bool unregisterAlgorithm(const QString &id) override
Unregister and delete the algorithm with id.
const AlgorithmPreviewParams & previewParams() const noexcept override
The currently-configured preview parameters.
TilingAlgorithm * algorithm(const QString &id) const override
Resolve an algorithm by its stable id.
static QString staticDefaultAlgorithmId()
Static accessor for the same id defaultAlgorithmId() returns.
AlgorithmRegistry(QObject *parent=nullptr)
Composition roots (daemon, editor, settings, tests) construct their own registry instance.
bool registerAlgorithm(const QString &id, TilingAlgorithm *algorithm) override
Register an algorithm under id.
QList< TilingAlgorithm * > allAlgorithms() const override
Every registered algorithm pointer.
ITileAlgorithmRegistry(QObject *parent=nullptr)
Abstract base class for tiling algorithms.
Definition TilingAlgorithm.h:54
Definition AutotileEngine.h:52
PHOSPHORTILES_EXPORT QList< PendingAlgorithmRegistration > & pendingAlgorithmRegistrations()
Global list of pending algorithm registrations.
PHOSPHORTILES_EXPORT class QMutex & pendingAlgorithmRegistrationsMutex()
Mutex protecting pendingAlgorithmRegistrations().
User-configured tiling parameters that affect algorithm preview generation.
Definition AlgorithmPreviewParams.h:20
Pending algorithm registration data.
Definition AlgorithmRegistry.h:160
QString id
Definition AlgorithmRegistry.h:161
std::function< TilingAlgorithm *()> factory
Definition AlgorithmRegistry.h:163
int priority
Definition AlgorithmRegistry.h:162