Optional plug-in for custom group name semantics. More...
#include <phosphor-config/include/PhosphorConfig/IGroupPathResolver.h>
Public Member Functions | |
| virtual | ~IGroupPathResolver ()=default |
| virtual std::optional< QStringList > | toJsonPath (const QString &groupName) const =0 |
| Map an external group name to its JSON path segments. | |
| virtual QStringList | reservedRootKeys () const |
| Extra top-level JSON keys that this resolver owns. | |
| virtual QStringList | enumerate (const QJsonObject &) const |
| Enumerate every external group name currently represented in the backing JSON document under this resolver's reserved keys. | |
Protected Member Functions | |
| IGroupPathResolver ()=default | |
Optional plug-in for custom group name semantics.
PhosphorConfig's bundled backends understand two group forms out of the box:
Consumers that need additional name conventions (e.g. "ZoneSelector:ScreenId" for per-screen overrides) can register an IGroupPathResolver on the backend. The resolver intercepts group names before they reach storage and maps them to an internal JSON path, and vice versa for enumeration.
A resolver is queried first. If toJsonPath returns std::nullopt the backend falls back to the built-in dot-path resolution.
|
virtualdefault |
|
protecteddefault |
|
inlinevirtual |
Enumerate every external group name currently represented in the backing JSON document under this resolver's reserved keys.
Results are appended to IBackend::groupList() output.
|
inlinevirtual |
Extra top-level JSON keys that this resolver owns.
Excluded from the default dot-path enumeration so they don't appear twice in groupList().
|
pure virtual |
Map an external group name to its JSON path segments.
Return std::nullopt to decline — the backend will use dot-path rules. Return an empty list to signal "malformed, refuse to read or write".