Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorAnimationShaders::ShaderProfileTree Class Reference

Hierarchical ShaderProfile storage with walk-up inheritance. More...

#include <phosphor-animation/include/PhosphorAnimation/ShaderProfileTree.h>

Public Member Functions

 ShaderProfileTree ()=default
 
 ShaderProfileTree (const ShaderProfileTree &)=default
 
ShaderProfileTreeoperator= (const ShaderProfileTree &)=default
 
 ShaderProfileTree (ShaderProfileTree &&)=default
 
ShaderProfileTreeoperator= (ShaderProfileTree &&)=default
 
ShaderProfile resolve (const QString &path) const
 
ShaderProfile directOverride (const QString &path) const
 
bool hasOverride (const QString &path) const
 
QStringList overriddenPaths () const
 
void setOverride (const QString &path, const ShaderProfile &profile)
 
bool clearOverride (const QString &path)
 
void clearAllOverrides ()
 
ShaderProfile baseline () const
 
void setBaseline (const ShaderProfile &profile)
 
QJsonObject toJson () const
 
bool operator== (const ShaderProfileTree &other) const
 
bool operator!= (const ShaderProfileTree &other) const
 

Static Public Member Functions

static ShaderProfileTree fromJson (const QJsonObject &obj)
 

Detailed Description

Hierarchical ShaderProfile storage with walk-up inheritance.

Same inheritance semantics as PhosphorAnimation::ProfileTree but carrying ShaderProfile payloads instead of Profile. The two trees share the same dot-path namespace (ProfilePaths) so a consumer can resolve both motion and shader config for the same event path.

Walk-up inheritance

For "window.open", resolve() walks:

  1. "window.open" (leaf override)
  2. "window" (category)
  3. "global" (baseline)
  4. library default (empty ShaderProfile — no effect)

At each step, engaged optionals replace the accumulator. Unset fields pass through.

Thread safety

Value type, not internally synchronized. Same as ProfileTree.

Constructor & Destructor Documentation

◆ ShaderProfileTree() [1/3]

PhosphorAnimationShaders::ShaderProfileTree::ShaderProfileTree ( )
default

◆ ShaderProfileTree() [2/3]

PhosphorAnimationShaders::ShaderProfileTree::ShaderProfileTree ( const ShaderProfileTree )
default

◆ ShaderProfileTree() [3/3]

PhosphorAnimationShaders::ShaderProfileTree::ShaderProfileTree ( ShaderProfileTree &&  )
default

Member Function Documentation

◆ baseline()

ShaderProfile PhosphorAnimationShaders::ShaderProfileTree::baseline ( ) const
inline

◆ clearAllOverrides()

void PhosphorAnimationShaders::ShaderProfileTree::clearAllOverrides ( )

◆ clearOverride()

bool PhosphorAnimationShaders::ShaderProfileTree::clearOverride ( const QString &  path)

◆ directOverride()

ShaderProfile PhosphorAnimationShaders::ShaderProfileTree::directOverride ( const QString &  path) const

◆ fromJson()

static ShaderProfileTree PhosphorAnimationShaders::ShaderProfileTree::fromJson ( const QJsonObject &  obj)
static

◆ hasOverride()

bool PhosphorAnimationShaders::ShaderProfileTree::hasOverride ( const QString &  path) const

◆ operator!=()

bool PhosphorAnimationShaders::ShaderProfileTree::operator!= ( const ShaderProfileTree other) const
inline

◆ operator=() [1/2]

ShaderProfileTree & PhosphorAnimationShaders::ShaderProfileTree::operator= ( const ShaderProfileTree )
default

◆ operator=() [2/2]

ShaderProfileTree & PhosphorAnimationShaders::ShaderProfileTree::operator= ( ShaderProfileTree &&  )
default

◆ operator==()

bool PhosphorAnimationShaders::ShaderProfileTree::operator== ( const ShaderProfileTree other) const

◆ overriddenPaths()

QStringList PhosphorAnimationShaders::ShaderProfileTree::overriddenPaths ( ) const

◆ resolve()

ShaderProfile PhosphorAnimationShaders::ShaderProfileTree::resolve ( const QString &  path) const

◆ setBaseline()

void PhosphorAnimationShaders::ShaderProfileTree::setBaseline ( const ShaderProfile profile)

◆ setOverride()

void PhosphorAnimationShaders::ShaderProfileTree::setOverride ( const QString &  path,
const ShaderProfile profile 
)

◆ toJson()

QJsonObject PhosphorAnimationShaders::ShaderProfileTree::toJson ( ) const

The documentation for this class was generated from the following file: