Ditto 4.11.1
 
Loading...
Searching...
No Matches
ditto::Diff Struct Reference

Represents differences between two arrays of items. More...

Classes

struct  Move
 Representation of a move from one index to another in a vector. More...
 

Public Member Functions

 Diff ()=default
 Default constructor.
 
 Diff (IndexSet insertions, IndexSet deletions, IndexSet updates, std::vector< Move > moves)
 Constructor with initial values.
 
 Diff (const Diff &other)=default
 
Diffoperator= (const Diff &other)=default
 
 Diff (Diff &&other)=default
 
Diffoperator= (Diff &&other)=default
 
bool operator== (const Diff &other) const
 Test for equality between two diffs.
 
bool operator!= (const Diff &other) const
 Test for inequality between two diffs.
 

Public Attributes

IndexSet insertions
 The set of indexes in the new array at which the new items have been inserted.
 
IndexSet deletions
 The set of indexes in the old array at which the items have been deleted.
 
IndexSet updates
 The set of indexes in the new array at which the items have been updated.
 
std::vector< Movemoves
 A set of objects each representing a move of an item from a particular index in the old array to a particular index in the new array.
 

Detailed Description

Represents differences between two arrays of items.

Create a diff between vectors of QueryResultItem elements by using Differ.