Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ILayoutSourceFactory.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
6#include <phosphorlayoutapi_export.h>
7
8#include <PhosphorRegistry/IFactoryBase.h>
9
10#include <QString>
11
12#include <memory>
13
14namespace PhosphorLayout {
15
16class ILayoutSource;
17
45class PHOSPHORLAYOUTAPI_EXPORT ILayoutSourceFactory : public PhosphorRegistry::IFactoryBase
46{
47public:
49
53 virtual QString name() const = 0;
54
57 [[nodiscard]] QString id() const override
58 {
59 return name();
60 }
61 [[nodiscard]] QString displayName() const override
62 {
63 return name();
64 }
65
67 virtual std::unique_ptr<ILayoutSource> create() = 0;
68};
69
70} // namespace PhosphorLayout
Abstract factory for an ILayoutSource implementation.
Definition ILayoutSourceFactory.h:46
virtual std::unique_ptr< ILayoutSource > create()=0
Build a fresh source instance. Caller takes ownership.
virtual QString name() const =0
Stable identifier for diagnostics / logging.
QString id() const override
IFactoryBase: both the registry key and the UI label are the provider name (a layout source has a sin...
Definition ILayoutSourceFactory.h:57
QString displayName() const override
Definition ILayoutSourceFactory.h:61
Definition AlgorithmMetadata.h:10