Skip to content
Phosphor
/
API Reference
Search
PlasmaZones
Libraries
Guides
Brand
Palette
About
GitHub
Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
LayoutSourceBundle.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 <
PhosphorLayoutApi/CompositeLayoutSource.h
>
9
#include <
PhosphorLayoutApi/ILayoutSource.h
>
10
#include <
PhosphorLayoutApi/ILayoutSourceFactory.h
>
11
#include <
PhosphorLayoutApi/LayoutSourceProviderRegistry.h
>
12
13
#include <QHash>
14
15
#include <memory>
16
#include <vector>
17
18
namespace
PhosphorLayout
{
19
45
class
PHOSPHORLAYOUTAPI_EXPORT
LayoutSourceBundle
46
{
47
public
:
48
LayoutSourceBundle
();
49
~LayoutSourceBundle
();
50
51
LayoutSourceBundle
(
const
LayoutSourceBundle
&) =
delete
;
52
LayoutSourceBundle
&
operator=
(
const
LayoutSourceBundle
&) =
delete
;
53
LayoutSourceBundle
(
LayoutSourceBundle
&&) noexcept;
54
LayoutSourceBundle
& operator=(
LayoutSourceBundle
&&) noexcept;
55
66
void
addFactory(std::unique_ptr<
ILayoutSourceFactory
> factory);
67
77
void
build();
78
117
void
buildFromRegistered(const
FactoryContext
& ctx);
118
121
CompositeLayoutSource
* composite()
const
122
{
123
return
m_composite.get();
124
}
125
144
ILayoutSource
*
source
(
const
QString& name)
const
;
145
146
private
:
147
std::vector<std::unique_ptr<ILayoutSourceFactory>> m_factories;
148
std::vector<std::unique_ptr<ILayoutSource>> m_sources;
154
std::vector<QString> m_sourceNames;
160
QHash<QString, std::size_t> m_sourceIndex;
166
std::unique_ptr<CompositeLayoutSource> m_composite;
167
};
168
169
}
// namespace PhosphorLayout
CompositeLayoutSource.h
ILayoutSourceFactory.h
ILayoutSource.h
LayoutSourceProviderRegistry.h
PhosphorLayout::CompositeLayoutSource
Aggregates multiple ILayoutSource implementations behind one ILayoutSource interface.
Definition
CompositeLayoutSource.h:39
PhosphorLayout::FactoryContext
Service registry passed to a layout-source-provider builder so it can pull whatever registries / depe...
Definition
LayoutSourceProviderRegistry.h:66
PhosphorLayout::ILayoutSourceFactory
Abstract factory for an ILayoutSource implementation.
Definition
ILayoutSourceFactory.h:37
PhosphorLayout::ILayoutSource
Abstract producer of LayoutPreview values.
Definition
ILayoutSource.h:48
PhosphorLayout::LayoutSourceBundle
Owning bundle that assembles a list of ILayoutSourceFactory instances into a single CompositeLayoutSo...
Definition
LayoutSourceBundle.h:46
PhosphorLayout::LayoutSourceBundle::LayoutSourceBundle
LayoutSourceBundle(LayoutSourceBundle &&) noexcept
PhosphorLayout::LayoutSourceBundle::LayoutSourceBundle
LayoutSourceBundle(const LayoutSourceBundle &)=delete
PhosphorLayout::LayoutSourceBundle::~LayoutSourceBundle
~LayoutSourceBundle()
PhosphorLayout::LayoutSourceBundle::operator=
LayoutSourceBundle & operator=(const LayoutSourceBundle &)=delete
PhosphorLayout::LayoutSourceBundle::LayoutSourceBundle
LayoutSourceBundle()
PhosphorLayout::LayoutSourceBundle::source
ILayoutSource * source(const QString &name) const
Borrowed access to the source produced by the factory whose name() matches name.
PhosphorLayout
Definition
AlgorithmMetadata.h:10
phosphor-layout-api
include
PhosphorLayoutApi
LayoutSourceBundle.h
Generated by
1.9.8