From 2c5a5f7679a5f450e483fdedc99c80622f260a4d Mon Sep 17 00:00:00 2001 From: Sopár Adrián Date: Fri, 27 Jan 2023 00:05:24 +0100 Subject: Init commit. --- src/shape.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/shape.h (limited to 'src/shape.h') 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 -- cgit v1.2.3