Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/tree-mutator-gen-node-binding.hpp"
Helper to deal with the magic "object type" attribute.
Our meta representation for "objects" as Record<GenNode> currently does not support metadata as a dedicated scope (as it should). Rather, the only relevant piece of metadata, an object type ID field, is treated with hard wired code and passed as a magic attribute with key "type". Unfortunately this means for our task here that a plain flat standard binding for the collection of attributes does not suffice – we need to intercept and grab assignments to this magic attribute to forward them to the dedicated type field found on diff::Record.
Since we build two layers of bindings, with the attributes necessarily on top, this special treatment can be layered as a decorator on top, just overriding the two operations which get to handle assignment to attribute values.
Definition at line 91 of file tree-mutator-gen-node-binding.hpp.
Public Member Functions | |
ObjectTypeHandler (Rec::Mutator &targetObj, PAR &&chain) | |
virtual bool | assignElm (GenNode const &spec) override |
virtual bool | injectNew (GenNode const &spec) override |
Private Attributes | |
Rec::Mutator & | targetObj_ |