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

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

Description

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

Note
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 287 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>
private

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

Constructor & Destructor Documentation

◆ DiffApplicator()

DiffApplicator ( TAR &  targetStructure)
inlineexplicit

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

Member Function Documentation

◆ consume()

void consume ( DIFF &&  diff)
inline

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

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ target_

Interpreter target_
private

Definition at line 292 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: