Lumiera  0.pre.03
DiffApplicator< TAR > Class Template Reference

#include "lib/diff/diff-language.hpp"


template<class TAR>
class lib::diff::DiffApplicator< TAR >

generic builder to apply a diff description to a given target data structure.

The usage pattern is as follows #. construct a DiffApplicator instance, wrapping the target data #. feed the diff (sequence of diff verbs) to the consume function #. the wrapped target data has been altered, to conform to the given diff

a suitable DiffApplicationStrategy will be picked, based on the type of the concrete target sequence given at construction. (Effectively this means you need a suitable DiffApplicationStrategy specialisation, e.g. for a target sequence within a vector)

Definition at line 290 of file diff-language.hpp.

Public Member Functions

 DiffApplicator (TAR &targetStructure)
template<class DIFF >
void consume (DIFF &&diff)

Private Types

using Interpreter = DiffApplicationStrategy< TAR >

Private Attributes

Interpreter target_

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable ()=default
 NonCopyable (NonCopyable const &)=delete
 ~NonCopyable ()=default
NonCopyableoperator= (NonCopyable const &)=delete

Member Typedef Documentation

◆ Interpreter

using Interpreter = DiffApplicationStrategy<TAR>

Definition at line 293 of file diff-language.hpp.

Constructor & Destructor Documentation

◆ DiffApplicator()

DiffApplicator ( TAR &  targetStructure)

Definition at line 299 of file diff-language.hpp.

Member Function Documentation

◆ consume()

void consume ( DIFF &&  diff)

Definition at line 305 of file diff-language.hpp.

Referenced by Nexus::change(), MutationMessage_test::demonstrate_treeApplication(), DiffIgnoreChanges_test::fail_or_ignore(), DiffIgnoreChanges_test::fish_for_content(), DiffListApplication_test::run(), DiffTreeApplication_test::run(), and DiffComplexApplication_test::run().

+ Here is the caller graph for this function:

Member Data Documentation

◆ target_

Interpreter target_

Definition at line 295 of file diff-language.hpp.

+ Inheritance diagram for DiffApplicator< TAR >:
+ Collaboration diagram for DiffApplicator< TAR >:

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