Lumiera  0.pre.03
»edit your freedom«
DiffDetector< SEQ >::DiffFrame Class Reference

#include "lib/diff/list-diff-detector.hpp"

Description

template<class SEQ>
class lib::diff::DiffDetector< SEQ >::DiffFrame

A diff generation process is built on top of an "old" reference point and a "new" state of the underlying sequence.

Within this reference frame, an demand-driven evaluation of the differences is handed out to the client as an iterator. While consuming this evaluation process, both the old and the new version of the sequence will be traversed once. In case of re-orderings, a nested forward lookup similar to insertion sort will look for matches in the old sequence, rendering the whole evaluation quadratic in worst-case.

Definition at line 159 of file list-diff-detector.hpp.

Public Member Functions

 DiffFrame (Idx &current, Idx &&refPoint)
 
bool checkPoint () const
 
void iterNext ()
 
DiffStep & yield () const
 

Private Member Functions

bool canDelete () const
 
bool canInsert () const
 
bool canPick () const
 
Val const & consumeNew ()
 
Val const & consumeOld ()
 
DiffStep establishNextState ()
 
bool hasNew () const
 
bool hasOld () const
 
bool needFetch () const
 
Val const & newElm () const
 
bool obsoleted () const
 
Val const & oldElm () const
 

Private Attributes

DiffStep currentStep_
 
Idxnew_
 
size_t newHead_ =0
 
Idx old_
 
size_t oldHead_ =0
 

Static Private Attributes

static ListDiffLanguage< Val > token
 allocate static storage for the diff language token builder functions
 
+ Collaboration diagram for DiffDetector< SEQ >::DiffFrame:

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