Gda.DataComparator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gda.DataComparator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(old_model, new_model)¶
- Parameters:
old_model (
Gda.DataModel
) – Data model to which the modifications should be appliednew_model (
Gda.DataModel
) – Target data model.
- Returns:
a new
Gda.DataComparator
object- Return type:
Creates a new comparator to compute the differences from old_model to new_model: if one applies all the computed differences (as
Gda.Diff
structures) to old_model, the resulting data model should have the same contents as new_model.
- compute_diff()¶
- Raises:
- Returns:
True
if all the differences have been successfully computed, andFalse
if an error occurred- Return type:
Actually computes the differences between the data models for which self is defined.
For each difference computed, stored in a
Gda.Diff
structure, the “diff-computed” signal is emitted. If one connects to this signal and returnsFalse
in the signal handler, then computing differences will be stopped and an error will be returned.
- get_diff(pos)¶
- Parameters:
pos (
int
) – the requested difference number (starting at 0)- Returns:
- Return type:
Get a pointer to the
Gda.Diff
structure representing the difference which number is pos
- get_n_diffs()¶
- Returns:
the number of computed differences
- Return type:
Get the number of differences as computed by the last time
Gda.DataComparator.compute_diff
() was called.
Signal Details¶
Property Details¶
- Gda.DataComparator.props.new_model¶
- Name:
new-model
- Type:
- Default Value:
- Flags:
- Gda.DataComparator.props.old_model¶
- Name:
old-model
- Type:
- Default Value:
- Flags: