![]() |
Lumiera 0.pre.04
»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.
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... | |
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? | |
| Diff | pullUpdate () |
| Diff generation core operation. | |
Private Types | |
| using | Val = SEQ::value_type |
| using | Idx = IndexTable< Val > |
| using | DiffStep = ListDiffLanguage< Val >::DiffStep |
Private Attributes | |
| Idx | refIdx_ |
| SEQ const & | currentData_ |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inlineexplicit |
Definition at line 98 of file list-diff-detector.hpp.
|
private |
Definition at line 81 of file list-diff-detector.hpp.
|
private |
Definition at line 82 of file list-diff-detector.hpp.
|
private |
Definition at line 88 of file list-diff-detector.hpp.
| using Diff = lib::IterStateWrapper<DiffFrame> |
Diff is a iterator to yield a sequence of DiffStep elements.
Definition at line 121 of file list-diff-detector.hpp.
|
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.
References IndexTable< VAL >::begin(), DiffDetector< SEQ >::currentData_, IndexTable< VAL >::end(), and DiffDetector< SEQ >::refIdx_.
Here is the call graph for this function:
|
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.
References DiffDetector< SEQ >::currentData_, and DiffDetector< SEQ >::refIdx_.
|
private |
Definition at line 84 of file list-diff-detector.hpp.
Referenced by DiffDetector< SEQ >::isChanged(), and DiffDetector< SEQ >::pullUpdate().
|
private |
Definition at line 85 of file list-diff-detector.hpp.
Referenced by DiffDetector< SEQ >::isChanged(), and DiffDetector< SEQ >::pullUpdate().
Inheritance diagram for DiffDetector< SEQ >:
Collaboration diagram for DiffDetector< SEQ >: