/* PSPP - a program for statistical analysis.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2010 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 published by
/* Case initializer.
The procedure code has to resize cases provided by the active
- file data source, to provide room for any other variables that
+ dataset data source, to provide room for any other variables that
should go in the case, fill in the values of "left" variables,
and initialize the values of other non-left variable to zero
or spaces. Then, when we're done with that case, we have to
save the values of "left" variables to copy into the next case
- read from the active file.
+ read from the active dataset.
The caseinit data structure provides a little help for
tracking what data to initialize or to copy from case to
#ifndef DATA_CASEINIT_H
#define DATA_CASEINIT_H 1
+struct caseproto;
struct dictionary;
struct ccase;
/* Creation and destruction. */
struct caseinit *caseinit_create (void);
+struct caseinit *caseinit_clone (struct caseinit *);
void caseinit_clear (struct caseinit *);
void caseinit_destroy (struct caseinit *);
/* Initialize data and copy data from case to case. */
void caseinit_init_vars (const struct caseinit *, struct ccase *);
-void caseinit_update_left_vars (struct caseinit *, const struct ccase *);
+void caseinit_save_left_vars (struct caseinit *, const struct ccase *);
+void caseinit_restore_left_vars (struct caseinit *, struct ccase *);
+
+/* Translate. */
+struct casereader *caseinit_translate_casereader_to_init_vars (
+ struct caseinit *, const struct caseproto *output_proto,
+ struct casereader *);
#endif /* data/caseinit.h */