Lumiera  0.pre.03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 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

using Interpreter = DiffApplicationStrategy<TAR>

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

Constructor & Destructor Documentation

DiffApplicator ( TAR &  targetStructure)

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

Member Function Documentation

void consume ( DIFF &&  diff)

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

Interpreter target_

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: