1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2017 Free Software Foundation
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.
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.
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/>. */
17 #ifndef __PSPPIRE_DELIMITED_TEXT_H__
18 #define __PSPPIRE_DELIMITED_TEXT_H__
20 #include "libpspp/str.h"
21 #include "libpspp/string-array.h"
23 #include <glib-object.h>
30 #define PSPPIRE_TYPE_DELIMITED_TEXT (psppire_delimited_text_get_type ())
32 #define PSPPIRE_DELIMITED_TEXT(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
34 PSPPIRE_TYPE_DELIMITED_TEXT, PsppireDelimitedText))
36 #define PSPPIRE_DELIMITED_TEXT_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST ((klass), \
38 PSPPIRE_TYPE_DELIMITED_TEXT, \
39 PsppireDelimitedTextClass))
42 #define PSPPIRE_IS_DELIMITED_TEXT(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_TYPE_DELIMITED_TEXT))
45 #define PSPPIRE_IS_DELIMITED_TEXT_CLASS(klass) \
46 (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_TYPE_DELIMITED_TEXT))
48 #define PSPPIRE_DELIMITED_TEXT_GET_CLASS(obj) \
49 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50 PSPPIRE_TYPE_DELIMITED_TEXT, \
51 PsppireDelimitedTextClass))
53 struct _PsppireDelimitedText
59 /* The first line of the file to be modelled */
68 gboolean dispose_has_run ;
73 struct string_array cache;
74 struct data_parser *parser;
77 struct _PsppireDelimitedTextClass
79 GObjectClass parent_class;
83 typedef struct _PsppireDelimitedText PsppireDelimitedText;
84 typedef struct _PsppireDelimitedTextClass PsppireDelimitedTextClass;
86 GType psppire_delimited_text_get_type (void) G_GNUC_CONST;
87 PsppireDelimitedText *psppire_delimited_text_new (GtkTreeModel *);
89 const gchar *psppire_delimited_text_get_header_title (PsppireDelimitedText *file, gint column);
94 #endif /* __PSPPIRE_DELIMITED_TEXT_H__ */