1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #include "data/transformations.h"
24 #include "libpspp/compiler.h"
30 struct dataset *dataset_create (void);
31 void dataset_destroy (struct dataset *);
33 void dataset_clear (struct dataset *);
35 struct dictionary *dataset_dict (const struct dataset *);
36 void dataset_set_dict (struct dataset *, struct dictionary *);
38 const struct casereader *dataset_source (const struct dataset *);
39 bool dataset_has_source (const struct dataset *ds);
40 bool dataset_set_source (struct dataset *, struct casereader *);
41 struct casereader *dataset_steal_source (struct dataset *);
43 void dataset_set_callback (struct dataset *, void (*cb) (void *), void *);
45 void dataset_set_default_syntax_encoding (struct dataset *, const char *);
46 const char *dataset_get_default_syntax_encoding (const struct dataset *);
48 /* Transformations. */
50 void add_transformation (struct dataset *ds,
51 trns_proc_func *, trns_free_func *, void *);
52 void add_transformation_with_finalizer (struct dataset *ds,
55 trns_free_func *, void *);
56 size_t next_transformation (const struct dataset *ds);
58 bool proc_cancel_all_transformations (struct dataset *ds);
59 struct trns_chain *proc_capture_transformations (struct dataset *ds);
61 void proc_start_temporary_transformations (struct dataset *ds);
62 bool proc_in_temporary_transformations (const struct dataset *ds);
63 bool proc_make_temporary_transformations_permanent (struct dataset *ds);
64 bool proc_cancel_temporary_transformations (struct dataset *ds);
68 typedef void transformation_change_callback_func (bool non_empty, void *aux);
71 void dataset_add_transform_change_callback (struct dataset *,
72 transformation_change_callback_func *, void *);
74 void proc_discard_output (struct dataset *ds);
76 bool proc_execute (struct dataset *ds);
77 time_t time_of_last_procedure (struct dataset *ds);
79 struct casereader *proc_open_filtering (struct dataset *, bool filter);
80 struct casereader *proc_open (struct dataset *);
81 bool proc_is_open (const struct dataset *);
82 bool proc_commit (struct dataset *);
84 bool dataset_end_of_command (struct dataset *);
86 const struct ccase *lagged_case (const struct dataset *ds, int n_before);
87 void dataset_need_lag (struct dataset *ds, int n_before);
89 #endif /* dataset.h */