1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2007 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/>. */
19 The procedure code has to resize cases provided by the active
20 file data source, to provide room for any other variables that
21 should go in the case, fill in the values of "left" variables,
22 and initialize the values of other non-left variable to zero
23 or spaces. Then, when we're done with that case, we have to
24 save the values of "left" variables to copy into the next case
25 read from the active file.
27 The caseinit data structure provides a little help for
28 tracking what data to initialize or to copy from case to
31 #ifndef DATA_CASEINIT_H
32 #define DATA_CASEINIT_H 1
37 /* Creation and destruction. */
38 struct caseinit *caseinit_create (void);
39 void caseinit_clear (struct caseinit *);
40 void caseinit_destroy (struct caseinit *);
42 /* Track data to be initialized. */
43 void caseinit_mark_as_preinited (struct caseinit *, const struct dictionary *);
44 void caseinit_mark_for_init (struct caseinit *, const struct dictionary *);
46 /* Initialize data and copy data from case to case. */
47 void caseinit_init_vars (const struct caseinit *, struct ccase *);
48 void caseinit_update_left_vars (struct caseinit *, const struct ccase *);
50 #endif /* data/caseinit.h */