Lumiera  0.pre.03
»edit your freedom«
ObjectTypeHandler< PAR > Class Template Reference

#include "lib/diff/tree-mutator-gen-node-binding.hpp"

Description

template<class PAR>
class lib::diff::anonymous_namespace{tree-mutator-gen-node-binding.hpp}::ObjectTypeHandler< PAR >

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::MutatortargetObj_
 
+ Inheritance diagram for ObjectTypeHandler< PAR >:
+ Collaboration diagram for ObjectTypeHandler< PAR >:

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