1 /* PSPP - computes sample statistics.
2 Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 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, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef TRANSFORMATIONS_H
20 #define TRANSFORMATIONS_H 1
25 typedef unsigned long casenumber ;
27 /* trns_proc_func return values. */
30 TRNS_CONTINUE = -1, /* Continue to next transformation. */
31 TRNS_DROP_CASE = -2, /* Drop this case. */
32 TRNS_ERROR = -3, /* A serious error, so stop the procedure. */
33 TRNS_NEXT_CASE = -4, /* Skip to next case. INPUT PROGRAM only. */
34 TRNS_END_FILE = -5 /* End of input. INPUT PROGRAM only. */
38 typedef void trns_finalize_func (void *);
39 typedef int trns_proc_func (void *, struct ccase *, casenumber);
40 typedef bool trns_free_func (void *);
42 /* Transformation chains. */
44 struct trns_chain *trns_chain_create (void);
45 void trns_chain_finalize (struct trns_chain *);
46 bool trns_chain_destroy (struct trns_chain *);
48 bool trns_chain_is_empty (const struct trns_chain *);
50 void trns_chain_append (struct trns_chain *, trns_finalize_func *,
51 trns_proc_func *, trns_free_func *, void *);
52 size_t trns_chain_next (struct trns_chain *);
53 enum trns_result trns_chain_execute (struct trns_chain *, struct ccase *,
54 const size_t *case_nr);
56 void trns_chain_splice (struct trns_chain *, struct trns_chain *);
58 #endif /* transformations.h */