Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
RuleStoreWatcher.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 <QObject>
7
8#include <memory>
9
10#include "phosphorrules_export.h"
11
12namespace PhosphorFsLoader {
14}
15
16namespace PhosphorRules {
17
18class RuleStore;
19
50class PHOSPHORRULES_EXPORT RuleStoreWatcher : public QObject
51{
52 Q_OBJECT
53
54public:
60 explicit RuleStoreWatcher(RuleStore& store, QObject* parent = nullptr);
62
65
78 void start();
79
80private:
81 // Forward-declared; defined in the .cpp so the fsloader dependency stays
82 // PRIVATE to this library (the header never includes a PhosphorFsLoader
83 // type). The out-of-line dtor below completes both unique_ptr members.
84 class ReloadStrategy;
85
86 RuleStore* m_store;
87 std::unique_ptr<ReloadStrategy> m_strategy;
88 std::unique_ptr<PhosphorFsLoader::WatchedDirectorySet> m_watcher;
89 bool m_started = false;
90};
91
92} // namespace PhosphorRules
Watcher + debounce + rescan scaffolding for filesystem-backed loaders.
Definition WatchedDirectorySet.h:131
RuleStoreWatcher & operator=(const RuleStoreWatcher &)=delete
RuleStoreWatcher(const RuleStoreWatcher &)=delete
RuleStoreWatcher(RuleStore &store, QObject *parent=nullptr)
void start()
Begin watching.
Persistent store for the unified Rule set.
Definition RuleStore.h:48
Definition ContainedFileReader.h:15
Definition ActionParams.h:25