Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorTiles::AlgorithmRegistrar< T > Class Template Reference

Helper for static self-registration of built-in algorithms. More...

#include <PhosphorTiles/AlgorithmRegistry.h>

Public Member Functions

 AlgorithmRegistrar (const QString &id, int priority=100)
 Register an algorithm at static initialization time.

Detailed Description

template<typename T>
class PhosphorTiles::AlgorithmRegistrar< T >

Helper for static self-registration of built-in algorithms.

Use this in algorithm .cpp files to register at static initialization time. New algorithms can be added without modifying AlgorithmRegistry.

Usage in algorithm .cpp file:

namespace {
QLatin1String("my-algo"), 10); // priority 10
}
Helper for static self-registration of built-in algorithms.
Definition AlgorithmRegistry.h:207
Template Parameters
TAlgorithm class (must inherit from TilingAlgorithm)

Constructor & Destructor Documentation

◆ AlgorithmRegistrar()

template<typename T>
PhosphorTiles::AlgorithmRegistrar< T >::AlgorithmRegistrar ( const QString & id,
int priority = 100 )
inlineexplicit

Register an algorithm at static initialization time.

Parameters
idAlgorithm identifier (e.g. QLatin1String("master-stack"))
priorityRegistration order (lower = registered first, default 100)

The documentation for this class was generated from the following file: