Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/list-diff-application.hpp"
concrete strategy to apply a list diff to a target sequence given as vector.
The implementation swaps aside the existing content of the target sequence and then consumes it step by step, while building up the altered content within the previously emptied target vector. Whenever possible, elements are moved directly to the target location.
lumiera::error::State | when diff application fails due to the target sequence being different than assumed by the given diff. |
Definition at line 72 of file list-diff-application.hpp.
Public Member Functions | |
DiffApplicationStrategy (vector< E > &targetVector) | |
void | completeDiffApplication () |
void | initDiffApplication () |
Public Member Functions inherited from ListDiffInterpreter< E > | |
virtual | ~ListDiffInterpreter () |
this is an interface | |
Private Types | |
using | Iter = typename Vec::iterator |
using | Vec = vector< E, ARGS... > |
Private Member Functions | |
void | __expect_found (E const &elm, Iter const &targetPos) |
void | __expect_further_elements (E const &elm) |
void | __expect_in_target (E const &elm, Literal oper) |
void | del (E const &elm) override |
bool | end_of_target () |
void | find (E const &elm) override |
void | ins (E const &elm) override |
void | pick (E const &elm) override |
void | skip (E const &elm) override |
Private Attributes | |
Vec | orig_ |
Iter | pos_ |
Vec & | seq_ |