Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/tree-mutator-attribute-binding.hpp"
Generic behaviour of any binding to object fields (attributes).
Since object fields as such are part of the class definition, a diff will never be able to add, insert, delete or re-order fields. Thus we do not need to keep track of an "old" and "new" order; rather there is always one single fixed element present to work on.
Definition at line 125 of file tree-mutator-attribute-binding.hpp.
Public Member Functions | |
virtual bool | accept_until (GenNode const &spec) override |
there is no real support for navigating to a 'position', since attribute / data field binding has no notion of ordering. More... | |
virtual bool | acceptSrc (GenNode const &spec) override |
accept status quo, after verifying the spec from the diff verb | |
virtual bool | findSrc (GenNode const &refSpec) override |
virtual bool | matchSrc (GenNode const &spec) override |
ensure the given spec is deemed appropriate at that point. More... | |
virtual void | skipSrc (GenNode const &refSpec) override |
any reordering or deletion of object fields is prohibited More... | |
Protected Member Functions | |
AttributeBindingBase (BareEntryID attribID, PAR &&chain) | |
void | __ifApplicable_refuse_to (Literal oper, GenNode const &spec) |
bool | isApplicable (GenNode const &spec) |
hard wired "selector predicate" for this binding layer. More... | |
Private Attributes | |
BareEntryID | attribID_ |
|
inlineprotected |
hard wired "selector predicate" for this binding layer.
We handle only mutation operations pertaining attributes which additionally match the key defined at binding time. Any other operations are passed down the chain.
spec | target specification given within the diff verb |
Definition at line 145 of file tree-mutator-attribute-binding.hpp.
|
inlineoverridevirtual |
ensure the given spec is deemed appropriate at that point.
Due to the hard wired nature of an object field binding, this can only be verified passively: a spec targeted at an unknown attribute will be rejected. But since there is no notion of "ordering" for (object) data fields, we can not verify the diff's completeness.
Definition at line 171 of file tree-mutator-attribute-binding.hpp.
|
inlineoverridevirtual |
any reordering or deletion of object fields is prohibited
error::Logic | when this binding layer becomes responsible for handling the given diff spec, because a proper diff must be arranged in a way not to ask this binding to "reorder" a field from an existing class definition. |
Definition at line 196 of file tree-mutator-attribute-binding.hpp.
|
inlineoverridevirtual |
there is no real support for navigating to a 'position', since attribute / data field binding has no notion of ordering.
An attempt to fast-forward to "the end" is tolerated though.
error::Logic | when this binding becomes responsible and a request to navigate to some specific attribute is detected |
Ref::END
or Ref::ATTRIBS
is tolerated and implemented as NOP (since there is no 'position' incorporated into the binding implementation. Definition at line 219 of file tree-mutator-attribute-binding.hpp.
References Ref::ATTRIBS, and Ref::END.