Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/list-diff-detector.hpp"
Detect and describe changes in a monitored data sequence.
The DiffDetector takes snapshot(s) of the observed data, to find all differences between the last snapshot and the current state. Whenever such a "List Diff" is pulled, a new baseline snapshot is taken automatically. The description of all changes can be retrieved from the returned diff iterator, as a sequence of diff verbs
Definition at line 78 of file list-diff-detector.hpp.
Public Types | |
using | Diff = lib::IterStateWrapper< DiffFrame > |
Diff is a iterator to yield a sequence of DiffStep elements. | |
Public Member Functions | |
DiffDetector (SEQ const &refSeq) | |
bool | isChanged () const |
does the current state of the underlying sequence differ from the state embodied into the last reference snapshot taken? More... | |
Diff | pullUpdate () |
Diff generation core operation. More... | |
Classes | |
class | DiffFrame |
A diff generation process is built on top of an "old" reference point and a "new" state of the underlying sequence. More... | |
Private Types | |
using | DiffStep = typename ListDiffLanguage< Val >::DiffStep |
using | Idx = IndexTable< Val > |
using | Val = typename SEQ::value_type |
Private Attributes | |
SEQ const & | currentData_ |
Idx | refIdx_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
|
inline |
does the current state of the underlying sequence differ from the state embodied into the last reference snapshot taken?
Definition at line 109 of file list-diff-detector.hpp.
|
inline |
Diff generation core operation.
Take a snapshot of the current state of the underlying sequence and establish a frame to find the differences to the previously captured old state. This possible difference evaluation is embodied into a Diff iterator and handed over to the client, while the snapshot of the current state becomes the new reference point from now on.
Definition at line 138 of file list-diff-detector.hpp.