eradiate.scenes.core.SceneElement#
- class eradiate.scenes.core.SceneElement(id=None)[source]#
Bases:
ABCAbstract base class for all scene elements.
- Parameters:
id (
str, optional) – Identifier of the current scene element.- Fields:
Warning
All subclasses must have a hash, thus
eqmust beFalse(see attrs docs on hashing for a complete explanation). This is required in order to make it possible to use caching decorators on instance methods.Notes
The default implementation of
__attrs_post_init__()executes theupdate()method.- abstract traverse(callback)[source]#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal) – Callback data structure storing the collected data.
- update()[source]#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property params#
- Returns:
dict[str,UpdateParameter] orNone– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also