QOF  0.7.5
QofBookMergeRule Struct Reference

One rule per entity, built into a single GList for the entire merge. More...

#include <qofbookmerge.h>

Data Fields

gboolean mergeAbsolute
 
double difference
 
gboolean updated
 
QofIdType mergeType
 
const gchar * mergeLabel
 
GSList * mergeParam
 
GSList * linkedEntList
 
QofBookMergeResult mergeResult
 
QofEntityimportEnt
 
QofEntitytargetEnt
 

Detailed Description

One rule per entity, built into a single GList for the entire merge.

All rules are stored in the GList QofBookMergeData::mergeList.

If the ::GUID matches it's the always same semantic object, regardless of whether other data fields are changed.
The boolean value mergeAbsolute defaults to FALSE

NOTE 1: if mergeAbsolute == TRUE, QofBookMergeResult will still be set to MERGE_UPDATE if parameters within this entity have been modified.

NOTE 2: qof_book_merge_param_as_string returns string representations of the parameter data that is causing a collision. These values must NOT be used to set the target parameter - the function is provided for display purposes only, to make it simple to explain the collision to the user using MERGE_REPORT and the dialogue.

The GHashTable targetTable in QofBookMergeRule will probably replace the GSList of the same name in mergeData.

Definition at line 164 of file qofbookmerge.h.

Field Documentation

double QofBookMergeRule::difference
          used to find best match in a book where no

GUID matches

Definition at line 169 of file qofbookmerge.h.

QofEntity* QofBookMergeRule::importEnt

pointer to the current entity in the import book.

Definition at line 189 of file qofbookmerge.h.

GSList* QofBookMergeRule::linkedEntList
                                  list of complex data types included in this object. 

linkedEntList contains an QofEntity reference to any parameter that is not one of the core QOF_TYPE data types. This entity must be already registered with QOF and the results of the comparison for the linked entity will modulate the mergeResult of this object. e.g. if an invoice is the same value but for a different customer, the invoice will be set to MERGE_REPORT and the customer as MERGE_NEW.

Definition at line 179 of file qofbookmerge.h.

gboolean QofBookMergeRule::mergeAbsolute
       Only set if the GUID of the import matches

the target

Definition at line 167 of file qofbookmerge.h.

const gchar* QofBookMergeRule::mergeLabel
    Descriptive label for the object type,

useful for the user intervention dialogue.

Definition at line 176 of file qofbookmerge.h.

GSList* QofBookMergeRule::mergeParam

list of usable parameters for the object type

Definition at line 178 of file qofbookmerge.h.

QofBookMergeResult QofBookMergeRule::mergeResult

result of comparison with main QofBook

Definition at line 188 of file qofbookmerge.h.

QofIdType QofBookMergeRule::mergeType
      type of comparison required for check for

collision

Definition at line 174 of file qofbookmerge.h.

QofEntity* QofBookMergeRule::targetEnt
      pointer to the corresponding entity in the

target book, if any.

Definition at line 190 of file qofbookmerge.h.

gboolean QofBookMergeRule::updated
          prevent the mergeResult from being

overwritten.

Definition at line 171 of file qofbookmerge.h.


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