X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fscatterplot.h;h=cf549e9c1db5daaded9c43a3d96f432fd7123ecb;hb=063c177c238c65c15c906507acb1d4199c220ab5;hp=a78227dabc622badc9c8c765a328fffb63652d92;hpb=7b6472a0d9e5a6654c528da2b04a4692d1bff718;p=pspp diff --git a/src/output/charts/scatterplot.h b/src/output/charts/scatterplot.h index a78227dabc..cf549e9c1d 100644 --- a/src/output/charts/scatterplot.h +++ b/src/output/charts/scatterplot.h @@ -17,7 +17,7 @@ #ifndef OUTPUT_CHARTS_SCATTERPLOT_H #define OUTPUT_CHARTS_SCATTERPLOT_H 1 -#include "output/chart-item.h" +#include "output/chart.h" /* Indices for the scatterplot_proto members */ enum @@ -30,7 +30,7 @@ enum /* A scatterplot. */ struct scatterplot_chart { - struct chart_item chart_item; + struct chart chart; struct casereader *data; struct variable *byvar; char *xlabel; @@ -53,17 +53,17 @@ scatterplot_create (struct casereader *, const char *label, double xmin, double xmax, double ymin, double ymax); -/* This boilerplate for scatterplot_chart, a subclass of chart_item, was +/* This boilerplate for scatterplot_chart, a subclass of chart, was autogenerated by mk-class-boilerplate. */ #include #include "libpspp/cast.h" -extern const struct chart_item_class scatterplot_chart_class; +extern const struct chart_class scatterplot_chart_class; /* Returns true if SUPER is a scatterplot_chart, otherwise false. */ static inline bool -is_scatterplot_chart (const struct chart_item *super) +is_scatterplot_chart (const struct chart *super) { return super->class == &scatterplot_chart_class; } @@ -71,24 +71,24 @@ is_scatterplot_chart (const struct chart_item *super) /* Returns SUPER converted to scatterplot_chart. SUPER must be a scatterplot_chart, as reported by is_scatterplot_chart. */ static inline struct scatterplot_chart * -to_scatterplot_chart (const struct chart_item *super) +to_scatterplot_chart (const struct chart *super) { assert (is_scatterplot_chart (super)); - return UP_CAST (super, struct scatterplot_chart, chart_item); + return UP_CAST (super, struct scatterplot_chart, chart); } -/* Returns INSTANCE converted to chart_item. */ -static inline struct chart_item * +/* Returns INSTANCE converted to chart. */ +static inline struct chart * scatterplot_chart_super (const struct scatterplot_chart *instance) { - return CONST_CAST (struct chart_item *, &instance->chart_item); + return CONST_CAST (struct chart *, &instance->chart); } /* Increments INSTANCE's reference count and returns INSTANCE. */ static inline struct scatterplot_chart * scatterplot_chart_ref (const struct scatterplot_chart *instance) { - return to_scatterplot_chart (chart_item_ref (&instance->chart_item)); + return to_scatterplot_chart (chart_ref (&instance->chart)); } /* Decrements INSTANCE's reference count, then destroys INSTANCE if @@ -96,7 +96,7 @@ scatterplot_chart_ref (const struct scatterplot_chart *instance) static inline void scatterplot_chart_unref (struct scatterplot_chart *instance) { - chart_item_unref (&instance->chart_item); + chart_unref (&instance->chart); } /* Returns true if INSTANCE's reference count is greater than 1, @@ -104,13 +104,13 @@ scatterplot_chart_unref (struct scatterplot_chart *instance) static inline bool scatterplot_chart_is_shared (const struct scatterplot_chart *instance) { - return chart_item_is_shared (&instance->chart_item); + return chart_is_shared (&instance->chart); } static inline void scatterplot_chart_submit (struct scatterplot_chart *instance) { - chart_item_submit (&instance->chart_item); + chart_submit (&instance->chart); } #endif /* output/charts/scatterplot.h */