Field Iterator support
[Data Fields]


Detailed Description

For target fields grouped in a table-like organization, the matcher is used to iterate/select rows. It acts as a "WHERE" term that can be used to match a target row for target updates. The 'matcher' value is updated for every source row, which is why the matcher value can be used to select a target row.


Functions

void dui_field_iter_pre (DuiField *matcher, gboolean do_clear)
gboolean dui_field_iter_next (DuiField *matcher)
void dui_field_iter_column (DuiField *target_column, DuiField *matcher)
void dui_field_iter_post (DuiField *matcher)
gpointer get_gobj_field (DuiField *f)


Function Documentation

void dui_field_iter_column ( DuiField *  target_column,
DuiField *  matcher 
)

This routine will be called once for every target column in the target row. The matcher will be the same field as previously set up with dui_field_iter_next().

Definition at line 104 of file duifield.c.

00105 {
00106     if (NULL == target) return;
00107     if (NULL == target->iter_column) return;
00108     (target->iter_column) (target, matcher);
00109 }

gboolean dui_field_iter_next ( DuiField *  matcher  ) 

The dui_field_iter_next() will be called once for each row of the source table. The value passed in 'matcher' will be based on the matching term in the source table. It should return TRUE if the source is to be mapped to the target, else it should return FALSE.

Definition at line 96 of file duifield.c.

00097 {
00098     if (NULL == matcher) return TRUE;
00099     if (NULL == matcher->iter_next) return TRUE;
00100     return (matcher->iter_next) (matcher);
00101 }

void dui_field_iter_post ( DuiField *  matcher  ) 

Called at the end of the source row iteration.

Definition at line 112 of file duifield.c.

00113 {
00114     if (NULL == matcher) return;
00115     if (NULL == matcher->iter_post) return;
00116     (matcher->iter_post) (matcher);
00117 }

void dui_field_iter_pre ( DuiField *  matcher,
gboolean  do_clear 
)

The dui_field_iter_pre() will be called before the start of the source row iteration. Set the do_clear flag to true if you want to clear the table before you fill it in. Otherwise, if you are matching only certain rows, you probably don't want to clear the table.

Definition at line 88 of file duifield.c.

00089 {
00090     if (NULL == matcher) return;
00091     if (NULL == matcher->iter_pre) return;
00092     (matcher->iter_pre) (matcher, do_clear);
00093 }


Generated on Tue Apr 29 21:27:54 2008 for estron by  doxygen 1.5.5