Hierarchical profile storage with walk-up inheritance.
More...
#include <phosphor-animation/include/PhosphorAnimation/ProfileTree.h>
Hierarchical profile storage with walk-up inheritance.
Sparse map from dot-paths (see ProfilePaths.h) to Profile overrides plus a baseline. resolve() walks the chain and fills library defaults. Schema-less beyond the dot-path convention — plugins add paths freely. Not internally synchronized (value type).
◆ ProfileTree() [1/3]
| PhosphorAnimation::ProfileTree::ProfileTree |
( |
| ) |
|
|
default |
◆ ProfileTree() [2/3]
| PhosphorAnimation::ProfileTree::ProfileTree |
( |
const ProfileTree & |
| ) |
|
|
default |
◆ ProfileTree() [3/3]
| PhosphorAnimation::ProfileTree::ProfileTree |
( |
ProfileTree && |
| ) |
|
|
default |
◆ baseline()
| Profile PhosphorAnimation::ProfileTree::baseline |
( |
| ) |
const |
|
inline |
The baseline "global" profile — always participates in resolution.
◆ clearAllOverrides()
| void PhosphorAnimation::ProfileTree::clearAllOverrides |
( |
| ) |
|
◆ clearOverride()
| bool PhosphorAnimation::ProfileTree::clearOverride |
( |
const QString & |
path | ) |
|
Remove the override at path. Returns true if one was removed.
◆ directOverride()
| Profile PhosphorAnimation::ProfileTree::directOverride |
( |
const QString & |
path | ) |
const |
Direct override at path without walking parents.
Use hasOverride() to distinguish absent from all-unset.
◆ fromJson()
Parse from JSON.
Invalid entries fall back to default Profile; empty paths are dropped. registry forwarded to Profile::fromJson.
◆ hasOverride()
| bool PhosphorAnimation::ProfileTree::hasOverride |
( |
const QString & |
path | ) |
const |
◆ operator!=()
| bool PhosphorAnimation::ProfileTree::operator!= |
( |
const ProfileTree & |
other | ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
| bool PhosphorAnimation::ProfileTree::operator== |
( |
const ProfileTree & |
other | ) |
const |
◆ overriddenPaths()
| QStringList PhosphorAnimation::ProfileTree::overriddenPaths |
( |
| ) |
const |
Every path with a direct override, in insertion order.
◆ resolve()
| Profile PhosphorAnimation::ProfileTree::resolve |
( |
const QString & |
path | ) |
const |
Resolve effective Profile for path (walks parents, fills defaults).
Curve may still be null if no chain member supplied one.
◆ setBaseline()
| void PhosphorAnimation::ProfileTree::setBaseline |
( |
const Profile & |
profile | ) |
|
◆ setOverride()
| void PhosphorAnimation::ProfileTree::setOverride |
( |
const QString & |
path, |
|
|
const Profile & |
profile |
|
) |
| |
Install an explicit override. Empty path is rejected (no-op).
◆ toJson()
| QJsonObject PhosphorAnimation::ProfileTree::toJson |
( |
| ) |
const |
Serialize the entire tree.
Overrides stored as JSON array (not object) so insertion order round-trips losslessly.
The documentation for this class was generated from the following file: