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 /* Transformations. */
32 void add_transformation (struct dataset *ds,
33 trns_proc_func *, trns_free_func *, void *);
34 void add_transformation_with_finalizer (struct dataset *ds,
37 trns_free_func *, void *);
38 size_t next_transformation (const struct dataset *ds);
40 bool proc_cancel_all_transformations (struct dataset *ds);
41 struct trns_chain *proc_capture_transformations (struct dataset *ds);
43 void proc_start_temporary_transformations (struct dataset *ds);
44 bool proc_in_temporary_transformations (const struct dataset *ds);
45 bool proc_make_temporary_transformations_permanent (struct dataset *ds);
46 bool proc_cancel_temporary_transformations (struct dataset *ds);
51 typedef void replace_source_callback (struct casereader *);
52 typedef void replace_dictionary_callback (struct dictionary *);
54 typedef void transformation_change_callback_func (bool non_empty, void *aux);
56 struct dataset * create_dataset (void);
58 void destroy_dataset (struct dataset *);
60 void dataset_add_transform_change_callback (struct dataset *,
61 transformation_change_callback_func *, void *);
63 void proc_discard_active_file (struct dataset *);
64 void proc_set_active_file (struct dataset *,
65 struct casereader *, struct dictionary *);
66 bool proc_set_active_file_data (struct dataset *, struct casereader *);
67 bool proc_has_active_file (const struct dataset *ds);
68 struct casereader *proc_extract_active_file_data (struct dataset *);
70 void proc_discard_output (struct dataset *ds);
72 bool proc_execute (struct dataset *ds);
73 time_t time_of_last_procedure (struct dataset *ds);
75 struct casereader *proc_open_filtering (struct dataset *, bool filter);
76 struct casereader *proc_open (struct dataset *);
77 bool proc_is_open (const struct dataset *);
78 bool proc_commit (struct dataset *);
80 bool dataset_end_of_command (struct dataset *);
82 struct dictionary *dataset_dict (const struct dataset *ds);
83 const struct casereader *dataset_source (const struct dataset *ds);
85 const struct ccase *lagged_case (const struct dataset *ds, int n_before);
86 void dataset_need_lag (struct dataset *ds, int n_before);
88 void dataset_set_callback (struct dataset *ds, void (*cb) (void *), void *);
90 void dataset_set_default_syntax_encoding (struct dataset *, const char *);
91 const char *dataset_get_default_syntax_encoding (const struct dataset *);
93 #endif /* procedure.h */