pxd: initial work
[pspp] / src / data / column.h
diff --git a/src/data/column.h b/src/data/column.h
new file mode 100644 (file)
index 0000000..164257f
--- /dev/null
@@ -0,0 +1,55 @@
+/* PSPP - a program for statistical analysis.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DATA_COLUMN_H
+#define DATA_COLUMN_H 1
+
+#include "libpspp/compiler.h"
+#include "data/case.h"
+#include "data/value.h"
+
+struct pxd;
+
+struct column *column_create (struct pxd *, int width);
+bool column_destroy (struct column *);
+
+int column_get_width (const struct column *);
+
+void column_read (const struct column *, casenumber, union value *);
+void column_write (struct column *, casenumber, const union value *);
+void column_append (struct column *, casenumber, const union value *);
+
+struct column *column_clone (const struct column *);
+void column_split (struct column *, struct column **, struct column **);
+struct column *column_rename (struct column *);
+void column_swap (struct column *, struct column *);
+
+bool column_is_empty (struct column *);
+
+bool column_error (const struct column *);
+void column_force_error (struct column *);
+const struct taint *column_get_taint (const struct column *);
+
+casenumber column_get_size (struct column *);
+casenumber column_count (const struct column *);
+void column_truncate (struct column *, casenumber);
+
+casenumber column_advance (struct column *, casenumber);
+
+struct pxd_object *column_save (const struct column *, struct pxd *);
+struct column *column_load (struct pxd_object *, const struct pxd *);
+
+#endif /* data/column.h */