2 PSPPIRE --- A Graphical User Interface for PSPP
3 Copyright (C) 2006 Free Software Foundation
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef __CASE_FILE_H__
22 #define __CASE_FILE_H__
25 #include <glib-object.h>
28 #include <libpspp/str.h>
35 /* --- type macros --- */
36 #define G_TYPE_PSPPIRE_CASE_FILE (psppire_case_file_get_type ())
37 #define PSPPIRE_CASE_FILE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFile))
38 #define PSPPIRE_CASE_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFileClass))
39 #define G_IS_PSPPIRE_CASE_FILE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), G_TYPE_PSPPIRE_CASE_FILE))
40 #define G_IS_PSPPIRE_CASE_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G_TYPE_PSPPIRE_CASE_FILE))
41 #define PSPPIRE_CASE_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_PSPPIRE_CASE_FILE, PsppireCaseFileClass))
46 /* --- typedefs & structures --- */
47 typedef struct _PsppireCaseFile PsppireCaseFile;
48 typedef struct _PsppireCaseFileClass PsppireCaseFileClass;
54 struct _PsppireCaseFile
58 struct casefile *flexifile;
62 struct _PsppireCaseFileClass
64 GObjectClass parent_class;
68 /* -- PsppireCaseFile --- */
69 GType psppire_case_file_get_type (void);
71 PsppireCaseFile *psppire_case_file_new (gint var_cnt);
72 PsppireCaseFile* psppire_case_file_new_from_flexifile (struct flexifile *ff);
75 gboolean psppire_case_file_insert_case (PsppireCaseFile *cf, struct ccase *c, gint row);
77 gint psppire_case_file_get_case_count (const PsppireCaseFile *cf);
80 const union value * psppire_case_file_get_value (const PsppireCaseFile *cf,
85 gboolean psppire_case_file_data_in (PsppireCaseFile *cf, gint c, gint idx,
86 struct substring input,
87 const struct fmt_spec *);
89 gboolean psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum,
90 gint idx, union value *v, gint width);
92 void psppire_case_file_clear (PsppireCaseFile *cf);
95 gboolean psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_rows,
98 gboolean psppire_case_file_insert_values (PsppireCaseFile *cf, gint n_values, gint before);
100 struct sort_criteria;
101 void psppire_case_file_sort (PsppireCaseFile *cf, const struct sort_criteria *);
103 gboolean psppire_case_file_get_case (const PsppireCaseFile *cf, gint casenum,
109 #endif /* __PSPPIRE_CASE_FILE_H__ */