diff options
Diffstat (limited to 'src/shape.h')
-rw-r--r-- | src/shape.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/shape.h b/src/shape.h new file mode 100644 index 0000000..641b440 --- /dev/null +++ b/src/shape.h @@ -0,0 +1,21 @@ +#ifndef POC__SHAPE_H +#define POC__SHAPE_H + +struct shape; + +/* Calculates the area of the shape and returns the value. */ +double shape_area(struct shape *shape); +typedef double (*shape_area_t)(struct shape *); + +/* Deallocates the object. */ +void shape_destroy(struct shape *shape); +typedef void (*shape_destroy_t)(struct shape *); + +void shape_init( + struct shape *shape, + shape_area_t area, + shape_destroy_t destroy); + +int shape_sizeof(); + +#endif |