Support moments
[pspp-builds.git] / src / data / procedure.h
index 835f883535f3a8c94733fa8f2786dadfb9f9fcd6..0e8d286bde1c481cb6b6b166009cdd7aa4f45dda 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -23,6 +23,7 @@
 #include <stdbool.h>
 
 #include <data/transformations.h>
+#include <data/casefile-factory.h>
 #include <libpspp/compiler.h>
 
 struct ccase;
@@ -57,10 +58,20 @@ bool proc_cancel_temporary_transformations (struct dataset *ds);
 \f
 /* Procedures. */
 
+struct dictionary ;
+typedef void  replace_source_callback (struct case_source *);
+typedef void  replace_dictionary_callback (struct dictionary *);
+
+
+struct dataset * create_dataset (struct casefile_factory *fact,
+                                replace_source_callback *,
+                                replace_dictionary_callback *
+                                );
 
-struct dataset *create_dataset (void);
 void destroy_dataset (struct dataset *);
 
+struct casefile_factory *dataset_get_casefile_factory (const struct dataset *);
+
 void proc_set_source (struct dataset *ds, struct case_source *);
 bool proc_has_source (const struct dataset *ds);
 
@@ -93,9 +104,11 @@ bool multipass_procedure_with_splits (struct dataset *ds,
                                           void *aux)
      WARN_UNUSED_RESULT;
 
-
-
 time_t time_of_last_procedure (struct dataset *ds);
+
+void proc_open (struct dataset *);
+bool proc_read (struct dataset *, struct ccase **);
+bool proc_close (struct dataset *);
 \f
 
 struct ccase *lagged_case (const struct dataset *ds, int n_before);
@@ -103,8 +116,6 @@ struct ccase *lagged_case (const struct dataset *ds, int n_before);
 inline struct dictionary *dataset_dict (const struct dataset *ds);
 inline void dataset_set_dict ( struct dataset *ds, struct dictionary *dict);
 
-inline int dataset_n_lag (const struct dataset *ds);
-inline void dataset_set_n_lag (struct dataset *ds, int n_lag);
-
+void dataset_need_lag (struct dataset *ds, int n_before);
 
 #endif /* procedure.h */