![]() |
Lumiera 0.pre.04
»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 126 of file tree-mutator-attribute-binding.hpp.
Public Member Functions | |
| virtual bool | matchSrc (GenNode const &spec) override |
| ensure the given spec is deemed appropriate at that point. | |
| virtual bool | acceptSrc (GenNode const &spec) override |
| accept status quo, after verifying the spec from the diff verb | |
| virtual void | skipSrc (GenNode const &refSpec) override |
| any reordering or deletion of object fields is prohibited | |
| virtual bool | findSrc (GenNode const &refSpec) override |
| 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. | |
Protected Member Functions | |
| AttributeBindingBase (BareEntryID attribID, PAR &&chain) | |
| bool | isApplicable (GenNode const &spec) |
| hard wired "selector predicate" for this binding layer. | |
| void | __ifApplicable_refuse_to (Literal oper, GenNode const &spec) |
Private Attributes | |
| BareEntryID | attribID_ |
|
inlineprotected |
Definition at line 133 of file tree-mutator-attribute-binding.hpp.
|
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 146 of file tree-mutator-attribute-binding.hpp.
References GenNode::idi, and GenNode::isNamed().
Here is the call graph for this function:
|
inlineprotected |
Definition at line 153 of file tree-mutator-attribute-binding.hpp.
References GenNode::idi.
|
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 172 of file tree-mutator-attribute-binding.hpp.
|
inlineoverridevirtual |
accept status quo, after verifying the spec from the diff verb
Definition at line 184 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 197 of file tree-mutator-attribute-binding.hpp.
|
inlineoverridevirtual |
Definition at line 204 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 220 of file tree-mutator-attribute-binding.hpp.
|
private |
Definition at line 130 of file tree-mutator-attribute-binding.hpp.
Inheritance diagram for AttributeBindingBase< PAR >:
Collaboration diagram for AttributeBindingBase< PAR >: