Fixed bug reporting the significance of paired value t-test.
[pspp-builds.git] / src / ui / gui / psppire-case-file.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2006  Free Software Foundation
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
18 #ifndef __CASE_FILE_H__
19 #define __CASE_FILE_H__
20
21
22 #include <glib-object.h>
23 #include <glib.h>
24
25 #include <libpspp/str.h>
26 #include <data/case.h>
27
28
29
30 G_BEGIN_DECLS
31
32
33 /* --- type macros --- */
34 #define G_TYPE_PSPPIRE_CASE_FILE              (psppire_case_file_get_type ())
35 #define PSPPIRE_CASE_FILE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFile))
36 #define PSPPIRE_CASE_FILE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFileClass))
37 #define G_IS_PSPPIRE_CASE_FILE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_PSPPIRE_CASE_FILE))
38 #define G_IS_PSPPIRE_CASE_FILE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_PSPPIRE_CASE_FILE))
39 #define PSPPIRE_CASE_FILE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFileClass))
40
41
42
43
44 /* --- typedefs & structures --- */
45 typedef struct _PsppireCaseFile    PsppireCaseFile;
46 typedef struct _PsppireCaseFileClass PsppireCaseFileClass;
47
48 struct ccase;
49 struct casereader;
50
51 struct _PsppireCaseFile
52 {
53   GObject             parent;
54
55   /* <private> */
56   struct datasheet *datasheet;
57   gboolean      accessible;
58 };
59
60
61 struct _PsppireCaseFileClass
62 {
63   GObjectClass parent_class;
64 };
65
66
67 /* -- PsppireCaseFile --- */
68 GType          psppire_case_file_get_type (void);
69
70 PsppireCaseFile *psppire_case_file_new (struct casereader *);
71
72 gboolean psppire_case_file_insert_case (PsppireCaseFile *cf, struct ccase *c, casenumber row);
73
74 inline casenumber psppire_case_file_get_case_count (const PsppireCaseFile *cf);
75
76
77 union value * psppire_case_file_get_value (const PsppireCaseFile *cf,
78                                            casenumber, size_t idx,
79                                            union value *, int width);
80
81 struct fmt_spec;
82
83 gboolean psppire_case_file_data_in (PsppireCaseFile *cf, casenumber c, gint idx,
84                                    struct substring input,
85                                    const struct fmt_spec *);
86
87 gboolean psppire_case_file_set_value (PsppireCaseFile *cf, casenumber casenum,
88                                      gint idx, union value *v, gint width);
89
90 void psppire_case_file_clear (PsppireCaseFile *cf);
91
92
93 gboolean psppire_case_file_delete_cases (PsppireCaseFile *cf, casenumber n_rows,
94                                         casenumber first);
95
96 gboolean psppire_case_file_insert_values (PsppireCaseFile *cf, gint n_values, gint where);
97
98 struct case_ordering;
99
100 void psppire_case_file_sort (PsppireCaseFile *cf, struct case_ordering *);
101
102 gboolean psppire_case_file_get_case (const PsppireCaseFile *cf, 
103                                         casenumber casenum,
104                                         struct ccase *c);
105
106
107 struct casereader * psppire_case_file_make_reader (PsppireCaseFile *cf);
108
109
110 G_END_DECLS
111
112 #endif /* __PSPPIRE_CASE_FILE_H__ */