Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
TestWireTap< PAR > Class Template Reference

#include "lib/diff/test-mutation-target.hpp"

Description

template<class PAR>
class lib::diff::anonymous_namespace{test-mutation-target.hpp}::TestWireTap< PAR >

Definition at line 350 of file test-mutation-target.hpp.

Public Member Functions

 TestWireTap (Target &dummy, PAR &&chain)
 
virtual void init () override
 
virtual bool injectNew (GenNode const &n) override
 record in the test target that a new child element is being inserted at current position
 
virtual bool hasSrc () override
 
virtual bool matchSrc (GenNode const &n) override
 ensure the next recorded source element matches on a formal level with given spec
 
virtual void skipSrc (GenNode const &n) override
 skip next recorded src element without touching it
 
virtual bool acceptSrc (GenNode const &n) override
 accept existing element, when matching the given spec
 
virtual bool findSrc (GenNode const &ref) override
 locate designated element and accept it at current position
 
virtual bool accept_until (GenNode const &spec)
 repeatedly accept, until after the designated location
 
virtual bool assignElm (GenNode const &spec)
 locate element already accepted into the target sequence and assign the designated payload value to it.
 
virtual bool mutateChild (GenNode const &spec, TreeMutator::Handle targetBuff)
 locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer
 
virtual bool completeScope ()
 verify all our pending (old) source elements where mentioned.
 

Private Types

using Target = TestMutationTarget
 
using Iter = TestMutationTarget::iterator
 

Private Attributes

Targettarget_
 
Iter pos_
 

Constructor & Destructor Documentation

◆ TestWireTap()

template<class PAR >
TestWireTap ( Target dummy,
PAR &&  chain 
)
inline

Definition at line 360 of file test-mutation-target.hpp.

Member Typedef Documentation

◆ Target

template<class PAR >
using Target = TestMutationTarget
private

Definition at line 353 of file test-mutation-target.hpp.

◆ Iter

template<class PAR >
using Iter = TestMutationTarget::iterator
private

Definition at line 354 of file test-mutation-target.hpp.

Member Function Documentation

◆ init()

template<class PAR >
virtual void init ( )
inlineoverridevirtual

Definition at line 371 of file test-mutation-target.hpp.

References lib::diff::anonymous_namespace{test-mutation-target.hpp}::identify(), and TestMutationTarget::initMutation().

+ Here is the call graph for this function:

◆ injectNew()

template<class PAR >
virtual bool injectNew ( GenNode const &  n)
inlineoverridevirtual

record in the test target that a new child element is being inserted at current position

Remarks
TestWireTap adapter together with TestMutationTarget maintain a "shadow copy" of the data and apply the detected diff against this internal copy. This allows to verify what's going on

Definition at line 385 of file test-mutation-target.hpp.

References TestMutationTarget::inject().

+ Here is the call graph for this function:

◆ hasSrc()

template<class PAR >
virtual bool hasSrc ( )
inlineoverridevirtual

Definition at line 392 of file test-mutation-target.hpp.

◆ matchSrc()

template<class PAR >
virtual bool matchSrc ( GenNode const &  n)
inlineoverridevirtual

ensure the next recorded source element matches on a formal level with given spec

Definition at line 401 of file test-mutation-target.hpp.

References GenNode::matches().

+ Here is the call graph for this function:

◆ skipSrc()

template<class PAR >
virtual void skipSrc ( GenNode const &  n)
inlineoverridevirtual

skip next recorded src element without touching it

Definition at line 409 of file test-mutation-target.hpp.

References TestMutationTarget::logSkip().

+ Here is the call graph for this function:

◆ acceptSrc()

template<class PAR >
virtual bool acceptSrc ( GenNode const &  n)
inlineoverridevirtual

accept existing element, when matching the given spec

Definition at line 422 of file test-mutation-target.hpp.

References TestMutationTarget::inject(), and GenNode::matches().

+ Here is the call graph for this function:

◆ findSrc()

template<class PAR >
virtual bool findSrc ( GenNode const &  ref)
inlineoverridevirtual

locate designated element and accept it at current position

Definition at line 436 of file test-mutation-target.hpp.

References GenNode::idi, and TestMutationTarget::inject().

+ Here is the call graph for this function:

◆ accept_until()

template<class PAR >
virtual bool accept_until ( GenNode const &  spec)
inlinevirtual

repeatedly accept, until after the designated location

Definition at line 449 of file test-mutation-target.hpp.

References BareEntryID::getSym(), GenNode::idi, TestMutationTarget::inject(), and GenNode::matches().

+ Here is the call graph for this function:

◆ assignElm()

template<class PAR >
virtual bool assignElm ( GenNode const &  spec)
inlinevirtual

locate element already accepted into the target sequence and assign the designated payload value to it.

Definition at line 483 of file test-mutation-target.hpp.

References GenNode::idi, TestMutationTarget::locate(), TestMutationTarget::logAssignment(), and lib::diff::anonymous_namespace{test-mutation-target.hpp}::render().

+ Here is the call graph for this function:

◆ mutateChild()

template<class PAR >
virtual bool mutateChild ( GenNode const &  spec,
TreeMutator::Handle  targetBuff 
)
inlinevirtual

locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer

Definition at line 499 of file test-mutation-target.hpp.

References PlantingHandle< BA, DEFAULT >::emplace(), GenNode::idi, TestMutationTarget::locate(), and TestMutationTarget::logMutation().

+ Here is the call graph for this function:

◆ completeScope()

template<class PAR >
virtual bool completeScope ( )
inlinevirtual

verify all our pending (old) source elements where mentioned.

Note
allows chained "onion-layers" to clean-up and verify.

Definition at line 519 of file test-mutation-target.hpp.

References TestMutationTarget::logScopeCompletion().

+ Here is the call graph for this function:

Member Data Documentation

◆ target_

template<class PAR >
Target& target_
private

Definition at line 356 of file test-mutation-target.hpp.

◆ pos_

template<class PAR >
Iter pos_
private

Definition at line 357 of file test-mutation-target.hpp.

+ Inheritance diagram for TestWireTap< PAR >:
+ Collaboration diagram for TestWireTap< PAR >:

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