dfde1bffc0b3802d553c7717da47b82a4300908b
[pspp-builds.git] / src / data / vardict.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
3
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.
8
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.
13
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/>. */
16
17 #ifndef DATA_VARDICT_H
18 #define DATA_VARDICT_H 1
19
20 /* Interface between dictionary and variable code.
21    This header file should only be included by variable.c and
22    dictionary.c. */
23
24 struct dictionary ;
25
26 /* Dictionary data stored in variable. */
27 struct vardict_info
28   {
29     int dict_index;     /* Dictionary index containing the variable. */
30     int case_index;     /* Index into case of variable data. */
31     struct dictionary *dict;  /* The dictionary containing the variable */
32   };
33
34 /* Called by dictionary code, defined in variable.c. */
35 const struct vardict_info *var_get_vardict (const struct variable *);
36 void var_set_vardict (struct variable *, const struct vardict_info *);
37 bool var_has_vardict (const struct variable *);
38 void var_clear_vardict (struct variable *);
39
40
41 /* Called by variable.c, defined in dictionary.c. */
42 void dict_var_changed (const struct variable *v);
43 void dict_var_resized (const struct variable *v, int delta);
44 void dict_var_display_width_changed (const struct variable *v);
45
46 #endif /* data/vardict.h */