#include <stdio.h>
#include "PolylineP.h"

static void init(Core p);
static void draw_polyline(Shape shape);

PolylineClassDescriptor polyline_class_descriptor = {
    /* Core part */
    {
        "Polyline",             /* class_name */
        (CoreClassDescriptor*)&shape_class_descriptor,/* super_class */
        sizeof(PolylineObj),    /* size_of_instance */
        NULL,                   /* class_initializer */
        init,                   /* initializer */
        NULL,                   /* finalizer */
    },
    /* Shape part */
    {
        draw_polyline,          /* draw */
    },
    /* Polyline part */
    {
        0,                      /* dummy */
    },
};

CoreClassDescriptor *polylineClass
    = (CoreClassDescriptor*)&polyline_class_descriptor;

static void
init(Core p)
{
    Polyline polyline = (Polyline)p;

    polyline->polyline.num_points = 0;
    polyline->polyline.points = NULL;
    printf("polyline initialized.\n");
}

static void
draw_polyline(Shape shape)
{
    printf("draw polyline!\n");
}