output-item: Collapse the inheritance hierarchy into a single struct.
[pspp] / src / output / charts / roc-chart.c
index 5af8f27ff35ee93eeb8ede9086ce738e71d24944..24fb5cde444b594cbd9e33ea82dfaf3c19efa1bd 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2011 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
 
 #include <config.h>
 
-#include <output/charts/roc-chart.h>
+#include "output/charts/roc-chart.h"
 
-#include <output/chart-item-provider.h>
-#include <data/casereader.h>
-#include <language/stats/roc.h>
+#include "data/casereader.h"
+#include "language/stats/roc.h"
+#include "output/chart-provider.h"
 
-#include "xalloc.h"
+#include "gl/xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -31,7 +31,7 @@ struct roc_chart *
 roc_chart_create (bool reference)
 {
   struct roc_chart *rc = xmalloc (sizeof *rc);
-  chart_item_init (&rc->chart_item, &roc_chart_class, NULL);
+  chart_init (&rc->chart, &roc_chart_class, NULL);
   rc->reference = reference;
   rc->vars = NULL;
   rc->n_vars = 0;
@@ -54,9 +54,9 @@ roc_chart_add_var (struct roc_chart *rc, const char *var_name,
 }
 
 static void
-roc_chart_destroy (struct chart_item *chart_item)
+roc_chart_destroy (struct chart *chart)
 {
-  struct roc_chart *rc = UP_CAST (chart_item, struct roc_chart, chart_item);
+  struct roc_chart *rc = UP_CAST (chart, struct roc_chart, chart);
   size_t i;
 
   for (i = 0; i < rc->n_vars; i++)
@@ -69,7 +69,7 @@ roc_chart_destroy (struct chart_item *chart_item)
   free (rc);
 }
 
-const struct chart_item_class roc_chart_class =
+const struct chart_class roc_chart_class =
   {
     roc_chart_destroy
   };