#include "libpspp/hmap.h"
#include "output/table.h"
+struct ccase;
+struct dictionary;
struct pivot_value;
struct variable;
union value;
{
PIVOT_AXIS_LAYER,
PIVOT_AXIS_ROW,
- PIVOT_AXIS_COLUMN,
-
- PIVOT_N_AXES
+ PIVOT_AXIS_COLUMN
+#define PIVOT_N_AXES 3
};
const char *pivot_axis_type_to_string (enum pivot_axis_type);
void pivot_dimension_dump (const struct pivot_dimension *,
const struct pivot_table *, int indentation);
\f
+struct pivot_splits *pivot_splits_create (struct pivot_table *,
+ enum pivot_axis_type,
+ const struct dictionary *);
+void pivot_splits_destroy (struct pivot_splits *);
+
+void pivot_splits_new_split (struct pivot_splits *, const struct ccase *);
+size_t pivot_splits_get_dindexes (const struct pivot_splits *,
+ size_t *dindexes);
+
+void pivot_splits_put1 (struct pivot_splits *, struct pivot_table *,
+ size_t idx1, struct pivot_value *);
+void pivot_splits_put2 (struct pivot_splits *, struct pivot_table *,
+ size_t idx1, size_t idx2, struct pivot_value *);
+void pivot_splits_put3 (struct pivot_splits *, struct pivot_table *,
+ size_t idx1, size_t idx2, size_t idx3,
+ struct pivot_value *);
+void pivot_splits_put4 (struct pivot_splits *, struct pivot_table *,
+ size_t idx1, size_t idx2, size_t idx3, size_t idx4,
+ struct pivot_value *);
+
+size_t pivot_splits_count (const struct pivot_splits *);
+\f
/* A pivot_category is a leaf (a category) or a group:
- For a leaf, neither index is SIZE_MAX.
void pivot_table_unref (struct pivot_table *);
bool pivot_table_is_shared (const struct pivot_table *);
+/* Titles. */
+void pivot_table_set_title (struct pivot_table *, struct pivot_value *);
+void pivot_table_set_subtype (struct pivot_table *, struct pivot_value *);
+void pivot_table_set_corner_text (struct pivot_table *, struct pivot_value *);
+void pivot_table_set_caption (struct pivot_table *, struct pivot_value *);
+
/* Axes. */
void pivot_table_swap_axes (struct pivot_table *,
enum pivot_axis_type, enum pivot_axis_type);
/* Values from variable names. */
struct pivot_value *pivot_value_new_variable (const struct variable *);
+struct pivot_value *pivot_value_new_variable__ (const char *name,
+ const char *label);
/* Values from text strings. */
struct pivot_value *pivot_value_new_text (const char *);