2 PSPPIRE --- A Graphical User Interface for PSPP
3 Copyright (C) 2006 Free Software Foundation
4 Written by John Darrington
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __PSPPIRE_VARIABLE_H__
23 #define __PSPPIRE_VARIABLE_H__
25 #include <glib-object.h>
28 #include <data/variable.h>
29 #include "psppire-dict.h"
31 /* Don't use any of these members.
32 Use accessor functions instead.
34 struct PsppireVariable
39 /* The dictionary to which this variable belongs */
45 gboolean psppire_variable_set_name(struct PsppireVariable *pv, const gchar *text);
47 gboolean psppire_variable_set_columns(struct PsppireVariable *pv, gint columns);
48 gboolean psppire_variable_set_label(struct PsppireVariable *pv, const gchar *label);
49 gboolean psppire_variable_set_format(struct PsppireVariable *pv, struct fmt_spec *fmt);
50 gboolean psppire_variable_set_decimals(struct PsppireVariable *pv, gint decimals);
51 gboolean psppire_variable_set_width(struct PsppireVariable *pv, gint width);
52 gboolean psppire_variable_set_alignment(struct PsppireVariable *pv, gint align);
53 gboolean psppire_variable_set_measure(struct PsppireVariable *pv, gint measure);
54 gboolean psppire_variable_set_value_labels(const struct PsppireVariable *pv,
55 const struct val_labs *vls);
57 gboolean psppire_variable_set_missing(const struct PsppireVariable *pv,
58 const struct missing_values *miss);
60 gboolean psppire_variable_set_print_spec(const struct PsppireVariable *pv, struct fmt_spec fmt);
61 gboolean psppire_variable_set_write_spec(const struct PsppireVariable *pv, struct fmt_spec fmt);
63 gboolean psppire_variable_set_type(struct PsppireVariable *pv, int type);
67 const struct fmt_spec *psppire_variable_get_write_spec(const struct PsppireVariable *pv);
68 const gchar * psppire_variable_get_name(const struct PsppireVariable *pv);
70 gint psppire_variable_get_columns(const struct PsppireVariable *pv);
72 const gchar * psppire_variable_get_label(const struct PsppireVariable *pv);
75 const struct missing_values *psppire_variable_get_missing
76 (const struct PsppireVariable *pv);
78 const struct val_labs * psppire_variable_get_value_labels
79 (const struct PsppireVariable *pv);
81 gint psppire_variable_get_alignment(const struct PsppireVariable *pv);
83 gint psppire_variable_get_measure(const struct PsppireVariable *pv);
85 gint psppire_variable_get_index(const struct PsppireVariable *pv);
87 gint psppire_variable_get_type(const struct PsppireVariable *pv);
89 gint psppire_variable_get_width(const struct PsppireVariable *pv);
93 #endif /* __PSPPIRE_VARIABLE_H__ */