- /* Reads all the cases and calls WRITE_CASE passing the given
- AUX data for each one. */
- void (*read) (struct case_source *, write_case_func *, write_case_data);
+ /* Returns the exact number of cases that READ will pass to
+ WRITE_CASE, if known, or -1 otherwise. */
+ int (*count) (const struct case_source *);
+
+ /* Reads the cases one by one into C and for each one calls
+ WRITE_CASE passing the given AUX data. */
+ void (*read) (struct case_source *,
+ struct ccase *c,
+ write_case_func *write_case, write_case_data aux);