aboutsummaryrefslogtreecommitdiff
path: root/src/shape.h
blob: 641b440ff7705fdbb0c3510f7a622d70f48828af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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