X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fboxplot.h;h=cd6b0961c6f683cae6407114951f665763e26142;hb=86e6b87d7ad411378c3204fe87504c7e6749be78;hp=e18daa844cd61ed0bfb13b52d7606880c53edca5;hpb=81579d9e9f994fb2908f50af41c3eb033d216e58;p=pspp diff --git a/src/output/charts/boxplot.h b/src/output/charts/boxplot.h index e18daa844c..cd6b0961c6 100644 --- a/src/output/charts/boxplot.h +++ b/src/output/charts/boxplot.h @@ -18,12 +18,12 @@ #define OUTPUT_CHARTS_BOXPLOT_H 1 #include -#include "output/chart-item.h" +#include "output/chart.h" /* Box-whiskers plot. */ struct boxplot { - struct chart_item chart_item; + struct chart chart; /* Data. */ struct boxplot_box *boxes; @@ -45,17 +45,17 @@ struct boxplot *boxplot_create (double y_min, double y_max, const char *title); void boxplot_add_box (struct boxplot *, struct box_whisker *, const char *label); -/* This boilerplate for boxplot, a subclass of chart_item, was +/* This boilerplate for boxplot, a subclass of chart, was autogenerated by mk-class-boilerplate. */ #include #include "libpspp/cast.h" -extern const struct chart_item_class boxplot_class; +extern const struct chart_class boxplot_class; /* Returns true if SUPER is a boxplot, otherwise false. */ static inline bool -is_boxplot (const struct chart_item *super) +is_boxplot (const struct chart *super) { return super->class == &boxplot_class; } @@ -63,24 +63,24 @@ is_boxplot (const struct chart_item *super) /* Returns SUPER converted to boxplot. SUPER must be a boxplot, as reported by is_boxplot. */ static inline struct boxplot * -to_boxplot (const struct chart_item *super) +to_boxplot (const struct chart *super) { assert (is_boxplot (super)); - return UP_CAST (super, struct boxplot, chart_item); + return UP_CAST (super, struct boxplot, chart); } -/* Returns INSTANCE converted to chart_item. */ -static inline struct chart_item * +/* Returns INSTANCE converted to chart. */ +static inline struct chart * boxplot_super (const struct boxplot *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 boxplot * boxplot_ref (const struct boxplot *instance) { - return to_boxplot (chart_item_ref (&instance->chart_item)); + return to_boxplot (chart_ref (&instance->chart)); } /* Decrements INSTANCE's reference count, then destroys INSTANCE if @@ -88,7 +88,7 @@ boxplot_ref (const struct boxplot *instance) static inline void boxplot_unref (struct boxplot *instance) { - chart_item_unref (&instance->chart_item); + chart_unref (&instance->chart); } /* Returns true if INSTANCE's reference count is greater than 1, @@ -96,13 +96,13 @@ boxplot_unref (struct boxplot *instance) static inline bool boxplot_is_shared (const struct boxplot *instance) { - return chart_item_is_shared (&instance->chart_item); + return chart_is_shared (&instance->chart); } static inline void boxplot_submit (struct boxplot *instance) { - chart_item_submit (&instance->chart_item); + chart_submit (&instance->chart); } #endif /* output/charts/boxplot.h */