1 #ifndef _GNM_CRITERIA_H_
2 #define _GNM_CRITERIA_H_
7 #include <number-match.h>
13 #include <goffice/goffice.h>
19 typedef struct _GnmCriteria GnmCriteria
;
21 typedef gboolean (*GnmCriteriaFunc
) (GnmValue
const *x
, GnmCriteria
*crit
);
25 int column
; /* absolute */
26 CellIterFlags iter_flags
;
27 GODateConventions
const *date_conv
;
30 unsigned ref_count
; /* for boxed type */
32 GType
gnm_criteria_get_type (void);
35 int row
; /* absolute */
39 GnmCriteria
*parse_criteria (GnmValue
const *crit_val
,
40 GODateConventions
const *date_conv
,
42 void gnm_criteria_unref (GnmCriteria
*criteria
);
43 void free_criterias (GSList
*criterias
);
44 GSList
*find_rows_that_match (Sheet
*sheet
, int first_col
,
45 int first_row
, int last_col
, int last_row
,
46 GSList
*criterias
, gboolean unique_only
);
47 GSList
*parse_database_criteria (GnmEvalPos
const *ep
,
48 GnmValue
const *database
, GnmValue
const *criteria
);
49 int find_column_of_field (GnmEvalPos
const *ep
,
50 GnmValue
const *database
, GnmValue
const *field
);
52 GnmValue
*gnm_ifs_func (GPtrArray
*data
, GPtrArray
*crits
, GnmValue
const *vals
,
53 float_range_function_t fun
, GnmStdError err
,
54 GnmEvalPos
const *ep
, CollectFlags flags
);